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
-
Constructor Summary
-
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: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 recall/sensitivity.- Parameters:
truth
- the ground truth.prediction
- the prediction.- Returns:
- the metric.
-
toString
-