Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions week07_interpretability/practice.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@
"shap_values = explainer.shap_values(X)\n",
"\n",
"# visualize explanation of the first example\n",
"shap.initjs() #For re-run the Javascript initialization on Google Colab\n",
"shap.force_plot(explainer.expected_value, shap_values[0, :], X.iloc[0, :])"
]
},
Expand All @@ -355,6 +356,7 @@
"source": [
"# Explain training data: each *column* is a rotated plot from above, stacked for all training samples\n",
"# (this plot is interactive, hover mouse to see feature names)\n",
"shap.initjs() #For re-run the Javascript initialization on Google Colab\n",
"shap.force_plot(explainer.expected_value, shap_values, X)"
]
},
Expand Down