Why SHAP?
SHAP (SHapley Additive exPlanations) gives theoretically grounded feature importance — not the biased impurity importance from tree models.
Three Key Plots
1. Beeswarm (Global)
import shap
explainer = shap.TreeExplainer(model)
shap_values = explainer(X_test)
shap.plots.beeswarm(shap_values)
2. Waterfall (Local — one prediction)
shap.plots.waterfall(shap_values[0])
3. Dependence Plot
shap.plots.scatter(shap_values[:, 'TransactionAmt'])
Stakeholder-Friendly Framing
"This transaction was flagged as fraud because the amount ($3,200) is 4x higher than typical for this card, and the email domain changed in the last 24h."