calcRocStats | R Documentation |
Calculates ROC statistics for a set of classes and their probabilities data. ROC statistics include: ROC, area under ROC curve (AUC), precision, accuracy.
calcRocStats(classes = NULL, probs = NULL, posClass = NULL, negClass = NULL)
classes |
A character vector of classifications. |
probs |
A numeric vector of probability values corresponding to the
elements of |
posClass |
Name of the positive class. |
negClass |
Name of the negative class. |
A list of ROC statistic objects and values.
library(TerrainWorksUtils)
# Generate test data with a bit of class probability overlap
classes <- c(rep("POS", 40), rep("NEG", 60))
probs <- c(runif(40, 0.4, 1.0), runif(60, 0.0, 0.6))
rocStats <- calcRocStats(classes, probs, "POS", "NEG")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.