Recall
Recall is a metric used to evaluate classification models. The recall of a model is the proportion of positive examples the model classified correctly out of all the positive examples.
In other words, recall asks, βWhat proportion of positive examples did the model classify as positive?β
Recall ranges from 0 (the worst performance) to 1 (the best performance).
Computing recall in scikit-learn
import numpy as np
from sklearn.metrics import recall_score
y_true = np.array([1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1])
y_pred = np.array([1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1])
recall = recall_score(y_true, y_pred)
print(f"Recall: {recall:.2f}")
Recall: 0.82
This page references the following sources: