A weak learner is a simple, fast-to-train model that performs better than random guessing or only slightly better than a basic baseline. Its main value appears when many such models are combined into an ensemble. section 5.1.1 section 5.2
Weak learners take different roles in ensemble methods:
- Averaging combines predictions from multiple models, often trading a small increase in bias for lower variance. section 5.1.1
- Bagging can combine decision trees, while earlier averaging approaches commonly used simple models such as linear regression or k-nearest neighbors. section 5.1.1
- AdaBoost fits weak learners sequentially, giving more weight to incorrectly predicted observations before combining results by voting or averaging. section 5.2
- Gradient boosting adds tree models one at a time, with each tree correcting errors left by the previous ensemble. section 5.2
Choosing more weak learners in XGBoost
Increasing XGBoost’s n_estimators adds more decision trees and can improve predictions, but it also increases training time. The useful number of trees depends on the learning rate and the problem’s performance on unseen data. section 5.4.1
Figure 5.5 How gradient descent works with boosted trees
Use the figure to see how successive boosted trees reduce residual error through gradient-descent-style corrections. section 5.2


