Skip to content

Instantly share code, notes, and snippets.

@betterdatascience
Created December 14, 2020 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betterdatascience/65db591e2c840940d6ea5480feccbe05 to your computer and use it in GitHub Desktop.
Save betterdatascience/65db591e2c840940d6ea5480feccbe05 to your computer and use it in GitHub Desktop.
007_lime_vs_shap
import shap
shap.initjs()
shap_explainer = shap.TreeExplainer(model)
shap_values = shap_explainer.shap_values(X)
shap.force_plot(shap_explainer.expected_value, shap_values[1, :], test_1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment