What do you understand by Pruning in a Decision Tree?

When we remove sub-nodes of a Decision node, this process is called pruning or the opposite process of splitting. The two techniques which are widely used for pruning are- Post and Pre Pruning.

Post Pruning:

  • This type of pruning is used after the construction of the Decision Tree.
  • This technique is used when the Decision Tree will have a very large depth and will show the overfitting of the model.
  • It is also known as backward pruning.
  • This technique is used when we have an infinitely grown Decision Tree.

Pre Pruning:

  • This technique is used before the construction of the Decision Tree.
  • Pre-Pruning can be done using Hyperparameter tuning.
  • Overcome the overfitting issue.