Pre-pruning vs post-pruning in decision trees — what's the difference and when do you use each?
mediumAnswer
- Pre-pruning stops the tree from growing during construction, via , , , or .
- Fast and simple but you may stop too early (horizon effect).
- Post-pruning (cost-complexity or reduced-error pruning) grows the tree fully then removes subtrees using a held-out set or a complexity penalty.
- Usually gives a slightly better bias-variance tradeoff but requires the extra pass.
- Modern ensembles (RF, GBM) rely on pre-pruning + averaging, which is why deep individual trees are OK in them.
Check yourself — multiple choice
- Pre-pruning grows the tree fully then trims
- Pre-pruning stops during construction; post-pruning grows fully then trims subtrees
- Post-pruning is only for regression trees
- Both are the same
Pre: stop early via . Post: grow full, then trim (cost-complexity).
#decision-trees#trees#regularization
Practise Supervised Learning
215 interview questions in this topic.
Related questions
- How does cost-complexity (CCP) pruning work?
- Gini impurity, entropy, and classification error — which do trees actually use?
- How do decision trees handle categorical features?
- How do decision trees handle missing values?
- What criterion does a regression tree use to choose splits?
- Why is a single decision tree considered a 'high-variance' model?