SHAP Library in Python

!pip install shap
import shap#Load JS visualization code to notebook
shap.initjs()

explainer = shap.TreeExplainer(xgbclassifier)
shap_values = explainer.shap_values(xgbX_train)
shap.summary_plot(shap_values, xgbX_train)
Determining patient readmittance
Inspecting customer clusters
Cluster prototypes

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store