It is often useful in my research to be able to predict from cross-validated algorithm fits (i.e., the V cross-validated fits for each of the K learners). In particular, I hope to include pseudo-cross-validated standard error estimates in an update of my drtmle package.
Structure of pull request
I added an option saveCVFitLibrary to control similar to saveFitLibrary that controls whether these are returned. If they are returned it is in the cvFitLibrary entry in the output of a call to SuperLearner.
I believe I have added all relevant documentation to SuperLearner.control and SuperLearner.
I've tried to be relatively memory efficient in creating objects that hold a lot of model fits. These fits are only stored beyond the original SuperLearner code if saveCVFitLibrary = TRUE. Otherwise, this PR shouldn't be any more memory hungry than the original code.
Reason for pull request
It is often useful in my research to be able to predict from cross-validated algorithm fits (i.e., the
V
cross-validated fits for each of theK
learners). In particular, I hope to include pseudo-cross-validated standard error estimates in an update of mydrtmle
package.Structure of pull request
I added an option
saveCVFitLibrary
tocontrol
similar tosaveFitLibrary
that controls whether these are returned. If they are returned it is in thecvFitLibrary
entry in the output of a call toSuperLearner
.I believe I have added all relevant documentation to
SuperLearner.control
andSuperLearner
.I've tried to be relatively memory efficient in creating objects that hold a lot of model fits. These fits are only stored beyond the original
SuperLearner
code ifsaveCVFitLibrary = TRUE
. Otherwise, this PR shouldn't be any more memory hungry than the original code.