What is pruning in decision trees and why is it important?

Updated May 17, 2026

Short answer

Pruning removes unnecessary branches in a decision tree to reduce overfitting.

Deep explanation

Pruning simplifies a decision tree by cutting branches that provide little predictive power. Pre-pruning stops growth early using constraints, while post-pruning removes branches after full training. This improves generalization and reduces model complexity.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Supervised Learning interview questions

View all →