Recall, also known as sensitivity or true positive rate, is a metric that measures how effectively a model identifies the relevant cases in a dataset. For example, in a model designed to detect spam emails, recall would tell us the proportion of actual spam emails that the model successfully identified as spam.
Think of recall as the metric that focuses on capturing all relevant positive instances in the data, ignoring whether the model accidentally identifies non-relevant instances as positive.
The formula for recall is:
$$ \text{Recall} = \frac{\text{True Positives}}{\text{True Positives} + \text{False Negatives}} $$
where:
Imagine you have an e-commerce recommendation model that suggests "Smartphones" to users who are interested in buying a phone. You want the model to recommend all relevant smartphone products but avoid suggesting items that aren’t smartphones.
You test the model on a dataset with 100 items, where 50 items are actually smartphones and the other 50 items are other types of electronics (laptops, tablets, etc.).
The model's performance is such that:
To calculate recall, we use the formula defined above:
$$ \text{Recall} = \frac{40}{40 + 10} = \frac{40}{50} = 0.8 $$
So, the recall for this recommendation model is 0.8 or 80%.
Recall is often discussed alongside precision, another important metric that measures the accuracy of the positive predictions. While recall focuses on capturing all relevant instances, precision aims to ensure that all captured instances are indeed relevant. This creates a trade-off: boosting recall might lower precision, as the model may capture more non-relevant cases.
This trade-off is commonly represented in classification problems where you might prioritize recall over precision or vice versa, depending on the goals. The F1 score is a metric that combines precision and recall, providing a balance for situations where both metrics are important.
Recall is a vital metric that helps you evaluate how well your model is identifying all relevant instances, particularly when missing instances would have a negative impact. Understanding recall can help you fine-tune your model’s performance to suit your project’s needs.