How it works...

Stacked generalization works by deducing the biases of the classifier/regressor relative to a supplied learning dataset. This deduction works by generalizing into a second space whose inputs are the hypotheses of the original generalizers and whose output is the correct hypothesis. When used with multiple generators, stacked generalization is an alternative to cross-validation.