Imagine asking several friends to answer an exam. A majority vote can be more reliable than trusting one person, especially when each friend is good at different questions. A strong learner uses the same idea: it combines multiple weak learners into one model with substantially better predictive performance. section 12.1
The combination depends on the task. Classifiers vote for the most common class, while regressors average their predictions. The weak learners are often decision trees, whose simple boundaries become more useful when combined. section 12.1 section 12.2
Figure 12.1 Ensemble methods consist of joining several weak learners to build a strong learner.
See how several weak learners join to form a strong learner. section 12.1
Two main ensemble strategies build strong learners in different ways:
- Bagging trains learners on random dataset subsets, then combines their predictions by voting or averaging. Random forests are a worked example. section 12.1 section 12.2
- Boosting trains learners sequentially, enlarging or emphasizing poorly predicted points so later learners focus on earlier weaknesses. section 12.1 section 12.3
- AdaBoost gives learners voting power based on accuracy scores, whereas gradient boosting fits successive learners to residual errors. section 12.3 section 12.4
Spam classification with a random forest
For spam and ham emails represented by word counts, three depth-1 decision trees can be trained on random subsets. Each predicts spam or ham; the strong learner chooses the most common prediction. The resulting boundary classifies most points while treating isolated mistakes as outliers rather than overfitting them. section 12.2
A boosted regression prediction
For user age and weekly app engagement, gradient boosting starts with the average engagement, fits a tree to the residuals, and adds later tree predictions using a learning rate. As residuals shrink, the later weak learners make smaller corrections. section 12.4
You can practice the idea by combining three weighted classifier predictions and determining the final label, then calculating an AdaBoost learner's weight from its accuracy. section 12.8

