blending_frame to generate the meta-learner's training inputs. State the construction, because the word alone does not tell a reader whether weights were fitted.The row that the base model did not learn
Suppose base models predict the same target, at the same horizon, for row . Stacking constructs an input vector
The superscript means that the fit producing this row's prediction excluded its outcome; it does not require literal leave-one-out fitting. In ordinary fold-based stacking, each base model is fitted on the training part and predicts the held-out part. Align every model's predictions to the same row IDs, outcomes and class definitions. The meta-learner then learns from pairs .
For inference, refit the base models on the eligible development data under the chosen procedure, then feed their new predictions into the fitted combiner:
Do not replace the stored held-out training features with these refitted models' in-sample predictions and retrain the combiner on them. The refitted models can also have a different prediction distribution from their smaller training-window versions; assessment must include this refitting step.
A 60/40 calculation is not evidence of learning
For market data, held out must also mean available in time
Ordinary random cross-validation can exclude a row while training on its future. That does not recreate a historical forecast. For a chronological stacking design, generate meta-training features by rolling or expanding forward through the development history:
- Fit each base pipeline using only information and completed labels available at that cutoff. Fit scalers, feature selection and other learned transformations inside that window too.
- Store predictions for the next block. Repeat at later cutoffs, preserving the original row IDs and outcomes.
- Once those outcomes have matured, fit the combiner on the stored predictions and labels. The initial warm-up block has no eligible past-only predictions and does not become meta-training data.
- Refit bases on eligible development data and assess the frozen complete procedure on a later untouched test block. If live updates are intended, freeze and assess their schedule as well.
cross_val_predict contract assigns every input sample to exactly one held-out set. An expanding-window TimeSeriesSplit leaves the initial training block unpredicted, so simply substituting that splitter into the standard stacking fit is not a complete solution. Construct and align the eligible temporal prediction rows explicitly.A separate chronological blending holdout can be simpler: fit bases on an earlier block and train the combiner on their predictions for a later block after its labels arrive. It leaves fewer observations for combiner fitting, and the holdout is now training data for the ensemble, not its final test. If the bases are then refitted on more history, assess that exact procedure rather than assuming the combiner transfers unchanged.
What earns the extra layer?
Useful base models make complementary errors on eligible held-out observations. Merely giving similar models different names adds little information, while a highly flexible combiner can fit noise in a small meta-training sample. Regularisation, a simple averaging baseline and comparison with the strongest individual base model help establish whether the additional layer is worthwhile.
The combiner's training score is not an independent ensemble score. Selecting base models or repeatedly tuning the stack against the same held-out history also consumes that history for model selection. Preserve later evaluation of the whole procedure. A lower forecasting loss still needs a separate account of turnover, costs and position construction before it implies an improved trading strategy.
Sources
- Ting and Witten, Issues in Stacked Generalization (1999), §§1–2: held-out level-one data, base-model refitting and class-probability inputs. The linked arXiv copy was posted in 2011; the paper appeared in JAIR in 1999.
- H2O, Stacked Ensembles, Super Learner algorithm,
blending_frameand FAQ. Documentation checked 1 November 2026. - scikit-learn, StackingClassifier, full-data base fits, cross-validated combiner inputs, default folds and prefit caution. Documentation checked 1 November 2026.
- scikit-learn, cross_val_predict and TimeSeriesSplit, held-out coverage and expanding-window construction. Documentation checked 1 November 2026.