Closed rachaelvp closed 3 years ago
For 1, yes, with a custom method.*
function, you could specify the coefficients to be 1 for the algorithm with the minimum CV risk estimate and 0 for the others. Take a look at method.template
for the structure of writing your own method wrapper.
For 2, This is what the SuperLearner()
function does. The coefficients are trained in the cross-validation, and the final ensemble combines the coefficients with the estimates trained using all the data.
Example method over in the SuperLearnerExtra space: https://github.com/ecpolley/SuperLearnerExtra/blob/master/method/method.discreteSL.R