class probability column for yardstick::roc_cruve

54 Views Asked by At

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()
0

There are 0 best solutions below