Why AdaBoost Changes Observation Weights
AdaBoost fits a sequence of weak classifiers. After one classifier is fitted, the algorithm changes the relative importance of the training observations before fitting the next one. Observations classified incorrectly receive increased relative weight; correctly classified observations receive decreased relative weight. The update does not change the observations or their labels. It changes how much each observation contributes to the next learner’s weighted classification error.
Let the training data consist of \(n\) pairs \((x_i,y_i)\), where \(y_i\in\{-1,+1\}\), and let \(h_t(x_i)\in\{-1,+1\}\) be the prediction of the learner at round \(t\). The current weights \(D_t(i)\) are nonnegative and sum to one. Thus, they form a probability distribution over the training observations, but they are algorithmic weights—not probabilities that the labels are correct.
The weighted error, rather than the fraction of observations misclassified, determines the update. If the weights are unequal, a learner that gets many low-weight observations wrong can have a smaller weighted error than one that gets fewer high-weight observations wrong.
Deriving the Observation-Weight Update
The update follows from AdaBoost’s exponential loss. Write the ensemble score before round \(t\) as \(F_{t-1}(x)\), with \(F_t(x)=F_{t-1}(x)+\alpha_t h_t(x)\). The contribution of observation \(i\) to the exponential loss is \(\exp[-y_iF_t(x_i)]\). The current weights are proportional to the corresponding loss contributions before the new learner is added.
For observation \(i\), the loss contribution after the update is \(\exp[-y_i(F_{t-1}(x_i)+\alpha_t h_t(x_i))]\).
Using \(\exp(a+b)=\exp(a)\exp(b)\), the new contribution is the old contribution multiplied by \(\exp[-\alpha_t y_i h_t(x_i)]\).
Divide each product by their sum \(Z_t\), so the new weights sum to one.
Since \(y_i h_t(x_i)=+1\) for a correct classification and \(-1\) for an incorrect classification, the multiplier is \(\exp(-\alpha_t)\) for a correct classification and \(\exp(\alpha_t)\) for an incorrect one. The resulting update is
For the standard AdaBoost coefficient, assuming \(0<\epsilon_t<1/2\),
This coefficient makes the total updated weight on the current learner’s incorrect observations equal to the total updated weight on its correct observations. To see why, the unnormalized total for correct observations is \((1-\epsilon_t)\exp(-\alpha_t)\), while the total for incorrect observations is \(\epsilon_t\exp(\alpha_t)\). Substituting the coefficient gives
Therefore \(Z_t=2\sqrt{\epsilon_t(1-\epsilon_t)}\), and normalization assigns total weight \(1/2\) to each group. Within either group, relative proportions are unchanged: observations in the same group all receive the same multiplier. In particular, this update does not make every misclassified observation equally weighted; it preserves the ratios of their current weights.
Worked Example: Updating Four Unequally Weighted Observations
A hypothetical classifier used to flag unusual claim records is being assessed on four training observations. Their current weights, in record order, are \(0.10, 0.20, 0.30, 0.40\). The learner misclassifies records 1 and 2 and correctly classifies records 3 and 4. Find the learner coefficient and all four next-round weights.
Method and weighted error. Add the current weights of the incorrect records: \(\epsilon_t=0.10+0.20=0.30\). The correct group has weight \(0.30+0.40=0.70\). Thus, \(\alpha_t=\frac12\log(0.70/0.30)=\frac12\log(7/3)\), approximately \(0.4236\).
Normalize the two groups. For this coefficient, each group receives total updated weight \(1/2\). Records 1 and 2 keep their relative proportions \(0.10:0.20=1:2\), so their updated weights are \((0.10/0.30)(1/2)=1/6\) and \((0.20/0.30)(1/2)=1/3\). Records 3 and 4 keep their proportions \(0.30:0.40=3:4\), so their weights are \((0.30/0.70)(1/2)=3/14\) and \((0.40/0.70)(1/2)=2/7\).
Check. The updated weights in record order are \((1/6,1/3,3/14,2/7)\). Their sum is \(7/42+14/42+9/42+12/42=42/42=1\); the incorrect records sum to \(1/2\), as do the correct records. The method avoids treating the observations as equally weighted before the update.
Applying the Update When the Error Is Weighted
A reliable calculation separates three quantities: the current weights, the weighted error, and the updated weights. First sum the weights on the misclassified observations. Then use that error to find \(\alpha_t\), if it is requested. Finally, allocate half of the normalized total to each prediction group while preserving the weights’ relative proportions within each group. The group-allocation method is equivalent to the multiplicative formula when the standard coefficient is used.
Worked Example: Raw Misclassification Count Versus Weighted Error
A hypothetical screening rule is evaluated on five records with current weights \((0.10,0.20,0.25,0.15,0.30)\). It misclassifies records 2 and 4 only. Calculate the weighted error and the next weights. Explain why counting errors alone is insufficient to determine the coefficient.
Weighted error. The two incorrect records have weights \(0.20\) and \(0.15\), so \(\epsilon_t=0.20+0.15=0.35\). The correct group has weight \(0.65\). There are two incorrect records out of five, but the weighted error is \(0.35\), not \(2/5\).
Coefficient. The learner coefficient is \(\alpha_t=\frac12\log(0.65/0.35)=\frac12\log(13/7)\), approximately \(0.3095\).
Updated weights. The incorrect records receive total weight \(1/2\) in their previous ratio \(0.20:0.15=4:3\). Their weights become \((0.20/0.35)(1/2)=2/7\) and \((0.15/0.35)(1/2)=3/14\). The correct records receive the other \(1/2\), in ratio \(0.10:0.25:0.30=2:5:6\). Their weights are \(1/13,5/26,3/13\), respectively. In record order, the answer is \((1/13,2/7,5/26,3/14,3/13)\).
Check. With denominator 182, the five weights are \(14/182,52/182,35/182,39/182,42/182\), which sum to one. The incorrect records sum to \(91/182=1/2\), and the correct records also sum to \(91/182=1/2\). The method avoids substituting the unweighted error rate for the weighted error.
Weights Carry Forward to the Next Round
The new weights are the starting weights for fitting the next learner. They do not reset to equal weights after each round. Consequently, an observation that has been misclassified may become relatively influential, but its weight is still determined by its current weight and the result of the latest learner. Correct classification in a later round can reduce its relative weight again.
Worked Example: Updating a Second Time
Use the four-record weights \((1/6,1/3,3/14,2/7)\) obtained in the first worked example as the current weights for a new hypothetical learner. This learner misclassifies records 1 and 3 and correctly classifies records 2 and 4. Find its weighted error, coefficient, and next weights.
Weighted error and coefficient. The error is \(1/6+3/14=7/42+9/42=16/42=8/21\). The correct group has weight \(1/3+2/7=7/21+6/21=13/21\). Therefore \(\alpha_t=\frac12\log[(13/21)/(8/21)]=\frac12\log(13/8)\), approximately \(0.2426\).
Redistribute within each group. Records 1 and 3 receive half the new total in their current ratio \(1/6:3/14=7:9\). Their new weights are \((7/16)(1/2)=7/32\) and \((9/16)(1/2)=9/32\). Records 2 and 4 receive the other half in ratio \(1/3:2/7=7:6\). Their new weights are \((7/13)(1/2)=7/26\) and \((6/13)(1/2)=3/13\).
Check. In record order, the weights are \((7/32,7/26,9/32,3/13)\). The incorrect group sums to \(16/32=1/2\), the correct group sums to \(13/26=1/2\), and the total is one. The method avoids restarting from equal weights when moving to a subsequent round.
Important Conditions and Common Traps
The usual coefficient formula assumes a binary classifier with labels coded as \(-1\) and \(+1\), and a learner whose weighted error is less than \(1/2\). If \(\epsilon_t=1/2\), then \(\alpha_t=0\), so the update makes no change. If \(\epsilon_t>1/2\), the coefficient from the formula is negative; when reversing the learner’s predictions is permissible, reverse them and use error \(1-\epsilon_t<1/2\). If \(\epsilon_t=0\), the formula has no finite coefficient. A perfectly accurate learner is a boundary case, typically handled by stopping or by an explicitly specified implementation rule, rather than by substituting zero into the formula.
A frequent sign error is to give the larger multiplier to correct classifications. For example, in the first worked example, reversing the multipliers would leave the correct group with unnormalized total \(0.70\exp(\alpha_t)\) and the incorrect group with \(0.30\exp(-\alpha_t)\). Since \(\exp(\alpha_t)=\sqrt{7/3}\) and \(\exp(-\alpha_t)=\sqrt{3/7}\), these totals are about \(1.0693\) and \(0.1964\), respectively—not equal. After normalization, this mistaken update would assign about \(0.8448\) to the correct group and \(0.1552\) to the incorrect group, the opposite of the intended emphasis.
- Do not use the raw fraction misclassified unless the current weights are equal. Compute the weighted error from the weights on the incorrect observations.
- Do not reverse the update direction. Incorrect classifications use the factor \(\exp(\alpha_t)\); correct classifications use \(\exp(-\alpha_t)\).
- Do not skip normalization. The unnormalized products are not the next weights, because they need not sum to one.
- Do not equalize individual weights. The standard update equalizes the total weight of the two groups, not the weight of each observation.
Check Your Understanding
For each problem, use normalized current weights and the standard AdaBoost coefficient when the weighted error is below one-half.
- Current weights are \((0.15,0.25,0.20,0.40)\), and a learner misclassifies records 1 and 3. Find the weighted error and the next weights in record order. (Answer: \(\epsilon_t=0.35\); weights \((3/14,5/26,2/7,4/13)\).)
- Current weights are \((0.05,0.15,0.30,0.50)\), and a learner misclassifies records 1 and 2. Find the next weights. (Answer: \((1/8,3/8,3/16,5/16)\).)
- Current weights are \((0.12,0.18,0.28,0.42)\), and a learner misclassifies records 2 and 4. If reversing the predictions is allowed, state the reversed learner’s error, coefficient, and next weights. (Answer: error \(0.40\), coefficient \(\frac12\log(1.5)\); weights \((0.15,0.15,0.35,0.35)\).)
- Start with weights \((0.10,0.20,0.30,0.40)\). A first learner misclassifies records 1 and 2. A second learner then misclassifies records 1 and 3. Find the weights after the second update. (Answer: \((7/32,7/26,9/32,3/13)\).)
- Current weights are \((0.08,0.12,0.20,0.24,0.36)\), and a learner misclassifies records 2 and 5. Find its weighted error and the updated weights. (Answer: \(\epsilon_t=0.48\); weights \((1/13,1/8,5/26,3/13,3/8)\).)