Model Interpretability
Q: How do you explain a model's predictions?
- Global: feature importance (gain/split counts in trees — biased toward high-cardinality features), permutation importance (drop in score when a feature is shuffled; model-agnostic), partial dependence plots (average prediction as one feature varies).
- Local (one prediction): SHAP (Shapley values: fair attribution of the prediction to features; exact and fast for trees with TreeSHAP), LIME (fit a simple model around the point), counterfactuals ("approved if income were $5k higher").
- Deep nets: saliency/gradient maps, integrated gradients, attention visualization (attention ≠ explanation).
- Caveats: correlated features split credit arbitrarily; explanations describe the model, not causality.
- Regulated domains (credit, healthcare) need reason codes, monotonic constraints and fairness audits (compare error rates across groups).