| auc | R Documentation |
Compute area under the ROC curve
auc(y, prob, w = NULL)
y |
Binary 0/1 vector, including logical, character, or factor encodings. |
prob |
Finite numeric scores, one per label; values outside |
w |
Optional finite nonnegative numeric sample weights; NULL means unit weights. |
Numeric rank AUC with half credit for ties; NA with a warning if either effective class mass is zero.
Zhou et al. (2022). doi:10.1371/journal.pcbi.1009956
auc_matrix(), get_auc()
y <- c(0, 0, 1, 1)
p <- c(0.1, 0.3, 0.7, 0.9)
auc(y, p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.