Package smile.validation.metric
Class AUC
java.lang.Object
smile.validation.metric.AUC
- All Implemented Interfaces:
Serializable
,ProbabilisticClassificationMetric
The area under the curve (AUC). When using normalized units, the area under
the curve is equal to the probability that a classifier will rank a
randomly chosen positive instance higher than a randomly chosen negative
one (assuming 'positive' ranks higher than 'negative').
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).
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
instance
Default instance.
-
-
Constructor Details
-
AUC
public AUC()
-
-
Method Details
-
score
public double score(int[] truth, double[] probability) Description copied from interface:ProbabilisticClassificationMetric
Returns a score to measure the quality of classification.- Specified by:
score
in interfaceProbabilisticClassificationMetric
- Parameters:
truth
- the true class labels.probability
- The posterior probability of positive class.- Returns:
- the metric.
-
of
public static double of(int[] truth, double[] probability) Calculates AUC for binary classifier.- Parameters:
truth
- the ground truth.probability
- the posterior probability of positive class.- Returns:
- AUC
-
toString
-