A stakeholder wants to know which features drive your fraud random forest. Compare impurity importance, permutation importance and SHAP, and their pitfalls.
Answer
Model answer, written in a candidate's voice
In short
- MDI is fast but training-set and biased towards high-cardinality/continuous features; not enough alone.
- Permutation importance on held-out data is model-agnostic but correlated features share or hide importance.
- SHAP gives local additive attributions; TreeSHAP is exact for trees but costly and still correlation-sensitive.
- Use held-out data, stability checks, and global plus local views rather than a single ranking.
- Importance is not causation; tailor to audience with plain-language reason codes and documented limits.
In full
I would separate three questions: which features reduce impurity, which features matter on unseen data, and which features explain an individual decision. MDI is quick but computed on training data and biased towards high-cardinality or continuous features, so I would not use it alone for a stakeholder ranking. Permutation importance on held-out data is model-agnostic and more trustworthy for global ranking, but correlated features can share or hide importance, so I would report it with stability checks across folds and seeds. SHAP, specifically TreeSHAP for the forest, gives exact additive local attributions and global mean absolute SHAP, which is useful for both portfolio-level drivers and case-level reason codes, though it is more expensive and still reflects the model’s dependence structure rather than causal effects. I would present it as model-based evidence, not proof of causation, and for regulators I would translate it into plain-language reason codes with documented limitations rather than claiming a feature causes fraud.
What a strong answer covers
- Impurity (MDI) is biased towards high-cardinality and continuous features and is computed on training data.
- Permutation importance on held-out data is model-agnostic, but correlated features share or hide importance.
- SHAP gives local, additive attributions; TreeSHAP is exact for trees; cost and correlation caveats apply.
- Importance is not causation, and the explanation must suit the audience (e.g. regulatory reason codes).
Common mistakes
- reading MDI as causal
- permuting correlated features independently and concluding both are useless.