Day 223 — Feature importance that survives a permutation test

Wednesday, 17 March 2027 · Week 32 of 52 · Machine learning · Study day · 60 min

Tree-based importance is biased toward high-cardinality and correlated features in ways that have nothing to do with predictive value, and the fix is a permutation test you already know how to run.

What you should be able to do tonight

  • Say why impurity-based importance is misleading here and what permutation importance measures instead.
  • Report permutation importance with a null distribution and identify which features are indistinguishable from noise.

Tasks 60 min

35 min Implement permutation importance correctly for this setting: permute a feature within each cross-section rather than globally, so you break its relationship to the label without destroying the cross-sectional structure. Then repeat many times to get a null distribution per feature, not a point estimate.

25 min Handle the correlated-feature problem: permuting one of two correlated features leaves the model able to use the other, so both look unimportant. Run grouped permutation for correlated clusters and report both the individual and the grouped results, since the difference is itself informative.

Resources

Deliverable

Permutation importance with null distributions per feature, plus grouped importance for correlated clusters.

Checkpoint

Why is tree-based feature importance misleading here, and what does grouped permutation tell you that individual permutation does not?

Prepare for tomorrow

Ten minutes tonight so Day 224, Thursday, 18 March 2027 starts clean. This is what the evening email sends you.

Write out, out loud, why you would expect a gradient boosting model to lose to ridge out of sample on this problem.

Three reasons, ninety seconds.

Tomorrow’s drill uses it.