Ensemble

Ensemble Learning is the strategy of combining multiple machine learning models to produce better predictive performance than any single model alone — based on the "wisdom of crowds" principle that independent errors from different models cancel each other out when aggregated, with three major paradigms: Bagging (train models in parallel on random subsets to reduce variance — Random Forest), Boosting (train models sequentially to fix predecessors' errors — XGBoost), and Stacking (train a meta-model to optimally combine diverse base models).

What Is Ensemble Learning?

  • Definition: A machine learning approach that combines the predictions of multiple "base learners" (individual models) through voting, averaging, or learned combination to produce a final prediction that is more accurate, robust, and stable than any individual model.
  • Why It Works: If Model A makes mistakes on cases 1-10 and Model B makes mistakes on cases 11-20, combining them eliminates mistakes on all 20 cases. The key requirement is that models make different errors (diversity).
  • The Math: For N independent models each with error rate ε, the ensemble error rate (majority vote) drops exponentially: $P(error) = sum_{k=lceil N/2 \rceil}^{N} \binom{N}{k} \varepsilon^k (1-\varepsilon)^{N-k}$. With 21 models at 40% individual error, majority vote achieves ~18% error.

Three Paradigms

ParadigmTrainingGoalKey Algorithm
BaggingParallel (independent models on bootstrap samples)Reduce variance (overfitting)Random Forest
BoostingSequential (each model fixes previous errors)Reduce bias (underfitting)XGBoost, LightGBM, AdaBoost
StackingLayered (meta-model combines base predictions)Optimal combination of diverse modelsStacked generalization

Bagging vs Boosting

PropertyBaggingBoosting
TrainingParallel (independent)Sequential (dependent)
FocusReduce varianceReduce bias + variance
Overfitting riskLow (averaging reduces it)Higher (sequential fitting can overfit)
Typical base modelFull decision treesShallow trees (stumps)
SpeedParallelizableSequential (harder to parallelize)
ExampleRandom ForestXGBoost, LightGBM

Aggregation Methods

MethodTaskHow
Hard VotingClassificationMajority class label wins
Soft VotingClassificationAverage predicted probabilities, pick highest
AveragingRegressionMean of all model predictions
Weighted AveragingBothModels with higher validation scores get more weight
StackingBothMeta-model learns optimal combination

Why Ensembles Dominate Competitions

CompetitionWinning Solution
Netflix Prize ($1M)Ensemble of 800+ models
Most Kaggle tabular competitionsXGBoost/LightGBM ensemble
ImageNet 2012+Ensemble of multiple CNNs

Ensemble Learning is the most reliable strategy for maximizing predictive performance — combining the diverse strengths of multiple models through parallel training (bagging), sequential error correction (boosting), or learned combination (stacking) to produce predictions that are more accurate, more robust, and more stable than any single model can achieve alone.

Take ensemble further

Ask the copilot about this term, or have our engineers assess it against your process.