How to display SHAP plots?

ArielHerrera
New Contributor II

I am looking to display SHAP plots, here is the code:

import xgboost import shap

shap.initjs() # load JS visualization code to notebookX,y = shap.datasets.boston() # train XGBoost model

model = xgboost.train({"learning_rate": 0.01}, xgboost.DMatrix(X, label=y), 100)

explainer = shap.TreeExplainer(model) # explain the model's predictions using SHAP values

shap_values = explainer.shap_values(X)

shap_explain = shap.force_plot(explainer.expected_value, shap_values[0,:], X.iloc[0,:]) # visualize the first prediction's explanation

displayHTML(shap_explain.data) # display plot

However I am receiving the following error:

0693f000007OoIfAAK

Any help greatly appreciated!