All lessons in Machine Learning Engineering: Reliable Predictive Models
Permutation Importance on Unseen Data
Define a score drop, repeat the perturbation, and interpret uncertainty and direction.
30 minutes · Members lesson · preview
What you will learn
- Compute a permutation importance as a score drop or a loss increase for a named metric on held-out rows, with the sign convention stated.
- Repeat the shuffle several times, summarise the spread, and state what that spread does and does not estimate.
- Decide when to shuffle correlated columns jointly and interpret every result as model reliance rather than a causal effect.
Impurity importance, from the previous lesson in this chapter, records what the forest did while it was being built: how much weighted impurity each column removed on training rows. Permutation importance asks a different and more operational question. If a column became useless at prediction time, how much worse would the trained model score on rows it never saw? For the parcel carrier, that question is the one a dispatcher actually cares about: how much does this fitted model rely on the weather pairing in the evaluation sample? A real feed outage has its own missing-value and fallback behavior, so a shuffle is not an outage simulation.
The method is simple to run and easy to misread. This lesson fixes the definition, works the arithmetic by hand, and then spends most of its effort on the three places people go wrong: the sign of the score difference, the meaning of the spread across repeats, and correlated columns.