Reputation: 11
I was following this Youtube video from Julia Silge and I could not finish the exercise. In this part of the code the following error appear:
set.seed(234)
glm_rs <- glm_spec %>%
fit_resamples(diversity ~ .,
folds,
metrics = metric_set(roc_auc,sens,spec),
control = control_resamples(save_pred = TRUE))
Error:
The combination of metric functions must be:
- only numeric metrics
- a mix of class metrics and class probability metrics
The following metric function types are being mixed:
- prob (roc_auc)
- class (sens)
- other (spec <namespace:readr>)
Any idea, what's going on ?
Regards
Lucas Zago
Upvotes: 1
Views: 142
Reputation: 1
I also encountered this problem. I used tidymodels::tidymodels_prefer
and found that it has no effect.
The final solution was to update tidymodels:
packages(install.packages("tidymodels"))
Or you can try yardstick::spec
.
Upvotes: 0