How does severe class imbalance affect split selection in a decision tree?

Quick Overview

Asks how severe class imbalance changes which splits a decision tree chooses under Gini impurity or entropy. Tests reasoning about small impurity gains, weighted child impurity, stopping rules and leaf labels, and remedies such as class weights, resampling, skew-insensitive criteria and threshold tuning.

How does severe class imbalance affect split selection in a decision tree?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Consider a classification tree grown with Gini impurity or entropy on data where one class is rare, for example 1% of the rows. How does severe class imbalance affect split selection in a decision tree? ```hint Size of the gains Compute the Gini impurity of the root at 1% positives and compare it with a balanced root. What is the largest impurity decrease any split could achieve there? ``` ```hint Follow the majority rows Look at how the weighted child impurity counts majority rows that land in a child enriched with the minority class, and what that does to the label each leaf predicts. ``` ### What a Strong Answer Covers - Why the root impurity, and therefore every available impurity decrease, is small under severe imbalance. - How weighting each child by its row count makes the criterion sensitive to majority rows, and which kind of split that favors. - How stopping rules and plurality labels in the leaves turn this into poor recall on the minority class. - Remedies that change split selection itself, kept apart from remedies that only change the decision threshold or the evaluation. ### Follow-up Questions - After training with `class_weight='balanced'`, the tree's `predict_proba` outputs no longer match the real class prior. How would you correct them? - Why does random oversampling of the minority class make a single deep tree overfit, and how does SMOTE change that? - What makes the Hellinger distance criterion insensitive to class skew? - Does severe imbalance affect a gradient-boosted tree ensemble trained on log loss in the same way it affects a single tree?

Overview: Asks how severe class imbalance changes which splits a decision tree chooses under Gini impurity or entropy. Tests reasoning about small impurity gains, weighted child impurity, stopping rules and leaf labels, and remedies such as class weights, resampling, skew-insensitive criteria and threshold tuning.

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

Consider a classification tree grown with Gini impurity or entropy on data where one class is rare, for example 1% of the rows.

How does severe class imbalance affect split selection in a decision tree?

What a Strong Answer Covers Guidance

  • Why the root impurity, and therefore every available impurity decrease, is small under severe imbalance.
  • How weighting each child by its row count makes the criterion sensitive to majority rows, and which kind of split that favors.
  • How stopping rules and plurality labels in the leaves turn this into poor recall on the minority class.
  • Remedies that change split selection itself, kept apart from remedies that only change the decision threshold or the evaluation.

Follow-up Questions Guidance

  • After training with class_weight='balanced' , the tree's predict_proba outputs no longer match the real class prior. How would you correct them?
  • Why does random oversampling of the minority class make a single deep tree overfit, and how does SMOTE change that?
  • What makes the Hellinger distance criterion insensitive to class skew?
  • Does severe imbalance affect a gradient-boosted tree ensemble trained on log loss in the same way it affects a single tree?