Computes the AUC score of binary model predictions.
Usage
auc_score(observed = NULL, predicted = NULL)
Arguments
- observed
(required, integer) Numeric vector with observations. Valid values are 1 and 0. Must have the same length as predicted
. Default: NULL
- predicted
(required, numeric) Numeric vector in the range 0-1 with binary model predictions. Must have the same length as observed
.
See also
Other preference_order:
case_weights()
,
f_gam_auc_balanced()
,
f_gam_auc_unbalanced()
,
f_gam_deviance()
,
f_logistic_auc_balanced()
,
f_logistic_auc_unbalanced()
,
f_rf_auc_balanced()
,
f_rf_auc_unbalanced()
,
f_rf_rsquared()
,
f_rsquared()
,
preference_order()
Examples
out <- auc_score(
observed = c(0, 0, 1, 1),
predicted = c(0.1, 0.6, 0.4, 0.8)
)