Class Recall
java.lang.Object
smile.validation.metric.Recall
- All Implemented Interfaces:
Serializable, ToDoubleBiFunction<int[],int[]>, ClassificationMetric
In information retrieval area, sensitivity is called recall.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleof(int[] truth, int[] prediction) Calculates the recall/sensitivity of binary classification.static doubleCalculates the recall/sensitivity.doublescore(int[] truth, int[] prediction) Returns a score to measure the quality of classification.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ClassificationMetric
applyAsDouble
-
Field Details
-
instance
Default instance.
-
-
Constructor Details
-
Recall
public Recall()Constructor. -
Recall
Constructor.- Parameters:
strategy- The aggregating strategy for multi-classes.
-
-
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.
-
toString
-
of
public static double of(int[] truth, int[] prediction) Calculates the recall/sensitivity of binary classification.- Parameters:
truth- the ground truth.prediction- the prediction.- Returns:
- the metric.
-
of
Calculates the recall/sensitivity.- Parameters:
truth- the ground truth.prediction- the prediction.strategy- The aggregating strategy for multi-classes.- Returns:
- the metric.
-