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.
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:
Click any topic to jump in
Reduce variance by training on bootstrap samples and combining diverse decision trees through majority vote.
Two sequential refinement strategies
Sequential learning where each model corrects the mistakes of previous ones via sample reweighting.
Gradient descent in function space — XGBoost, LightGBM, and CatBoost dominate tabular data.
Train a meta-learner to optimally combine diverse base models for superior ensemble predictions.
This chapter is part of PixelBank Premium. Create a free account, then upgrade to read the full lesson — concepts, walkthroughs, and exercises.