GetCVPreds: Extract the cross-validation predictions for the datapoints in the training set
Description
This function extracts the cross-validation predictions from a caret model trained with cross-validation.
If grid-search is used to optimize the hyperparamter values,
the function GetCVPreds extracts the cross-validation predictions corresponding to the optimal hyperparameter values.
Usage
GetCVPreds(model)
Arguments
model
A caret model trained with cross-validation.
Value
A data frame containing the observed and the predicted values for the datapoints in the training set,
their index according to the training set, the optimal hyperparameter values, and the fold index.