Learn what Recall is in machine learning, why it matters, and how it ensures AI models capture critical positive instances effectively.
Recall, also known as sensitivity or the true positive rate, is a fundamental evaluation metric used to measure the ability of a machine learning (ML) model to identify all relevant instances within a dataset. In essence, recall answers the specific question: "Out of all the actual positive cases, how many did the model successfully detect?" This metric is particularly focused on minimizing false negatives, ensuring that critical events or objects are not overlooked. While accuracy provides a general overview of performance, recall becomes the primary indicator of success in scenarios where missing a target carries a higher cost than a false alarm.
In many computer vision (CV) and data analysis tasks, the cost of errors is not uniform. Failing to detect a positive case (a Type II error) can sometimes be dangerous or expensive. High recall ensures that the system casts a wide net to capture as many true positives as possible. This is often achieved by adjusting the confidence threshold during inference; lowering the threshold generally increases recall but may result in more false positives.
Engineers often analyze the precision-recall curve to understand the trade-offs inherent in their models. A model with 100% recall has found every single target object, though it might have also incorrectly labeled some background noise as targets.
Recall is the driving metric behind many safety-critical AI solutions. Here are two prominent examples where recall takes precedence:
Understanding the difference between recall and related metrics is crucial for interpreting model evaluation insights.
When developing models with the Ultralytics YOLO11 architecture, recall is automatically calculated during the validation process. The framework computes recall for each class and the mean Average Precision (mAP), helping developers gauge how well the model finds objects.
You can easily validate a trained model and view its recall metrics using Python:
from ultralytics import YOLO
# Load a pretrained YOLO11 model
model = YOLO("yolo11n.pt")
# Validate the model on a standard dataset like COCO8
# The results will include Precision (P), Recall (R), and mAP
metrics = model.val(data="coco8.yaml")
# Access the mean recall score from the results
print(f"Mean Recall: {metrics.results_dict['metrics/recall(B)']}")
This code snippet loads a YOLO11 model and runs validation on the COCO8 dataset. The output provides a comprehensive breakdown of performance, allowing you to assess if your model meets the necessary recall requirements for your specific application. If the recall is too low, you might consider techniques like data augmentation or hyperparameter tuning to improve sensitivity.