# NOT RUN {
data("example_ames_knn")
# Summarized over resamples
collect_metrics(ames_grid_search)
# Per-resample values
collect_metrics(ames_grid_search, summarize = FALSE)
# ---------------------------------------------------------------------------
library(parsnip)
library(rsample)
lm_mod <-linear_reg() %>% set_engine("lm")
set.seed(93599150)
car_folds <- vfold_cv(mtcars)
ctrl <- control_resamples(save_pred = TRUE)
resampled <- fit_resamples(mpg ~ ., lm_mod, resamples = car_folds, control = ctrl)
collect_predictions(resampled)
# }
Run the code above in your browser using DataLab