Skip to main content

Ensemble Learning: Cheat Sheet

The whole topic compressed for the night before the exam.

Ensembles​

FactsWhy a committee beats a member
  • Combine weak learners (accuracy slightly above 50%) into a strong learner.
  • It only works if the learners' errors are independent.
  • Averaging nn independent observations gives Var⁡(Zˉ)=σ2/n\operatorname{Var}(\bar{Z}) = \sigma^2 / n.

Bagging​

NumbersBagging in one card
  • Sample with replacement; the learners are parallel and independent.
  • About 63% in-bag, about 37% out-of-bag, because (1−1/n)n→1/e≈0.368(1 - 1/n)^n \to 1/e \approx 0.368.
  • OOB error is close to leave-one-out cross-validation, with no separate validation set.
  • Roughly 100 learners are usually enough.

Boosting​

FactsBoosting in one card
  • Sequential: each learner focuses on the previous learner's errors by up-weighting the misclassified points.
  • The weak learner is typically a decision stump.
  • Bagging reduces variance; boosting reduces bias, and can overfit.

AdaBoost​

εm=∑nwn⋅I(wrong)αm=12ln⁡ ⁣(1−εε)\varepsilon_m = \sum_n w_n \cdot I(\text{wrong}) \qquad \alpha_m = \frac{1}{2}\ln\!\left(\frac{1-\varepsilon}{\varepsilon}\right) wi+1=wi⋅e−α⋅actual⋅pred(then normalize)H(x)=sign⁡ ⁣(∑mαmhm(x))w_{i+1} = w_i \cdot e^{-\alpha \cdot \text{actual} \cdot \text{pred}} \quad (\text{then normalize}) \qquad H(x) = \operatorname{sign}\!\left(\sum_m \alpha_m h_m(x)\right)
NumbersThe three anchor values for α
  • ε=0⇒α=+∞\varepsilon = 0 \Rightarrow \alpha = +\infty.
  • ε=0.5⇒α=0\varepsilon = 0.5 \Rightarrow \alpha = 0.
  • ε=1⇒α=−∞\varepsilon = 1 \Rightarrow \alpha = -\infty.
  • Worked: ε=0.3⇒α=12ln⁡(2.333)=0.42\varepsilon = 0.3 \Rightarrow \alpha = \tfrac{1}{2}\ln(2.333) = 0.42.
Exam cueThe three-way sort

Manipulate the data distribution means bagging or boosting; manipulate the input features means random forests; manipulate the class labels means error-correcting output coding.

0%0 of 70 pages studied