How do highly correlated features distort Mean Decrease in Impurity importance?

Quick Overview

A random forest question on how highly correlated features distort Mean Decrease in Impurity feature importance. It tests whether you can explain how split credit gets shared or captured, what a low importance score really tells you, and which alternatives give a stable answer for correlated groups.

How do highly correlated features distort Mean Decrease in Impurity importance?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How do highly correlated features distort Mean Decrease in Impurity importance? Mean Decrease in Impurity (MDI) is the default `feature_importances_` of tree ensembles such as random forests: the total impurity reduction from every split on a feature, averaged over the trees. ```hint Follow one split Picture a tree that has just split on one of two nearly identical features. How much impurity is left for the other one to remove below that node? ``` ```hint Look at feature sampling Think about how per-split feature sampling decides which of the two features gets offered at each node, and how that changes as you raise or lower the number of candidates. ``` ### What a Strong Answer Covers - Why correlated features end up sharing impurity credit, both inside one tree and across the forest. - How the share each feature receives depends on settings such as `max_features` and on small edges between the features. - What a low or high MDI score does and does not tell you about removing a feature. - Remedies that give a stable answer for a group of correlated features. ### Follow-up Questions - Permutation importance is often suggested as the fix. How do correlated features distort it? - MDI also favors high-cardinality features. Why, and how would you check whether that is happening? - How do SHAP values from a tree model divide credit between two near-duplicate features? - A stakeholder wants to drop the bottom 20 features by MDI. What would you check first?

Overview: A random forest question on how highly correlated features distort Mean Decrease in Impurity feature importance. It tests whether you can explain how split credit gets shared or captured, what a low importance score really tells you, and which alternatives give a stable answer for correlated groups.

General logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

How do highly correlated features distort Mean Decrease in Impurity importance?

Mean Decrease in Impurity (MDI) is the default feature_importances_ of tree ensembles such as random forests: the total impurity reduction from every split on a feature, averaged over the trees.

What a Strong Answer Covers Guidance

  • Why correlated features end up sharing impurity credit, both inside one tree and across the forest.
  • How the share each feature receives depends on settings such as max_features and on small edges between the features.
  • What a low or high MDI score does and does not tell you about removing a feature.
  • Remedies that give a stable answer for a group of correlated features.

Follow-up Questions Guidance

  • Permutation importance is often suggested as the fix. How do correlated features distort it?
  • MDI also favors high-cardinality features. Why, and how would you check whether that is happening?
  • How do SHAP values from a tree model divide credit between two near-duplicate features?
  • A stakeholder wants to drop the bottom 20 features by MDI. What would you check first?