I've been trying to learn the Tidymodels package for the first time and immediately ran into a problem with logistic regression. I keep getting the error message: "Error: In metric: roc_auc
" and I can't seem to find an answer for why this isn't working anywhere online. Is there maybe an issue with the data?
#I uploaded the data to github
df_model = read.csv('https://raw.githubusercontent.com/jslucf/spotify/main/spotifydata.csv')df_split = initial_split(df_model, strata = decade)
df_training = training(df_split)
df_testing = testing(df_split)
df_bootstraps = bootstraps(df_training)df_workflow = workflow() %>%
add_formula(playlist_genre ~ . )glm_model = logistic_reg() %>%
set_engine('glm')glm_bootstraps = df_workflow %>%
add_model(glm_model) %>%
fit_resamples(resamples = df_bootstraps,
control = control_resamples(save_pred = T))