How does pruning reduce overfitting in Decision Trees?
Updated May 16, 2026
Short answer
Pruning removes unnecessary branches that do not improve generalization, reducing model complexity.
Deep explanation
Pruning works by penalizing overly complex trees. In cost-complexity pruning (used in CART), a penalty term α * number_of_leaves is added to the loss function. The algorithm finds subtrees that minimize both impurity and complexity. This prevents the model from fitting noise in training data and improves generalization performance.
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro