With squared loss, run two rounds of gradient boosting on x=1,2,3,4 and y=3,5,12,14, using a stump that splits between x=2 and x=3 in each round and a learning rate ν=0.5. What is the training MSE before boosting (the constant model), after round 1, and after round 2?

Supervised learning, Gradient boosting
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can run gradient boosting by hand: initial constant, residuals, stump fit, shrunk update.

Key idea

For squared loss, the negative gradient is the residual y−F(x). Each round fits a stump to the residuals and adds ν times its output to F.

Steps

  1. Initial model: F0=yˉ=(3+5+12+14)/4=8.5. Residuals: (−5.5,−3.5,3.5,5.5). MSE =(30.25+12.25+12.25+30.25)/4=21.25.
  2. Round 1: the stump predicts the mean residual on each side: −4.5 on the left and +4.5 on the right. With ν=0.5 the model becomes 6.25 for x∈{1,2} and 10.75 for x∈{3,4}.
  3. New residuals: (3−6.25, 5−6.25, 12−10.75, 14−10.75)=(−3.25,−1.25,1.25,3.25). MSE =(10.5625+1.5625+1.5625+10.5625)/4=6.0625.
  4. Round 2: the stump predicts the mean residual: −2.25 on the left and +2.25 on the right. Adding 0.5 of this gives 6.25−1.125=5.125 and 10.75+1.125=11.875.
  5. Residuals now: (−2.125,−0.125,0.125,2.125). MSE =(4.5156+0.0156+0.0156+4.5156)/4=2.2656.
  6. Each round shrinks the mean residual on each side by the factor 1−ν=0.5 (from ±4.5 to ±2.25 here), so the error falls steadily. The learning rate trades fewer rounds against overfitting risk.

Common mistakes

How long your answer should be

Half a page; 5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Supervised learning: The SVM objective λ2∥w∥2+1n∑imax⁡(0,1−yiw⊤xi) is minimised by stochastic subgradient descent (Pegasos) with step ηt=1/(λt). With λ=0.5 and w0=0, what is the result of running three steps on the single points (x,y)=((1,2),+1), ((−1,0),−1) and ((0,−1),+1), in that order, and what is the update rule?
Next in Supervised learning: How do you show that the AdaBoost classifier weight α=12ln⁡1−εε is the value that minimises the exponential loss, given a weak classifier h with weighted error ε?