Skip to content

AdaBoost Trains Each Classifier on the Previous Misses

AdaBoost turns a crowd of weak classifiers into one strong one by training them in sequence and, after every round, telling the next classifier where the last one failed. A weak classifier is only slightly better than a coin flip. The trick is the weights: each training example carries one, and the weights of the examples a classifier misses go up.

Hastie, Tibshirani, and Friedman give the procedure as Algorithm 10.1, which they call AdaBoost.M1. It is written for two classes, with labels and predictions of −1 or +1. Start every example at weight 1/N. Then, for rounds m = 1 to M: fit a classifier G_m to the weighted training data; compute its weighted error err_m, the weight on the examples it missed divided by the total weight; set α_m = log((1 − err_m)/err_m); and multiply the weight of every missed example by exp(α_m). The final classifier is the sign of Σ α_m G_m(x), a vote in which accurate classifiers count for more. The rule only makes sense when 0 < err_m < ½: at err = ½ the weight α is 0, and a classifier with err = 0 would make log(0) blow up, so a perfect fit ends the process.

Try it by hand. Five examples, each at weight 0.2. The first weak classifier misses one of them, so err = 0.2. Then α = ln((1 − 0.2)/0.2) = ln 4 ≈ 1.386. The missed example's weight is multiplied by exp(α) = (1 − 0.2)/0.2 = 4, giving 0.8. The four correct ones stay at 0.2 each, so the total is 0.8 + 4 × 0.2 = 1.6. Normalize by dividing by 1.6: the missed example now holds 0.5 of the weight, and each of the other four holds 0.125. One stubborn example now counts as much as the other four put together. The next classifier is forced to deal with it.

The authors show how far this can go on simulated data with ten features. A single two-leaf "stump" has a test error rate of 45.8 percent, barely better than the 50 percent of random guessing. Boosting the same stumps, the error falls to 5.8 percent after 400 iterations. A single 244-node classification tree on the same data scores 24.7 percent. That is one simulated data set, not a promise about yours.

The trap: thinking the example weights stay fixed. They are the whole mechanism. Freeze them at 1/N and the next round gets the same problem as the last one, so you lose the adaptive emphasis on the misses, which is what AdaBoost adds to a plain vote.

Prof Rod's rule: boosting does not ask a classifier to be good. It asks each one to be good at what the last one missed.

Hastie, Tibshirani, and Friedman, The Elements of Statistical Learning, 2nd ed., Section 10.1, Algorithm 10.1, and Figure 10.2