Package smile.validation.metric
Class FDR
java.lang.Object
smile.validation.metric.FDR
- All Implemented Interfaces:
Serializable
,ClassificationMetric
The false discovery rate (FDR) is ratio of false positives
to combined true and false positives, which is actually 1 - precision.
FDR = FP / (TP + FP)
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
instance
Default instance.
-
-
Constructor Details
-
FDR
public FDR()
-
-
Method Details
-
score
public double score(int[] truth, int[] prediction) Description copied from interface:ClassificationMetric
Returns a score to measure the quality of classification.- Specified by:
score
in interfaceClassificationMetric
- Parameters:
truth
- the true class labels.prediction
- the predicted class labels.- Returns:
- the metric.
-
of
public static double of(int[] truth, int[] prediction) Calculates the false discovery rate.- Parameters:
truth
- the ground truth.prediction
- the prediction.- Returns:
- the metric.
-
toString
-