multiclass.AUNP {measures} | R Documentation |
Weighted average 1 vs. rest multiclass AUC
Description
Computes the AUC treating a c-dimensional classifier as c two-dimensional classifiers, taking into account the prior probability of each class. See Ferri et al.: https://www.math.ucdavis.edu/~saito/data/roc/ferri-class-perf-metrics.pdf.
Usage
multiclass.AUNP(probabilities, truth)
Arguments
probabilities |
[numeric] matrix of predicted probabilities with columnnames of the classes |
truth |
vector of true values |
Examples
n = 20
set.seed(122)
truth = as.factor(sample(c(1,2,3), n, replace = TRUE))
probabilities = matrix(runif(60), 20, 3)
probabilities = probabilities/rowSums(probabilities)
colnames(probabilities) = c(1,2,3)
multiclass.AUNP(probabilities, truth)
[Package measures version 0.3 Index]