I got the error message "Error: For a classification model, the outcome should be a factor." after I use fit_resamples. Then I switched to the fit() function and got the same error. Does anyone know why this is?
train_boot <- bootstraps(train)
train_boot
glm_spec <- logistic_reg() %>%
set_engine("glm")
rf_spec <- rand_forest() %>%
set_mode("classification") %>%
set_engine("ranger")
train_wf <- workflow() %>%
add_formula(OFFER_STATUS~.)
train_wf
glm_rs <- train_wf %>%
add_model(glm_spec) %>%
fit_resamples(
resamples = train_boot,
control = control_resamples(save_pred = TRUE, verbose = TRUE)
)