0

I have a doubt regarding the column to pass when calling roc_curve. If you look at the example provided at https://www.tidymodels.org/start/recipes/#predict-workflow you can see that the argument provided is .pred_late.

flights_pred %>% 
  roc_curve(truth = arr_delay, .pred_late) %>% 
  autoplot()

Why it is used instead of .pred_on_time?

For me the value .pred_on_time > 0.5 ==> on_time. I know the relation .pred_on_time+.pred_late=1, but it is more natural to write:

flights_pred %>% 
  roc_curve(truth = arr_delay, .pred_on_time) %>% 
  autoplot()
Jorge
  • 137
  • 4
  • Asking for explanation of tutorials is not really on topic here. Perhaps you ask for migration to the Data Science forum https://datascience.stackexchange.com/, or better just delete and repost there? – IRTFM Mar 08 '21 at 15:55
  • You can use the [`event_level` argument to specify](https://yardstick.tidymodels.org/reference/roc_curve.html) which level of the factor you want to use as the event and change this if you want. – Julia Silge Mar 11 '21 at 05:28

0 Answers0