Package smile.deep.metric
Class Recall
java.lang.Object
smile.deep.metric.Recall
- All Implemented Interfaces:
Metric
Recall or true positive rate (TPR) (also called hit rate, sensitivity) is
a statistical measures of the performance of a binary classification test.
Recall is the proportion of actual positives which are correctly identified
as such.
TPR = TP / P = TP / (TP + FN)Recall and precision are closely related to the concepts of type I and type II errors. For any test, there is usually a trade-off between the measures. This trade-off can be represented graphically using an ROC curve.
In this implementation, the class label 1 is regarded as positive and 0 is regarded as negative.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
compute()
Computes the metric value from the metric state, which are updated by previous update() calls.name()
Returns the name of metric.void
reset()
Resets the metric state variables to their default value.toString()
void
Updates the metric states with input data.
-
Constructor Details
-
Recall
public Recall()Constructor. -
Recall
public Recall(double threshold) Constructor.- Parameters:
threshold
- The threshold for converting input into binary labels.
-
Recall
Constructor.- Parameters:
strategy
- The aggregating strategy for multi-classes.
-
-
Method Details
-
toString
-
name
Description copied from interface:Metric
Returns the name of metric. -
update
Description copied from interface:Metric
Updates the metric states with input data. This is often used when new data needs to be added for metric computation. -
compute
public double compute()Description copied from interface:Metric
Computes the metric value from the metric state, which are updated by previous update() calls. The compute frequency can be less than the update frequency. -
reset
public void reset()Description copied from interface:Metric
Resets the metric state variables to their default value. Usually this is called at the end of every epoch to clean up metric states.
-