intermediateadvanced-ml

Ensemble Methods (Bagging vs Boosting)

Why trust one model when you can average the opinions of a hundred?

Key Points

What it is

An ensemble combines predictions from multiple models to get a result that is usually better than any single model. Bagging trains many models in parallel on random subsets of data and averages them to reduce variance. Boosting trains models sequentially, where each new model focuses on fixing the previous one's mistakes, reducing bias.

Why it exists

A single model — especially a decision tree — is prone to either high variance (overfitting) or high bias (underfitting). Ensembles were built on a simple statistical truth: averaging many imperfect, semi-independent guesses cancels out individual errors and produces a more reliable answer than any one guess alone.

Intuition

Ask one doctor for a diagnosis and you get one opinion, possibly wrong. Ask 100 doctors, each with slightly different training and experience, and take the majority vote — the group is right more often than any individual, especially if their mistakes aren't all the same mistake. Bagging is like asking 100 independent doctors. Boosting is like asking doctors one at a time, where each new doctor is specifically asked to focus on the cases the previous doctors got wrong.

When to use

When not to use

Common mistakes

Notes

In practice

Random Forest and Gradient Boosting variants (XGBoost, LightGBM, CatBoost) are the default go-to for tabular data competitions and production models because they consistently outperform single models with reasonable tuning effort.

Was this concept helpful?

Spot an error or gap? Suggest an edit →

Related concepts

random-forestgradient-boostingadaboostbias-variance-tradeoff
Chirp at me!