public class AUC extends java.lang.Object implements ProbabilisticClassificationMetric
In statistics, a receiver operating characteristic (ROC), or ROC curve, is a graphical plot that illustrates the performance of a binary classifier system as its discrimination threshold is varied. The curve is created by plotting the true positive rate (TPR) against the false positive rate (FPR) at various threshold settings.
AUC is quite noisy as a classification measure and has some other significant problems in model comparison.
We calculate AUC based on Mann-Whitney U test (https://en.wikipedia.org/wiki/Mann-Whitney_U_test).
Constructor and Description |
---|
AUC() |
Modifier and Type | Method and Description |
---|---|
static double |
of(int[] truth,
double[] probability)
Calculates AUC for binary classifier.
|
double |
score(int[] truth,
double[] probability)
Returns a score to measure the quality of classification.
|
java.lang.String |
toString() |
public static final AUC instance
public double score(int[] truth, double[] probability)
ProbabilisticClassificationMetric
score
in interface ProbabilisticClassificationMetric
truth
- the true class labels.probability
- The posterior probability of positive class.public static double of(int[] truth, double[] probability)
truth
- The sample labelsprobability
- The posterior probability of positive class.public java.lang.String toString()
toString
in class java.lang.Object