smile.validation
Class Specificity
- java.lang.Object
-
- smile.validation.Specificity
-
- All Implemented Interfaces:
- ClassificationMeasure
public class Specificity extends java.lang.Object implements ClassificationMeasure
Specificity (SPC) or True Negative Rate is a statistical measures of the performance of a binary classification test. Specificity measures the proportion of negatives which are correctly identified.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 0 is regarded as negative.
-
-
Constructor Summary
Constructors Constructor and Description Specificity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublemeasure(int[] truth, int[] prediction)Returns an index to measure the quality of classification.java.lang.StringtoString()
-
-
-
Method Detail
-
measure
public double measure(int[] truth, int[] prediction)Description copied from interface:ClassificationMeasureReturns an index to measure the quality of classification.- Specified by:
measurein interfaceClassificationMeasure- Parameters:
truth- the true class labels.prediction- the predicted class labels.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG