Skip to main content
. Author manuscript; available in PMC: 2018 Dec 10.
Published in final edited form as: Proc Mach Learn Res. 2017 Aug;68:25–38.
Algorithm 2: Super Learner
* For each algorithm k:
 * Perform V-fold cross validation, obtaining cross-validated predicted values Zk;
 * Fit on full data O, obtaining Ψ^(P)k;
* Index a proposed family of convex combinations of the k algorithms by α;
* Select α^ to minimize E0L(O, Ψ(P)), which can be shown is solved by estimating:
logit((Y = 1|Z)) =α1Z1 + ... + αkZk;
* Save Ψ^(P)SL, the final estimator of Ψ(P0) = P0(Y = 1|C), constructed as:
Ψ^(P)SL=α^1Ψ^(P)1++α^KΨ^(P)K.

Note: The entire super learner algorithm above is itself externally cross-validated to obtained cross-validated performance metrics.