Friedman's H-Statistic for Interactions
A number between 0 and 1 that measures how much of a model's prediction for two features comes from their interaction, rather than from each feature's own separate effect.
Prerequisites: Feature Importance with SHAP
A fitted model's prediction for two features, say momentum and volatility, could combine them in two very different ways: it might treat them as independent contributions that just add together (momentum's effect is the same regardless of volatility), or it might combine them in a genuinely interactive way (momentum only matters in low-volatility regimes). Two models with similar overall accuracy can differ enormously on this point, and knowing which one you have changes how you'd trade the signal.
Friedman's H-statistic measures this directly. For a pair of features, it compares the model's actual joint prediction surface to what you'd get if the two features' effects were purely additive (each feature's own partial dependence curve summed together, with no interaction term). The statistic is the ratio of the squared difference between those two surfaces to the squared size of the joint effect itself, so means the features act purely additively and close to means essentially all of their joint effect comes from the interaction between them rather than either feature acting alone.
Because it's computed directly from the fitted model's predictions rather than from the raw data, the H-statistic tells you what the model learned, not necessarily what's true about the world — a model that never saw enough data to learn a real interaction will show near zero even if the true relationship is interactive.
Friedman's H-statistic scores, from 0 to 1, how much of a fitted model's prediction for a pair of features comes from their interaction rather than their separate additive effects — a diagnostic of what the model learned, which is only as good as whether the model had a chance to learn the true relationship.
Further reading
- Friedman, Popescu, Predictive Learning via Rule Ensembles