powered by
Computes the AUC score of binary model predictions.
auc_score(observed = NULL, predicted = NULL)
AUC value.
(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.
observed
out <- auc_score( observed = c(0, 0, 1, 1), predicted = c(0.1, 0.6, 0.4, 0.8) )
Run the code above in your browser using DataLab