0/70 completed
Core Statistical Model Interactive

Ensemble Methods

Combine multiple models for better predictions. Ensembles reduce variance, improve robustness, and often outperform any single model.

๐Ÿง  Why Ensembles Work

๐Ÿ“‰

Reduce Variance

Averaging predictions smooths out noise from individual models.

๐ŸŽฏ

Reduce Bias

Different models capture different patterns in the data.

๐Ÿ›ก๏ธ

Robustness

Less sensitive to outliers and edge cases.

Individual Models

Model 1 Accuracy (%) 68
50 80
Model 2 Accuracy (%) 65
50 80
Model 3 Accuracy (%) 62
50 80

Ensemble Settings

Model Correlation 0.3
0 0.9

Lower correlation = more diversity = bigger ensemble boost

Weights

Model 1 Weight 0.4
0.1 0.6
Model 2 Weight 0.35
0.1 0.6
Model 3 Weight 0.25
0.1 0.6
Total Weight 100%

Accuracy Comparison

Model 1
67%
Model 2
61%
Model 3
67%
Ensemble
65%
Ensemble Boost +-2%

vs best individual model

Accuracy Breakdown

The Diversity Principle

High Correlation (Bad)

Models make same errors. Ensemble = single model. No diversity benefit.

Low Correlation (Good)

Models make different errors. Errors cancel out. Maximum diversity benefit.

๐Ÿ”ง Ensemble Methods

๐ŸŽ’

Bagging

Train on bootstrap samples, average predictions

Example: Random Forest
๐Ÿš€

Boosting

Sequential training, focus on errors

Example: XGBoost, LightGBM
๐Ÿ“š

Stacking

Meta-model learns to combine base models

Example: Blending layers
๐Ÿ—ณ๏ธ

Voting

Simple majority or weighted vote

Example: VotingClassifier

๐Ÿ€ Sports Pricing Applications

Player Projection Ensemble

  • โ†’ Model 1: Season average regression
  • โ†’ Model 2: Recent form weighted
  • โ†’ Model 3: Matchup-based adjustment
  • โ†’ Ensemble: Weighted combination

Win Probability Ensemble

  • โ†’ Model 1: Elo ratings
  • โ†’ Model 2: Vegas line implied
  • โ†’ Model 3: Advanced stats model
  • โ†’ Ensemble: Calibrated blend

R Code Equivalent

# Simple weighted ensemble
weighted_ensemble <- function(predictions, weights) { 
  # predictions: list of model predictions
  # weights: vector of weights (should sum to 1)
  
  ensemble <- Reduce(`+`, Map(`*`, predictions, weights))
  return(ensemble)
}

# Stacking with meta-learner
library(caret)
stack_models <- function(train_data, models) { 
  # Get predictions from base models
  base_preds <- lapply(models, function(m) predict(m, train_data))
  meta_features <- do.call(cbind, base_preds)
  
  # Train meta-learner
  meta_model <- train(meta_features, train_data$y, method = "glm")
  return(meta_model)
}

# Example
weights <- c(0.4, 0.35, 0.25)
ensemble_pred <- weighted_ensemble(
  list(model1_pred, model2_pred, model3_pred),
  weights
)

โœ… Key Takeaways

  • โ€ข Ensembles usually beat single models
  • โ€ข Diversity is keyโ€”uncorrelated errors cancel
  • โ€ข Weight by performance or learn meta-model
  • โ€ข Bagging reduces variance, boosting reduces bias
  • โ€ข Stacking is most flexible but complex
  • โ€ข Blend different model types for best results

Pricing Models & Frameworks Tutorial

Built for mastery ยท Interactive learning