Class FDR
java.lang.Object
smile.validation.metric.FDR
- All Implemented Interfaces:
Serializable, ToDoubleBiFunction<int[],int[]>, 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 Details
-
instance
Default instance.
-
-
Constructor Details
-
FDR
public FDR()Constructor.
-
-
Method Details
-
score
public double score(int[] truth, int[] prediction) Description copied from interface:ClassificationMetricReturns a score to measure the quality of classification.- Specified by:
scorein 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
-