Understanding Stacked Generalization I am trying to figure out how stacked generalization works? I think we train n models on the same dataset and get their class probabilities. Then these class probabilities are fed into another model. If dataset has 2 classes and 100 instances and we use 5 base models then we fed 10 columns and 100 rows(each model's class probabilities 5*2) to another model? Am I right or could someone please explain it?

In simple train/validation/test split, the first level of classifiers are trained on the training set and their predictions on the validation set are fed into the second level learner, which is sometimes called meta-learner. When you use cross-validation to make predictions, the dataset is split into train/test and you obtain a prediction for each sample in the training set using cross-validation. Then these predictions are inputted to the meta-learner. That is only when you actually input 100 rows to the meta-learner if you trained your first level models with those 100 rows, i.e. training set. In simple train/validation split (no cross-validation), the second level learner gets only the validation predictions because training predictions are useless. Besides, if your dataset has two classes, it's usually enough to input only one probability value for each learner to the meta-learner.
