AI engineering glossary · Classical ML algorithms
What is tree pruning?
Tree pruning: Reducing the size of a decision tree by cutting branches that add little predictive value, either by stopping growth early or by trimming a full tree afterwards. It lowers the chance of memorising noise and yields simpler, more robust models.
Tree pruning: an example
In scikit-learn, setting max_depth=5 or ccp_alpha=0.01 restricts the tree so it cannot grow a leaf for every training row.
Related terms
- Decision tree
- Overfitting
- CART
- Cost-complexity pruning
More Classical ML algorithms terms
- Truncated SVD
- UMAP
- Variance inflation factor
- Voting classifier
- Weak learner
- XGBoost
- AdaBoost
- Agglomerative clustering
Where you learn it
Tree pruning is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.