Bagging Ensemble
Bootstrap Aggregating Ensemble · Also known as: bootstrap aggregating
Bagging, short for bootstrap aggregating, is an ensemble method that reduces variance by training multiple copies of a single learning algorithm on different random subsets of the training data. Each subset is created via bootstrap sampling—randomly drawing samples with replacement. Predictions are combined through majority voting (classification) or averaging (regression). Introduced by Leo Breiman in 1996, bagging forms the foundation for random forests and is particularly effective for reducing overfitting in high-variance models.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use bagging when working with high-variance models (e.g., decision trees, neural networks) that tend to overfit. It is most effective when base learners are unstable—sensitive to small changes in training data. Bagging is less effective for low-bias, low-variance models (e.g., k-NN with small k, linear regression on stable data). It is also well-suited for parallel computing since each base learner can be trained independently.
Strengths & limitations
- Reduces variance without increasing bias, improving generalization.
- Works with any base learner type; can use unstable models like trees.
- Easily parallelizable—each bootstrap sample can be processed independently.
- Provides variance estimates through out-of-bag error calculation.
- Simple to implement with minimal hyperparameter tuning.
- Provides no bias reduction; only effective for high-variance base learners.
- Computational cost scales linearly with the number of base learners.
- Bootstrap samples lack diversity compared to deliberate sampling strategies.
- May not improve performance when base models have high bias (e.g., linear models on complex data).
Frequently asked
How many bootstrap samples (B) should I use?
Start with B = 50-100 and monitor performance; typically, benefits plateau around B = 100-500. Increase B if variance reduction stalls. For critical applications, B > 1000 may be justified despite computational cost.
What is out-of-bag error and how do I use it?
Each bootstrap sample excludes approximately 1/3 of the original data (about 36.8% on average). These out-of-bag samples can be used to validate that specific model without needing a separate validation set. Average out-of-bag errors across all models estimate generalization error.
Is bagging better than cross-validation?
They serve different purposes. Cross-validation estimates model performance; bagging improves it. Use bagging to train an ensemble and out-of-bag estimates to validate, avoiding the overhead of k-fold cross-validation.
Can bagging improve low-variance models like k-NN?
Not effectively. Bagging is designed for high-variance models. Low-variance models (stable, simple) benefit little from variance reduction. Consider other ensemble methods or focus on bias reduction instead.
Sources
- Breiman, L. (1996). Bagging predictors. Machine Learning, 24(2), 123-140. DOI: 10.1007/BF00058655 ↗
- Efron, B. (1979). Bootstrap methods: another look at the jackknife. The Annals of Statistics, 7(1), 1-26. DOI: 10.1214/aos/1176344552 ↗
How to cite this page
ScholarGate. (2026, June 3). Bootstrap Aggregating Ensemble. ScholarGate. https://scholargate.app/en/ensemble-learning/bagging-ensemble
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- AdaBoostMachine learning↔ compare
- Boosting EnsembleEnsemble Learning↔ compare
- Majority VotingEnsemble Learning↔ compare
- Random ForestMachine learning↔ compare