aucC_wrap | R Documentation |
Scores represent a prediction of how likely a label corresponds to a targeted value. The targeted value defaults to "Yes", but these may be easily changed by passing in an appropriate character vector of levels, where the targeted category is the second level.
aucC_wrap(label, scores, levels = c("No", "Yes"))
label |
A factor vector with levels of c("No","Yes") in any order, or a character vector taking the same values. |
scores |
A numeric vector of the same length above. Higher scores must correspond to the "Yes" level of the labels. |
levels |
A character vector of length at least two, corresponding to the unique values possible in |
The AUC, defined as the area under the ROC curve computed using label
and scores
.
## Not run: y=rbinom(100, size=1, prob=1/2) label = factor(y, levels=c(0,1), labels=c("No", "Yes")) scores = runif(100) # higher scores predict label == "Yes" aucC::aucC_wrap(label=label, scores=scores) label2 = factor(y, levels=c(0,1), labels=c("Apple", "Orange")) aucC_wrap(label=label, scores=scores, labels=c("Apple", "Orange")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.