public class Specificity extends java.lang.Object implements ClassificationMeasure
SPC = TN / N = TN / (FP + TN) = 1 - FPR
Sensitivity and specificity are closely related to the concepts of type I and type II errors. For any test, there is usually a trade-off between the measures. This trade-off can be represented graphically using an ROC curve.
In this implementation, the class label 1 is regarded as positive and all others are regarded as negative.
| Constructor and Description |
|---|
Specificity() |
| Modifier and Type | Method and Description |
|---|---|
double |
measure(int[] truth,
int[] prediction)
Returns an index to measure the quality of classification.
|
java.lang.String |
toString() |
public double measure(int[] truth,
int[] prediction)
ClassificationMeasuremeasure in interface ClassificationMeasuretruth - the true class labels.prediction - the predicted class labels.public java.lang.String toString()
toString in class java.lang.Object