MACHINE LEARNING/Student Engineering Notebook
Page 07·notes
DECISION TREES (ID3, CART) & ENSEMBLE METHODS—~30 MIN READ

Ensemble Learning: Random Forests, Bagging & AdaBoost

Optional enrichment; ensemble methods are not named in the GATE 2027 DA ML list

“Bootstrap aggregation, decorrelating trees, out-of-bag validation, and adaptive sample reweighting.”

1.The Variance-Reduction Mechanics of Ensembles

Bagging (Bootstrap Aggregation):

Draws B independent bootstrap samples with replacement from training dataset D, fits a deep high-variance tree to each, and aggregates by voting (classification) or averaging (regression).

If individual trees have variance sigma^2 and pairwise correlation rho, the ensemble variance is: Var(Ensemble) = rho sigma^2 + [ (1 - rho) / B ] sigma^2.

Random Forest Innovation: By forcing each tree node to choose from a random subset of sqrt(d) features, trees are decorrelated, significantly lowering rho and crushing variance.

WORKED EXAM ANALYSIS · STEP-BY-STEP DERIVATION

2. Worked Practice Problem: AdaBoost Classifier Weighting

⚠️ Pitfall Warning:

If an error rate eps_m >= 0.5, the weak learner performs no better than random guessing.

Problem: An AdaBoost weak learner produces a training error rate eps = 0.20 on weighted training data. Compute the stage weight alpha assigned to this learner.

Step 1: Write AdaBoost weight formula:

alpha = (1/2) * ln[ (1 - eps) / eps ]

Step 2: Substitute eps = 0.20:

(1 - 0.20) / 0.20 = 0.80 / 0.20 = 4.0

Step 3: Compute natural logarithm:

ln(4.0) ≈ 1.3863

Step 4: Compute alpha:

alpha = (1/2) * 1.3863 = 0.69315.

Interpretation: Because the learner error was low (20%), it receives a positive vote weight of ~0.69 in the final majority decision.

WORKED NUMERICAL · STUDENT DERIVATION✎ Key Takeaway: Ensembles help only if the members' mistakes aren't strongly correlated. That's why bagging uses different bootstrap samples.

Worked example: majority vote of three classifiers

Problem Statement:
Three independent classifiers are each right 70% of the time. How often is their majority vote right?
Step 1: All three right

0.7³.

0.343
Step 2: Exactly two right

3 · 0.7² · 0.3.

0.441
Step 3: Majority right

0.343 + 0.441.

0.784
Final Answer:78.4%
STUDENT PRACTICE · CONCEPT DRILL

Practice: test yourself

Original practice questions in the GATE style, with worked explanations. Not past-paper questions.

Problem 1 · FOUNDATION

Bagging mainly reduces:

Problem 2 · GATE-LEVEL

In AdaBoost, after each round, examples the current model gets wrong:

Problem 3 · TRICKY

A bootstrap sample of n examples (drawn with replacement) leaves out about what fraction of the original data, for large n? Round to 3 decimal places.

SOURCE TRANSPARENCY & CITATIONS

Primary Academic References & Exam Sources

Every concept in Notes From a B.Tech Brain is synthesized from authoritative academic texts, seminal peer-reviewed research, verified exam archives, and renowned university lectures.

Curated University Lecture Series
The Elements of Statistical Learning (2nd Edition) ·
LECTURE SERIES