Part V — Non-Linear Models, Trees, Ensembles & Kernel Methods · Chapter 4

Ensembles II: Boosting & AdaBoost

Hook

Bagging trains many strong learners in parallel and averages away their disagreements. What if you trained many weak learners instead — one at a time, each one aimed squarely at whatever the last one got wrong?

Intuition
Round 1 — splits at x=3.5, weighted error = 0.400

This pattern has two separate bumps of one class — a single split can only ever capture one boundary well. Dot size is each point's current weight: watch it grow on whatever the last round got wrong, and shrink on whatever it already handles. Each new round's split is chosen to serve exactly the biggest dots on the board.

Formalize

This is boosting (specifically AdaBoost — short for Adaptive Boosting). Each round trains one weak learner — here, the exact single-split "stump" from Chapter 1 of this part, but scored by weighted error instead of information gain — then reweights the data before the next round:

αt=12ln1ϵtϵt,wiwieαtyiht(xi)\alpha_t = \frac{1}{2}\ln\frac{1-\epsilon_t}{\epsilon_t}, \qquad w_i \leftarrow w_i \, e^{-\alpha_t \, y_i \, h_t(x_i)}
  • αt\alpha_t — round tt's vote weight in the final combined prediction; a more accurate stump gets a bigger αt\alpha_t.
  • ϵt\epsilon_t — round tt's weighted error rate.
  • wiw_i — point ii's current weight, updated after every round.
  • yiy_i — point ii's true label.
  • ht(xi)h_t(x_i) — round tt's stump prediction on point ii.
  1. Vote weight scales with accuracy

    ϵt\epsilon_t is round tt's weighted error; a more accurate stump gets a bigger αt\alpha_t (more say in the final vote).

  2. Reweighting re-tilts the data

    The weight update shrinks correctly-classified points and grows misclassified ones — each new stump is trained on data that's been re-tilted toward exactly what's still wrong.

Play
Round 1 — α = 0.203, combined accuracy = 60%

Watch α\alpha and the combined accuracy together. A single round is stuck at 60% — genuinely weak. The final vote weights every round's opinion by its own α\alpha, not just a plain majority, so a more confident round can outvote several less confident ones.

Worked example
  1. Find round 1's best stump and its weighted error

    Splitting at x=3.5x=3.5 (predict A left, B right), it's wrong on 8 of 20 points — weighted error ϵ1=8/20=0.4\epsilon_1 = 8/20 = 0.4, since every point starts at weight 1/201/20.

  2. Compute the stump's vote weight
    α1=12ln0.60.40.203\alpha_1 = \frac{1}{2}\ln\frac{0.6}{0.4} \approx 0.203
  3. Reweight the points

    For a point this stump got right, its new weight shrinks by e0.2030.82e^{-0.203} \approx 0.82; for one it got wrong, its weight grows by e0.2031.22e^{0.203} \approx 1.22.

  4. Read the renormalized result

    Weights must sum to 1 again, so divide every point by the new total. With 12 correct points at 0.82/200.82/20 each and 8 wrong points at 1.22/201.22/20 each, that total is 12(0.82/20)+8(1.22/20)=(9.84+9.76)/20=0.9812(0.82/20) + 8(1.22/20) = (9.84+9.76)/20 = 0.98.

    Dividing each point's weight by that total gives the renormalized weight, which we compare against the average (uniform) weight of 1/20=0.051/20=0.05:

    • Correct points: (0.82/20)/0.980.0418(0.82/20)/0.98 \approx 0.0418, which is 0.0418/0.050.83×0.0418/0.05 \approx 0.83\times that average
    • Wrong points: (1.22/20)/0.980.0624(1.22/20)/0.98 \approx 0.0624, which is 1.25×\approx 1.25\times that average

    — exactly the size difference the next round's stump sees before it even starts.

Checkpoint

Chain enough rounds to reach the ensemble’s best combined accuracy — 95%. One round alone is a weak learner for a reason.

Round 1 — combined accuracy = 60%
Move the rounds slider to try it
Summary
αt=12ln1ϵtϵt,wiwieαtyiht(xi)\alpha_t = \frac{1}{2}\ln\frac{1-\epsilon_t}{\epsilon_t}, \qquad w_i \leftarrow w_i \, e^{-\alpha_t \, y_i \, h_t(x_i)}

Bagging cancels noise by averaging independent overfit learners; boosting builds accuracy by chaining weak learners that each specialize in whatever's still unsolved. Neither pass alone reaches this pattern's answer — one round here is stuck at 60%, but five chained rounds reach 95%, each one narrowing in on a smaller and smaller residue of mistakes.