predict.SuperLearner: Predict method for SuperLearner object
Description
Obtains predictions on a new data set from a SuperLearner fit. May require the original data if one of the library algorithms uses the original data in its predict method.Usage
predict.SuperLearner(object, newdata, family, X = NULL, Y = NULL, ...)
Arguments
object
Fitted object from SuperLearner
newdata
New X values for prediction
family
Currently allows gaussian or binomial to describe the error distribution
X
Original data set used to fit object
Y
Original outcome used to fit object
...
Additional arguments passed to the predict.SL.* functions
Value
- predPredicted values from Super Learner fit
- library.predictPredicted values for each algorithm in library
Details
If newdata is omitted the predicted values from object are returned. Each algorithm in the Super Learner library needs to have a corresponding prediction function with the ``predict.'' prefixed onto the algorithm name (e.g. predict.SL.glm for SL.glm).