roc_auc | R Documentation |
Given the observed values and predicted probabilities values of binary data computes the ROC Area Under the Curve (ROC-AUC).
roc_auc(observed, probabilities, positive_class = NULL, remove_na = TRUE)
observed |
( |
probabilities |
( |
positive_class |
( |
remove_na |
( |
A single numeric value with the ROC-AUC.
Other categorical_metrics:
accuracy()
,
brier_score()
,
categorical_summary()
,
confusion_matrix()
,
f1_score()
,
kappa_coeff()
,
math_mode()
,
matthews_coeff()
,
pccc()
,
pcic()
,
pr_auc()
,
precision()
,
recall()
,
sensitivity()
,
specificity()
## Not run:
roc_auc(factor(c("a", "b")), data.frame(a = c(0.2, 0.6), b = c(0.5, 0.4)))
roc_auc(factor(c("a", "b")), data.frame(a = c(0.8, 0.3), b = c(0.2, 0.7)))
roc_auc(
factor(c("a", "b")),
data.frame(a = c(0.2, 0.6), b = c(0.5, 0.4)),
positive_class = "b"
)
roc_auc(
factor(c(TRUE, FALSE)),
data.frame(
`TRUE` = c(0.3, 0.2),
`FALSE` = c(0.7, 0.8),
check.names = FALSE
)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.