Why does growing a full tree and then post-pruning often outperform early stopping?

Quick Overview

Asks why growing a full decision tree and pruning it afterward tends to beat stopping its growth early. Tests understanding of the horizon effect, interaction patterns such as XOR, cost-complexity pruning with a cross-validated alpha, and the compute trade-off.

Why does growing a full tree and then post-pruning often outperform early stopping?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Why does growing a full tree and then post-pruning often outperform early stopping? Here early stopping means pre-pruning rules applied while the tree grows, such as a minimum impurity decrease, a maximum depth or a minimum number of samples per split. ```hint What each method knows Compare what each method can see at the moment it decides to keep or drop a split. ``` ```hint Interactions Think about a target that depends on an interaction between two features, where neither feature helps on its own. ``` ### What a Strong Answer Covers - The horizon effect of one-step stopping rules, with a concrete case such as XOR. - Why judging a subtree by its total error reduction leads to better keep-or-drop decisions. - How cost-complexity pruning works and how its single parameter is chosen. - The compute cost of growing the full tree, and situations where early stopping is good enough. ### Follow-up Questions - In weakest-link pruning, how is the next node to collapse chosen? - Why do random forests usually grow unpruned trees, while gradient boosting uses shallow ones? - Would a two-level lookahead during growth fix the horizon effect, and what would it cost? - How would you choose the pruning level when there is too little data to hold out a validation set?

Overview: Asks why growing a full decision tree and pruning it afterward tends to beat stopping its growth early. Tests understanding of the horizon effect, interaction patterns such as XOR, cost-complexity pruning with a cross-validated alpha, and the compute trade-off.

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

Why does growing a full tree and then post-pruning often outperform early stopping?

Here early stopping means pre-pruning rules applied while the tree grows, such as a minimum impurity decrease, a maximum depth or a minimum number of samples per split.

What a Strong Answer Covers Guidance

  • The horizon effect of one-step stopping rules, with a concrete case such as XOR.
  • Why judging a subtree by its total error reduction leads to better keep-or-drop decisions.
  • How cost-complexity pruning works and how its single parameter is chosen.
  • The compute cost of growing the full tree, and situations where early stopping is good enough.

Follow-up Questions Guidance

  • In weakest-link pruning, how is the next node to collapse chosen?
  • Why do random forests usually grow unpruned trees, while gradient boosting uses shallow ones?
  • Would a two-level lookahead during growth fix the horizon effect, and what would it cost?
  • How would you choose the pruning level when there is too little data to hold out a validation set?