The interview problem

Practice prompt

Show how a binary weak learner changes example weights in AdaBoost.

Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.

1. Scope and worked approach

For labels and predictions in {−1,+1}, weighted error ε gives α=0.5 log((1−ε)/ε). Multiply each weight by exp(−α y h(x)), then normalize. The rule emphasizes current mistakes under the stated convention.

2. Trace the design or derivation

Weighted error
  → learner coefficient
  → exponential reweight
  → normalize

The final prediction combines weighted learner votes; it is not simply the latest learner. Compare training improvements with held-out performance because repeatedly emphasizing mislabeled examples can reduce generalization despite continued optimization of the training objective.

3. Calculate the example

At ε=0.25, α=0.5 log 3≈0.5493. Misclassified weights gain factor √3 and correct weights factor 1/√3, so their relative multiplier is 3.

4. Failure cases and trade-offs

A learner with error at least 0.5 is not useful under this orientation. Noise can attract excessive weight; perfect error requires careful stopping rather than division by zero.

5. Validation, follow-ups and self-review

Trace a four-example weighted dataset. Follow-up: how does shrinkage change the ensemble? Self-review: explain signed labels, normalization and edge cases.

Sources and related practice

Technical reference: scikit-learn.org — AdaBoost ensemble context; binary exponential update derived independently.

Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.

Continue with Decision trees, random forests, and boosting; Class imbalance and decision thresholds.

Continue your preparation

Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.