Area under the curve
Integral over the graph that results from computing fpr and tpr for many different thresholds.
AUC(probabilities, truth, negative, positive)
probabilities |
[numeric] vector of predicted probabilities |
truth |
vector of true values |
negative |
negative class |
positive |
positive class |
n = 20 set.seed(125) truth = as.factor(sample(c(1,0), n, replace = TRUE)) probabilities = runif(n) response = as.factor(as.numeric(probabilities > 0.5)) positive = 1 negative = 0 AUC(probabilities, truth, negative, positive)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.