Back to the 2025 paper

Unit 4: Advanced Topics & Clustering

20257m

Compare bagging, AdaBoost, and gradient boosting. Discuss how each method reduces bias and variance and improves model performance.

Worked SolutionAI Assisted

Bagging vs AdaBoost vs Gradient Boosting:

Bagging (Bootstrap Aggregating):

  • Parallel, bootstrap samples, full trees, reduces variance by averaging (Random Forest). Each model independent, weight equal. Robust to overfit, handles noisy data well. Example: M=100M=100 trees vote.

AdaBoost (Adaptive Boosting — Freund & Schapire):

  • Sequential, adaptively reweights samples: increase weight for misclassified, decrease for correct. Weak learners typically stumps (depth=1depth=1). Final: F(x)=∑αtht(x)F(x)=\sum \alpha_t h_t(x), αt=12ln⁡((1−ϵt)/ϵt)\alpha_t=\frac12\ln((1-\epsilon_t)/\epsilon_t). Minimizes exponential loss ∑exp⁡(−yF(x))\sum \exp(-yF(x)).
  • Reduces bias (and some variance), very effective but sensitive to noise/outliers (weights blow up).

Gradient Boosting (Friedman — GBM, XGBoost):

  • Sequential, fits new learner to residual / negative gradient of loss: ri(m)=−∂L(yi,Fm−1(xi))/∂Fm−1r_i^{(m)} = -\partial L(y_i,F_{m-1}(x_i))/\partial F_{m-1}. For squared loss r=y−Fr=y-F, for logistic gradient. Update $F_m=F_{m-1}+
    u \gamma_m h_m(x)( (
    u$ shrinkage).
  • Reduces bias, flexible (any differentiable loss), often strongest accuracy, needs careful tuning ( MM, learning rate, depth, regularization) to avoid overfit. XGBoost adds second-order Taylor, leaf weight regularization Ω=γT+12λ∣∣w∣∣2\Omega=\gamma T+\frac12\lambda||w||^2.

Bias-Variance:

  • Bagging — primarily variance reduction (averaging decorrelated trees); slight bias increase if bootstrap.
  • Boosting — primarily bias reduction (sequentially correcting errors); variance can increase if too many iterations, controlled by shrinkage/early stopping.

Choosing: Noisy, limited tuning time → Bagging/RF. Max accuracy, structured data → Gradient Boosting/XGBoost/LightGBM. Very weak stumps + exponential loss → AdaBoost (now largely superseded by GBM).

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.