Visual explainer
AdaBoost
Trace classic binary AdaBoost through five illustrative samples, normalized reweighting and three signed stump votes, with training and noise limits.
AdaBoost repeatedly fits a classifier using sample weights, then combines the classifiers with weighted signed votes. Our synthetic feature values are 1 through 5, with labels +, +, −, +, −. Above the step are observed labels; dots on the step show predictions. The first stump predicts plus up to 2.5 and minus after it, missing sample 4, which is ringed. A single cut cannot reproduce both class reversals.
Start With Equal Weights
Each bar measures sample weight, initially 0.20; their sum is one. The cross identifies the only mistake. Weighted error is the sum of weights on mistakes, so . We use classic binary AdaBoost with labels and stump outputs ±1, no shrinkage, and . The first stump therefore receives vote weight .
Sample weight controls fitting; stump vote weight controls prediction. These are different quantities. The algorithm in Schapire's explanation specifies both.
Normalize the Update
Multiply each weight by . A hit multiplies by 0.5 and a miss by 2. Raw weights become 0.10, 0.10, 0.10, 0.40, 0.10. Divide by their sum, 0.80, to obtain 0.125, 0.125, 0.125, 0.50, 0.125. These sum to one. The bars keep the previous scale, 300 drawing units per unit weight. The dashed mark through bar 4 is its old 0.20 height.
Refit the Threshold
Both rows retain the feature scale of 100 drawing units per feature unit. Under the new weights, the old cut misses sample 4 and costs 0.50. The new cut at 4.5 predicts plus on its left and minus on its right; it misses sample 3 and costs only 0.125. Each makes one raw mistake, but the weighted errors differ. The new stump receives .
For reproducibility, we compare all midpoint thresholds in both polarities, including constant rules. Ties choose the smaller threshold, then plus on the left. That rule selects cut 2.5 in round one.
Reverse the Polarity
After the second normalized update, weights are 1/14, 1/14, 1/2, 2/7, 1/14. The bars retain the same weight scale. The third cut at 3.5 predicts minus on the left and plus on the right, preserving heavily weighted sample 3. It misses 1, 2, and 5: three mistakes with total weight , better than sacrificing the half-weight sample. Its vote weight is . Minimizing weighted error can increase the raw mistake count.
Add Signed Votes
For sample 4, stump outputs are −, +, +. Each horizontal arrow is a signed vote displacement; short dashed connectors carry the accumulated score into the next row. The long dashed guide is zero. At 160 drawing units per score unit, the path is . Taking the sign of the final score predicts plus, correcting the original mistake. The final arrow ends at a positive score; the model does not average numeric class IDs.
Check the Training Set
All five scores use one vertical scale of 100 drawing units per score unit, rising above zero for plus and falling below for minus. The totals are 1.016461, 1.016461, −0.369834, 0.929449, −1.016461. Their signs match the labels printed above. This is a training result only. Held-out evaluation is needed to choose rounds and base-model complexity; fitting this fixture in three rounds supplies no universal stopping rule. More rounds add fitting and inference work.
Predict Without Refitting
All three rows place the query at the same position. Here the feature origin shifts by 80 drawing units to leave room for row labels; the feature scale remains 100 per unit. The cuts are still 2.5, 4.5, and 3.5. Query 3.8 falls right, left, and right respectively, giving votes −, +, +. Its score is 0.929449 and prediction plus. No true label is supplied, so this demonstrates inference, not test accuracy. Training weights are not recomputed for the query.
A Stump Can Add Nothing
This separate boundary case has equal correct and mistaken weight: the two blocks each occupy half the total mass. Then gives , represented by a point with no displacement on the lower score axis. The stump adds no vote. Useful positive vote weights require error below one half. A perfect stump has error zero, so the logarithmic formula needs a stopping or special-case policy; it is not a finite ordinary update.
Where It Breaks
Replace the clean fixture with two equally weighted observations at the same feature value 4 but opposite labels. Any deterministic stump, and the resulting ensemble, must give the same prediction for both. Predicting plus misses the minus label; predicting minus misses the plus label. The best weighted error is one half. Reweighting disagreement cannot recover missing information or identify which label is wrong. In less symmetric noisy data, difficult or incorrect labels can attract extra weight without revealing their cause.
The Quick Version
- A stump can miss a class reversal.
- Uniform weights make raw and weighted error proportional.
- Normalize every sample-weight update.
- New weights change the best threshold.
- Weighted error can improve despite more raw mistakes.
- Combine signed stump votes.
- Training fit does not establish test accuracy.
- Fresh queries use the learned stumps unchanged.
- Error one half gives zero vote weight.
- Conflicting identical inputs impose irreducible error.