Chapter 6: Ensemble Methods
Harness the wisdom of crowds in machine learning. Learn how to combine multiple models for superior predictions through bagging with Random Forests, boosting with AdaBoost and XGBoost, and sophisticated stacking techniques.
Chapter Overview
The fundamental insight behind ensemble methods is that a committee of models often outperforms any individual member. Just as diverse perspectives lead to better decisions in human groups, diverse models can cancel out each other's errors.
Ensemble methods come in two main flavors. Bagging (Bootstrap AGGregatING) trains multiple models independently on different random samples and averages their predictions, reducing variance. Random Forests extend this by also randomizing feature selection, creating highly decorrelated trees.
Boosting takes a different approach: train models sequentially, with each new model focusing on the mistakes of the previous ones. AdaBoost reweights samples to emphasize misclassified examples. Gradient Boosting fits each new tree to the residuals (errors) of the ensemble so far, effectively performing gradient descent in function space.
These methods dominate machine learning competitions and real-world applications. Gradient Boosting implementations like XGBoost, LightGBM, and CatBoost are go-to choices for tabular data, often achieving state-of-the-art results with proper tuning.
This chapter covers:
- Bagging: Reducing variance by training on bootstrap samples and aggregating predictions
- Random Forests: Highly effective ensemble of decorrelated decision trees, feature importance, and tuning
- AdaBoost: Adaptive boosting with sample reweighting
- Gradient Boosting: The powerhouse algorithm (XGBoost, LightGBM, CatBoost) with regularization techniques
- Voting & Stacking: Combining diverse models for superior performance
Chapter Roadmap
Click any topic to jump in
Bagging & Random Forests
Reduce variance by training on bootstrap samples and combining diverse decision trees through majority vote.
Two sequential refinement strategies
Boosting
Sequential learning where each model corrects the mistakes of previous ones via sample reweighting.
Gradient Boosting
Gradient descent in function space — XGBoost, LightGBM, and CatBoost dominate tabular data.
Stacking
Train a meta-learner to optimally combine diverse base models for superior ensemble predictions.
Sign up to unlock this chapter
This chapter is part of PixelBank Premium. Create a free account, then upgrade to read the full lesson — concepts, walkthroughs, and exercises.