predict.caretEnsemble: Make predictions from a caretEnsemble. This function passes the data to each function in
turn to make a matrix of predictions, and then multiplies that matrix by the vector of
weights to get a single, combined vector of predictions.
Description
Make predictions from a caretEnsemble. This function passes the data to each function in
turn to make a matrix of predictions, and then multiplies that matrix by the vector of
weights to get a single, combined vector of predictions.
Usage
## S3 method for class 'caretEnsemble':
predict(object, keepNA = TRUE, se = FALSE,
return_weights = FALSE, ...)
a logical indicating whether predictions should be made for all
cases where sufficient data exists or only for complete cases across all models. When
TRUE this does not predict for missing values. When FALSE, missing values are overwritten
with prediction
se
logical, should prediction errors be produced? Default is false.
return_weights
a logical indicating whether prediction weights for each model for
each observation should be returend
...
arguments (including newdata) to pass to predict.train. These arguments
must be named
Value
If return_weights = TRUE a list is returned with a data.frame
slot for predictions and a matrix slot for the model weights. If return_weights = FALSE
a data.frame is returned for the predictions.