Stacked Generalization
Stacked Generalization Ensemble · Also known as: stacking, meta-learning
Stacked generalization, or stacking, is a two-level ensemble method where base-level classifiers are trained on the original data, and a meta-learner is trained on the predictions of the base classifiers. The meta-learner learns how to best combine base predictions rather than using fixed aggregation rules. Introduced by David Wolpert in 1992, stacking achieves state-of-the-art performance by automatically learning the optimal weighting and interaction patterns among base 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 stacking when you have diverse base classifiers with moderate individual accuracy and want to optimize their combination. It is especially effective when base models have different strengths and weaknesses (e.g., decision trees, neural networks, SVMs). Avoid stacking if base classifiers are highly correlated or if computational cost is critical, as stacking requires training an additional meta-model.
Strengths & limitations
- Learns optimal aggregation weights automatically, outperforming fixed voting rules.
- Adapts to the strengths and weaknesses of individual base classifiers.
- Handles heterogeneous base learners (different algorithms, hyperparameters).
- Often achieves state-of-the-art performance in machine learning competitions.
- Requires careful design to avoid overfitting: meta-learner can memorize base predictions if not properly validated.
- Increased computational cost: training K+1 models instead of just K.
- Meta-learner selection is often problem-specific; no universal best choice.
- Interpretability decreases as complexity increases—difficult to understand final decision-making logic.
Frequently asked
How do I avoid overfitting in stacking?
Use k-fold cross-validation to generate meta-features: each fold's test predictions become meta-training data. This prevents the meta-learner from seeing predictions on data used to train base classifiers. Always use a separate hold-out validation set for final evaluation.
What model should I use as the meta-learner?
Simple models often work best: logistic regression, linear regression, or a small decision tree. Complex meta-learners (random forests, neural networks) risk overfitting to the meta-features. Start simple and only add complexity if validation performance plateaus.
Should base classifiers be trained on the same data?
No. Diverse base classifiers trained on different data samples (bagging) or with different algorithms improve meta-learner generalization. Identical base classifiers produce identical predictions, offering no useful information to the meta-learner.
Can I use stacking with regression and classification?
Yes. For regression, the meta-learner predicts continuous values from base regressor outputs. For classification, it predicts classes from base classifier probability scores. The principle is identical.
Sources
- Wolpert, D. H. (1992). Stacked generalization. Neural Networks, 5(2), 241-259. DOI: 10.1016/S0893-6080(05)80023-1 ↗
- Breiman, L. (1996). Stacked regressions. Machine Learning, 24(1), 49-64. DOI: 10.1023/a:1018046112532 ↗
How to cite this page
ScholarGate. (2026, June 3). Stacked Generalization Ensemble. ScholarGate. https://scholargate.app/en/ensemble-learning/stacked-generalization
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.
- Bagging EnsembleEnsemble Learning↔ compare
- Boosting EnsembleEnsemble Learning↔ compare
- Majority VotingEnsemble Learning↔ compare