Boosting & AdaBoost
Source: Unit 3 §3
Boosting: the core idea
Boosting trains learners sequentially, each one learning from the mistakes of the previous one, and combines them with weights derived from accuracy or variance.
- Let a hypothesis misclassify some instances. The next learner is told "get 's misclassified instances right" - by increasing the weights of the misclassified samples and decreasing the weights of the correctly classified ones.
- All sample weights must sum to 1.
- The weak learner is often a decision stump: one node, a single binary split. Boosting learns slowly and incrementally.
- The final classifier is a weighted summation of all the individual classifiers.
Boosting vs bagging
| Bagging | Boosting | |
|---|---|---|
| Sampling | Every element has an equal probability | Observations are weighted, so some appear more often |
| Learners | Parallel, independent | Sequential, each learns from the previous |
| Goal | Reduce variance | Reduce bias (and variance) |
| Popular example | Random Forest | AdaBoost |
AdaBoost: the algorithm
AdaBoost uses two sets of weights: instance weights (one per data point) and hypothesis weights (one per learner).
- Start from ONE dataset. Initialize every instance weight to , where is the number of instances.
- For a binary classifier, encode the labels as +1 (true) and −1 (false).
- Build many decision stumps and choose the one with the lowest error rate; call it .
- Compute the error rate , the weighted percentage of misclassified examples.
- Compute the hypothesis weight .
- Update the instance weights: up-weight the misclassified, down-weight the correct, then normalize so they sum to 1.
- Repeat, so the next stump focuses on the previous stump's errors.
- Finish with a weighted vote of all the hypotheses.
The formulas
Error of the -th classifier, where if and 0 otherwise:
Hypothesis weight, also called the stump weight:
Instance weight update, then normalize by so the weights sum to 1:
- Correctly classified - , so multiply by and the weight decreases.
- Misclassified - , so multiply by and the weight increases.
Final hypothesis:
Worked arithmetic
- Suppose the total weighted error is .
- .
- .
- .
- The next round from the slides: .
The slide gives , but the formula gives , which is 0.66. The method is unaffected and the four-round example below still comes out positive either way - instead of - but quote 0.66 if you are asked to compute it yourself. The slide's 0.65 is kept below only because that is the number its worked example carries.
- The four hypothesis weights are .
- The four stumps vote on this instance.
- Weighted sum: .
- , so the instance is labelled true and is correctly classified.
Alpha versus error
| Error rate ε | Stump weight α | What it means |
|---|---|---|
| 0 | +∞ | A perfect classifier gets a huge weight |
| 0.5 | 0 | A coin toss is useless, so it gets zero weight |
| 1 | −∞ | Always wrong, so its vote is strongly negated |
The stump weight is derived by taking the partial derivative of the error with respect to the error. The shape that falls out is the one plotted above: better classifiers, meaning lower , get higher weight.
Unlike bagging, boosting can overfit. That is exactly why the hypothesis weights exist: they temper how much each learner is allowed to contribute to the final vote.