Hi, I followed the example code in the fastshapvignette and encountered with error:
library(fastshap)
library(xgboost)
data(boston, package = "pdp")
X <- data.matrix(subset(boston, select = -cmedv)) # matrix of feature values
set.seed(859) # for reproducibility
bst <- xgboost(X, label = boston$cmedv, nrounds = 338, max_depth = 3, eta = 0.1,
verbose = 0)
ex <- explain(bst, exact = TRUE, X = X)
force_plot(object = ex[1L, ], feature_values = X[1L, ], display = "html")
Error:
<b>Visualization omitted, Javascript library not loaded!</b><br>
Have you run `initjs()` in this notebook? If this notebook was from another
user you must also trust this notebook (File -> Trust notebook). If you are viewing
this notebook on github the Javascript has been stripped for security. If you are using
JupyterLab this error is because a JupyterLab extension has not yet been written.
Hi @zhaoliang0302, sorry for the late reply. All plotting functions have been removed in the next release in favor of using the far superior shapviz library.
Hi, I followed the example code in the
fastshap
vignette and encountered with error:Error:
Here is my working environment: