HomeAI & Machine LearningStacking Ensembles: Meta-Learner Blending

Stacking Ensembles: Meta-Learner Blending

Interactive 3D stacking-ensemble simulator: three real base learners (kernel k-NN, logistic regression, decision stump) feed a trained meta-learner, and you can switch between naive in-sample stacking and honest K-fold cross-validated stacking to watch the overfitting gap appear or vanish.

AI & Machine Learning3DAdvanced60 FPS📱 Mobile-adapted⇄ 2D version
ds-topic-39 ↗ Open standalone

Stacked generalization combines several different models by training a second-level "meta-learner" on top of their predictions rather than simply averaging or voting. This simulator fits three genuinely different base learners — a kernel-weighted nearest-neighbor classifier, a gradient-descent logistic regression, and a threshold-search decision stump — on the same synthetic two-class dataset, then trains a logistic-regression meta-learner on their combined output as a real 3D bar-chart probability surface over the feature plane. Switching between naive in-sample stacking and honest K-fold cross-validated stacking reproduces one of the most common real-world ensembling mistakes: training the meta-learner on predictions that already leaked information about the training labels, which inflates fit accuracy while held-out test accuracy stays flat or drops — the generalization gap made visible.

⚙ Under the hood

Train three real base learners — kernel k-NN, logistic regression and a decision stump — then blend them with a logistic-regression meta-learner, comparing naive in-sample stacking against honest K-fold cross-validated stacking on a live 3D probability surface.

ensemble learningstackingmeta-learnercross-validationlogistic regressionoverfitting

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)