Given a model or list of models, this function returns the out of fold predictions. These out of fold predictions can be used to make stacked or blended ensembles. See the ensemble vignette for examples.

oof_grab(models, type = "raw")

Arguments

models

A model or list of models to get the predictions

type

the results of the prediction. For classification models, "raw" returns the outcome label and "prob" returns the label probabilities.

Value

a tibble with one column per model and a column of the training data outcomes. If type = "prob" there will be n columns per model, where n is the number of labels in the outcome.

Examples

oofs <- oof_grab(model_list)
#> Error in model$pred: $ operator is invalid for atomic vectors