Introduction to SHAP with Python

How to create and interpret SHAP plots: waterfall, force, mean SHAP, beeswarm and dependence

Conor O'Sullivan
Towards Data Science
10 min readDec 19, 2021

--

Updated: 12 March 2023

A SHAP beeswarm plot enlarged and rotated 90 degrees
(source: author)

SHAP is the most powerful Python package for understanding and debugging your models. It can tell us how each model feature has contributed to an individual prediction. By aggregating SHAP values, we can…

--

--

PhD Student | Writer | Houseplant Addict | Follow me for articles on IML, XAI, Algorithm Fairness and Remote Sensing