Returns the area under the curve ("AUC") of a receiver-operating characteristic curve for the given predicted and actual values.
auc(actual, pred)
Logical vector: TRUE
for positive class.
If not a logical vector, the result is interpreted as one if safe to do so,
viz. if actual
contains precisely two unique values and is either a numeric vector,
an ordered factor, or the unique values are FALSE
and TRUE
(case-insensitively).
Anything else is an error.
Numeric (double) vector the same length as actual
giving the predicted probability of TRUE
. Must be a numeric vector the same length as actual
.