Description Usage Arguments Value Author(s) Examples
Calculates the Receiver Operating Characteristic (ROC).
1 2 3 |
truth |
A |
data |
A |
recall |
(Optional) Unless |
idxs |
|
ncuts |
|
hasNAs |
If |
isOrdered |
If |
... |
Not used. |
verbose |
See |
Returns a list
with elements:
roc |
A Kx2 |
cuts |
A |
Henrik Bengtsson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | n <- 1000
x <- rnorm(n=n, mean=0, sd=1)
y1 <- rnorm(n=n, mean=2, sd=1)
y2 <- rnorm(n=n, mean=3, sd=1)
T <- integer(2*n)
T[1:n] <- 1L
D1 <- c(x,y1)
D2 <- c(x,y2)
fit1 <- fitRoc(T,D1)
plot(fit1$roc, type="l", lwd=2, xlim=c(0,1), ylim=c(0,1))
fit2 <- fitRoc(T,D2)
lines(fit2$roc, type="l", lwd=2, col="red")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.