Tutorials › Statistical Learning (Graduate) › Real AdaBoost With Confidence-Rated Weak Rules

Boosting and Margin Bounds · Tutorial 825 of 989

Real AdaBoost With Confidence-Rated Weak Rules

Learn how Real AdaBoost turns weighted class masses into confidence-rated scores, updates example weights, and differs from discrete AdaBoost.

Advanced 11 min read

What You'll Learn

  • Define confidence-rated weak-rule scores and their relationship to weighted class proportions.
  • Derive the score that minimizes weighted exponential loss within a region.
  • Calculate Real AdaBoost’s weight update and round normalization factor.
  • Compare variable real-valued scores with discrete AdaBoost’s binary votes.
  • Handle zero-mass and empty regions without assigning unjustified finite scores.

From Binary Votes to Confidence-Rated Scores

Discrete AdaBoost assigns each example a weak-rule vote in \(\{-1,+1\}\), then chooses one scalar coefficient for that rule. Real AdaBoost instead allows the rule to report a confidence that varies across regions of the predictor space. A region with a strong weighted majority can receive a larger score than one with a narrow majority; regions favoring opposite classes receive scores with opposite signs.

Let the training data be \((x_i,y_i)\), \(i=1,\ldots,n\), with labels \(y_i\in\{-1,+1\}\). At round \(t\), let \(D_t(i)\geq 0\) be the current example weights, normalized so that \(\sum_{i=1}^nD_t(i)=1\). A real-valued weak rule supplies a score \(g_t(x)\). The ensemble score after \(T\) rounds is \(F_T(x)=\sum_{t=1}^T g_t(x)\), and its binary prediction is based on the sign of \(F_T(x)\).

Definition: A confidence-rated weak rule assigns a real score \(g(x)\) to an input \(x\), with positive scores favoring label \(+1\), negative scores favoring label \(-1\), and magnitude representing the strength of that preference. In the common parameterization by a confidence \(r(x)\in[-1,1]\), the corresponding score, when \(|r(x)|<1\), is \(g(x)=\frac{1}{2}\log\!\left(\frac{1+r(x)}{1-r(x)}\right)\). The score is additive in the ensemble; it is not itself a probability.

The score formula is the inverse hyperbolic tangent of \(r(x)\). Equivalently, if a region has positive and negative weighted class masses \(W_+\) and \(W_-\), its confidence is \(r=(W_+-W_-)/(W_++W_-)\), provided \(W_++W_->0\). Substitution gives \(g=\frac12\log(W_+/W_-)\) when both masses are positive. The score is therefore a log-odds quantity, not the raw confidence \(r\).

Deriving the Real-Valued Update

Suppose a candidate weak rule divides the inputs into regions and assigns one constant score \(g_j\) on each region \(A_j\). Define the current weighted class masses in a region by

$$ W_{j,+}=\sum_{i:x_i\in A_j,\ y_i=+1}D_t(i), \qquad W_{j,-}=\sum_{i:x_i\in A_j,\ y_i=-1}D_t(i). $$

The weighted exponential loss contributed by \(A_j\) is \(W_{j,+}e^{-g_j}+W_{j,-}e^{g_j}\). The first term is the contribution of positive examples, whose loss decreases as the score increases; the second is the contribution of negative examples, whose loss decreases as the score decreases.

Theorem: If \(W_{j,+}>0\) and \(W_{j,-}>0\), the unique finite score minimizing the region’s weighted exponential loss is \(g_j^*=\frac12\log(W_{j,+}/W_{j,-})\). Its minimum loss is \(2\sqrt{W_{j,+}W_{j,-}}\).

To prove the result, write \(L_j(g)=W_{j,+}e^{-g}+W_{j,-}e^g\). Its first and second derivatives are

$$ L_j'(g)=-W_{j,+}e^{-g}+W_{j,-}e^g, \qquad L_j''(g)=W_{j,+}e^{-g}+W_{j,-}e^g>0. $$

Strict positivity of the second derivative makes any stationary point the unique global minimizer. Solving \(L_j'(g)=0\) gives \(e^{2g}=W_{j,+}/W_{j,-}\), hence \(g_j^*=\frac12\log(W_{j,+}/W_{j,-})\). At this score, \(W_{j,+}e^{-g_j^*}=\sqrt{W_{j,+}W_{j,-}}\) and \(W_{j,-}e^{g_j^*}=\sqrt{W_{j,+}W_{j,-}}\). Adding the two terms gives the stated minimum. \(\square\)

Applying this calculation separately in each region yields a score function \(g_t\). The normalized example-weight update and its normalizing factor are

$$ Z_t=\sum_{i=1}^n D_t(i)e^{-y_i g_t(x_i)}, \qquad D_{t+1}(i)=\frac{D_t(i)e^{-y_i g_t(x_i)}}{Z_t}. $$

Thus examples that the score handles poorly receive more weight relative to those it handles well. Since \(Z_t\) is the weighted exponential loss of the chosen rule, a smaller value means a larger reduction in that round’s normalized exponential loss.

Worked Example: The Score in a Single Region

In one region, suppose the current weights of the positive examples sum to \(W_+=0.30\), while those of the negative examples sum to \(W_-=0.20\). Find the minimizing score, its confidence parameter, and the region’s minimum loss.

Both masses are positive, so the theorem applies. The score is

$$ g^*=\frac12\log\left(\frac{0.30}{0.20}\right) =\frac12\log(1.5)\approx 0.2027. $$

The corresponding confidence is \(r=(0.30-0.20)/(0.30+0.20)=0.20\). Indeed, \(\frac12\log((1+0.20)/(1-0.20))=\frac12\log(1.5)\), matching the score.

The minimum loss is \(2\sqrt{0.30(0.20)}=2\sqrt{0.06}\approx0.4899\). Direct substitution checks the result: \(0.30e^{-0.2027}\approx0.2449\) and \(0.20e^{0.2027}\approx0.2449\), for a sum of approximately \(0.4899\). A zero score would give loss \(0.30+0.20=0.50\), so the fitted score reduces it.

How a Round Compares With Discrete AdaBoost

In discrete AdaBoost, a weak rule \(h(x)\in\{-1,+1\}\) receives a single coefficient \(\alpha\), so its score is \(g(x)=\alpha h(x)\). If its weighted error is \(\varepsilon=\sum_iD_t(i)\mathbf{1}\{y_i\ne h(x_i)\}\), and \(0<\varepsilon<1\), the round’s loss as a function of \(\alpha\) is

$$ Z(\alpha)=(1-\varepsilon)e^{-\alpha}+\varepsilon e^\alpha. $$

Differentiating and setting the derivative to zero gives \(\alpha=\frac12\log((1-\varepsilon)/\varepsilon)\), and substitution gives \(Z=2\sqrt{\varepsilon(1-\varepsilon)}\). For Real AdaBoost, each region gets its own score based on its two weighted class masses. A constant binary vote is a special case of a real score, but real scores need not have the same magnitude in every region.

Worked Example: A Real-Valued Rule and a Discrete Vote

A rule divides the weighted data into regions \(A\) and \(B\). In \(A\), the positive and negative masses are \(0.45\) and \(0.05\); in \(B\), they are \(0.15\) and \(0.35\). The total mass is \(1\). Calculate the optimal Real AdaBoost scores and compare their round loss with the discrete vote that predicts positive in \(A\) and negative in \(B\).

For \(A\), \(g_A=\frac12\log(0.45/0.05)=\frac12\log 9=\log 3\approx1.0986\). For \(B\), \(g_B=\frac12\log(0.15/0.35)=\frac12\log(3/7)\approx-0.4236\). The different magnitudes reflect the different degrees of weighted class imbalance.

The minimum loss in \(A\) is \(2\sqrt{0.45(0.05)}=2\sqrt{0.0225}=0.30\). In \(B\), it is \(2\sqrt{0.15(0.35)}=2\sqrt{0.0525}\approx0.4583\). The full round factor is therefore \(Z_t\approx0.7583\).

The discrete vote makes errors of mass \(0.05\) in \(A\) and \(0.15\) in \(B\), so \(\varepsilon=0.20\). Its optimal coefficient is \(\alpha=\frac12\log(0.80/0.20)=\frac12\log4=\log2\approx0.6931\), and its round factor is \(2\sqrt{0.20(0.80)}=0.80\). The real-valued scores achieve a smaller exponential loss, \(0.7583<0.80\), because they adjust the score magnitude separately in the two regions.

The round factors also connect the sequence of real-valued updates to training error. Start with \(D_1(i)=1/n\), and define \(F_T(x)=\sum_{t=1}^Tg_t(x)\). Repeatedly applying the update gives

$$ D_{T+1}(i)=\frac{\exp(-y_iF_T(x_i))}{n\prod_{t=1}^T Z_t}. $$

This identity follows by induction: it holds at \(T=0\) with an empty product equal to \(1\); multiplying the expression at round \(T-1\) by \(e^{-y_i g_T(x_i)}/Z_T\) gives the expression at round \(T\). Since the weights sum to one, rearrangement yields \(\frac1n\sum_i e^{-y_iF_T(x_i)}=\prod_{t=1}^TZ_t\).

Result: If training error counts every example with \(y_iF_T(x_i)\leq0\) as an error, then its fraction is at most \(\prod_{t=1}^TZ_t\). For each such example, \(e^{-y_iF_T(x_i)}\geq1\); summing these terms and dividing by \(n\) proves the bound.

Zero-Mass Regions and Practical Interpretation

The finite-score formula requires both class masses in a region to be positive. If exactly one mass is zero and the other is positive, there is no finite minimizing score: the loss decreases toward zero as the score tends without bound in the direction of the class with positive mass. If both masses are zero, the region contributes zero loss for every finite score. These are distinct cases; an empty region does not have a score forced by the loss.

Worked Example: Pure and Empty Regions

Consider a region with \(W_+=0.25\) and \(W_-=0\). Its loss is \(L(g)=0.25e^{-g}\). For every finite \(g\), this is positive, but taking \(g\) larger makes the loss approach zero. Thus the infimum is zero and no finite score attains it. The direction is positive because only positive-class mass is present.

If instead \(W_+=0\) and \(W_-=0.25\), then \(L(g)=0.25e^g\), which approaches zero as \(g\) tends to negative infinity. Again, no finite minimizing score exists, and the direction favors the class with positive mass.

Finally, if \(W_+=W_-=0\), then \(L(g)=0e^{-g}+0e^g=0\) for every finite \(g\). Every finite score minimizes the loss contribution. In implementations, score clipping or smoothing can avoid unbounded scores, but it changes the exact minimization problem and should be recognized as a practical modification.

Common Mistake

A common mistake is to treat Real AdaBoost’s confidence \(r\), score \(g\), and class probability as interchangeable. They are not. The confidence \(r\) lies between \(-1\) and \(1\), while the associated score is a log-odds transformation that can be any real number; neither quantity should automatically be reported as a probability. Another error is to apply \(\frac12\log(W_+/W_-)\) when a mass is zero. The derivation requires two positive masses, and the correct boundary behavior depends on whether one mass or both masses vanish.

The central contrast is that discrete AdaBoost uses one vote magnitude for a weak rule, whereas Real AdaBoost can fit different signed magnitudes across regions. Both updates reweight examples through the exponential loss, but the real-valued rule uses local weighted class balance to decide how strongly each region contributes to the ensemble score.

Check Your Understanding

Use the definitions and derivations above to answer these questions.

  1. For positive class masses \(W_+=0.18\) and \(W_-=0.02\), calculate the minimizing score and the minimum region loss.
  2. Why is the confidence parameter \((W_+-W_-)/(W_++W_-)\) not the same quantity as the score?
  3. For a discrete weak rule with weighted error \(\varepsilon=0.10\), calculate its optimal coefficient and round factor.
  4. What happens to the minimizing score when \(W_+=0\) and \(W_->0\)? Explain why there is no finite minimizer.
  5. Explain why a region with both weighted class masses zero differs from one with exactly one positive mass.
Clinical Biostats