Boosting Fits Each New Model to the Residual Error
Boosting builds a model by adding one small model at a time, each fitted to what the current model still gets wrong, and it never goes back to change the earlier ones. Hastie, Tibshirani, and Friedman call the general scheme forward stagewise additive modeling (Algorithm 10.2). Start with f₀(x) = 0. At each round m, find the coefficient and basis function that best reduce the loss when added to the current model, then set f_m(x) = f_(m−1)(x) + β_m b(x; γ_m). In their words, forward stagewise modeling "sequentially" adds new basis functions "without adjusting the parameters and coefficients of those that have already been added."
For squared-error loss the step becomes simple. The loss on observation i is (y_i − f_(m−1)(x_i) − β b(x_i; γ))², which equals (r_im − β b(x_i; γ))², where r_im = y_i − f_(m−1)(x_i) is the residual of the current model. The authors conclude: "for squared-error loss, the term β_m b(x; γ_m) that best fits the current residuals is added to the expansion at each step."
Try it by hand. Six points: x = 1, 2, 3, 4, 5, 6 and y = 1, 1.5, 2, 6, 6.5, 7. Use a stump, a rule with one split and two constant values, as the basis function. Start with f₀ = 0, whose training mean squared error is 22.42. Round 1 fits the stump to y itself: the best split is between x = 3 and x = 4, predicting the left mean 1.5 and the right mean 6.5. The error falls to 0.1667. The residuals are now −0.5, 0, 0.5 on the left and −0.5, 0, 0.5 on the right. Round 2 fits a stump to those residuals. Two splits tie for best: after x = 1, adding −0.5 and +0.1, and after x = 5, adding −0.1 and +0.5, each giving an error of 0.1167. I take the lower split, after x = 1. (The other choice mirrors the later rounds and gives the same errors.) Round 3 splits after x = 5, adding −0.08 and +0.4, for 0.0847. Round 4 splits after x = 3 and adds +0.18 and −0.18, for 0.0523. Every round fits only what is left over, and the fit gets closer to the six points. I computed these with exact fractions, and the data are invented.
The idea is not tied to squared error. Section 10.4 shows that AdaBoost is forward stagewise modeling with the exponential loss L(y, f(x)) = exp(−y f(x)). And the last paragraph of Section 10.3 notes that squared-error loss is generally not a good choice for classification, which is why other losses are used.
The trap: treating every boosting algorithm as the same recipe, or as AdaBoost's weight rule. AdaBoost is one case, forward stagewise modeling with the exponential loss. With squared error the step is residual fitting, and other losses call for other updates. What they share is the additive form and the habit of building each new term from what the model so far gets wrong.
Prof Rod's rule: with squared-error boosting, look at the residuals after each round, because the next model is built from them. With other losses, look at whatever target that loss defines.