rocscore | R Documentation |
Calculate the area under the receiver operating characteristic curve (ROC AUC).
rocscore(x, ref, n = 32L)
x |
The prediction scores. |
ref |
The (logical) binary response. |
n |
The number of points in the curve. |
A single number between 0 and 1 giving the ROC AUC, with an attribute called ROC
which is a data frame giving the full ROC curve.
Kylie A. Bemis
set.seed(1)
x <- runif(100)
y <- ifelse(x > 0.5 & runif(100) > 0.2, TRUE, FALSE)
rocscore(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.