Permutation importance with correlated features
In this article (3 sections)
Permutation importance measures how much model performance falls when one feature is shuffled. If another feature contains nearly the same information, the model can continue predicting, making each individual feature look less important than their shared signal.
Compare individual and grouped disruption
Our synthetic regression has two near-duplicate signal features with correlation 0.9998 and one independent noise feature. A random forest fitted on 500 rows achieves test R² 0.9839 on 300 later rows.
Across 20 shuffles, individual mean R² drops are 0.4816 and 0.5916 for the duplicates and 0.00016 for noise. Shuffling the two signal features together with the same row permutation causes an R² drop of 1.7231. A drop can exceed baseline R² because shuffled predictions can perform worse than a constant-mean reference.
The scikit-learn permutation-importance guide warns that correlated features can yield unexpectedly low individual importances.
from feature_cases import correlated_importance_case
r = correlated_importance_case()
assert r['feature_correlation'] > .999
assert r['individual_mean_r2_drops'][2] < .001
assert r['joint_duplicate_pair_r2_drop'] > max(r['individual_mean_r2_drops'][:2])
print(r)Run it in the feature-engineering lab. Grouped permutation answers the importance of disrupting both substitutes, not the unique contribution of either one.
Define the importance question
Individual permutation asks how much the fitted model depends on a column when all others remain available. Group permutation asks about a set. Conditional permutation tries to preserve feature dependence and answers yet another estimand.
Compute importance on held-out data with an appropriate metric. Repeat shuffles and report variability. A low value can mean redundancy, lack of use or poor model performance. Check the baseline first.
Importance is model- and population-specific. It does not show causality, actionability or fairness. Removing one correlated feature can make the other appear more important without changing available information. Domain knowledge should define sensible groups such as alternative measures of the same quantity.
Exercise: remove each duplicate and refit, then compare held-out performance with individual and group permutation results. Add a downstream cost metric and explain why rankings can change with the scoring function.
NeuraPath's Data Science course teaches importance as a controlled perturbation question. Correlated substitutes must be analysed together when the decision concerns shared information.
Continue learning
This article is part of the Feature engineering and data quality sequence. Use the neighbouring tasks when you need the prerequisite or the next application.
- Review the prerequisite or neighbouring task in Feature selection nested inside validation.
- Continue with SHAP values: explain a prediction without claiming causation.
Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.
This article is part of our Data Science programme — 6 months. From data foundations to machine learning, deep learning and deployment.
Explore Data Science