2.3.11Tree-Based & Instance Methods

AdaBoost algorithm

553 words3 min readdifficulty · medium

What is a weak learner?

The final AdaBoost classifier is a **weighted vote

Figure — AdaBoost algorithm

Concept Map

combines

built

start with

measures

sets

used to

focus on

derived from

combined into

grows on mistakes

contrasts with

AdaBoost = Adaptive Boosting

Weak Learners = stumps depth 1

Trained sequentially

Sample weights w_i

Weighted error e_m

Vote power alpha_m

Re-weight data

Weighted vote H of x

Exponential loss e^-yf

Overfits noisy data

Bagging = parallel

Hinglish (regional understanding)

Intuition Hinglish mein samjho

AdaBoost ka core idea simple hai: ek hi bada strong model banane ke bajaye, hum bahut saare weak learners (aksar depth-1 decision stumps) ko ek-ek karke banate hain. Har stump bas coin-flip se thoda accha hona chahiye. Magic yeh hai ki har round ke baad hum un data points ka weight badha dete hain jinhe pichle learner ne galat classify kiya — yaani "in par zyada dhyan do". Isliye agla learner un mushkil examples par focus karta hai. Yeh "adaptive" behaviour hi naam mein hai.

Do knobs important hain. Pehla: sample weight wiw_i — galat point ka weight e+αe^{+\alpha} se multiply hokar badhta hai, sahi point ka eαe^{-\alpha} se ghatta hai. Dusra: har learner ka vote power αm=12ln1εmεm\alpha_m = \tfrac12\ln\frac{1-\varepsilon_m}{\varepsilon_m}. Jitna accurate learner (chhota ε\varepsilon), utna loud vote. Agar ε=0.5\varepsilon=0.5 (random), toh α=0\alpha=0 — us learner ko ignore kar dete hain. Yeh formula aasman se nahi aaya: yeh exponential loss eyf(x)e^{-yf(x)} ko greedily minimize karne se derive hota hai, isliye y{1,+1}y \in \{-1,+1\} rakhte hain taaki yh(x)yh(x) correct pe +1+1 aur wrong pe 1-1 ho.

Final prediction ek weighted vote hai: H(x)=sign(mαmhm(x))H(x)=\operatorname{sign}(\sum_m \alpha_m h_m(x)). Yaad rakho: yeh bagging se alag hai — bagging parallel aur independent hota hai (variance kam), boosting sequential aur dependent hota hai (bias kam). Ek warning: noisy data / outliers pe AdaBoost overfit kar sakta hai, kyunki galat labels ka weight exponentially bada ho jaata hai. Exam aur interviews mein loop yaad rakhna: WEIGH → ERR → VOTE → RE-WEIGH.

Test yourself — Tree-Based & Instance Methods