What is pruning in Decision Trees?

Updated May 16, 2026

Short answer

Pruning is the process of reducing tree size to prevent overfitting.

Deep explanation

Decision Trees can grow very deep and overfit training data. Pruning removes unnecessary branches that do not improve generalization. It can be pre-pruning (stop early) or post-pruning (trim after training).

Real-world example

Used in medical diagnosis systems to avoid overly complex decision rules.

Common mistakes

  • Thinking deeper trees are always better.

Follow-up questions

  • What is post-pruning?
  • What is pre-pruning?

More Decision Trees interview questions

View all →