Ensemble learning

Model averaging and SuperLearner

Published

November 20, 2026

Why combining models helps: ensemble risk equals average risk minus diversity; model averaging with weights; SuperLearner (stacking) with cross-validated predictions and a meta-learner. Bagging, random forests and boosting (Lecture 10) are the tree-based members of this family.

📖 Assigned reading: ISLR §8.2


📊 Slides

🧪 Lab

Live, in-browser R lab — runs entirely in your browser via webR, no local R install needed.

  • 🧪 Lab: Bike-share demand (live R) — fit five different models, then combine them by averaging and by stacking (SuperLearner). Check the identity ensemble risk = average risk − diversity on real data, and see when a combination beats the best single model and when it does not. A “Download my code” button captures whatever you’ve written before you leave.