Package smile.validation.metric
Class Recall
java.lang.Object
smile.validation.metric.Recall
- All Implemented Interfaces:
Serializable,ClassificationMetric
In information retrieval area, sensitivity is called recall.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
instance
Default instance.
-
-
Constructor Details
-
Recall
public Recall()
-
-
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 recall/sensitivity.- Parameters:
truth- the ground truth.prediction- the prediction.- Returns:
- the metric.
-
toString
-