public class Sensitivity extends java.lang.Object implements ClassificationMeasure
TPR = TP / P = TP / (TP + FN)
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.
| Modifier and Type | Field and Description |
|---|---|
static Sensitivity |
instance |
| Constructor and Description |
|---|
Sensitivity() |
| Modifier and Type | Method and Description |
|---|---|
double |
measure(int[] truth,
int[] prediction)
Returns an index to measure the quality of classification.
|
static double |
of(int[] truth,
int[] prediction)
Calculates the sensitivity.
|
java.lang.String |
toString() |
public static final Sensitivity instance
public double measure(int[] truth,
int[] prediction)
ClassificationMeasuremeasure in interface ClassificationMeasuretruth - the true class labels.prediction - the predicted class labels.public static double of(int[] truth,
int[] prediction)
public java.lang.String toString()
toString in class java.lang.Object