Photo by SIMON LEE on Unsplash

Dagshub Glossary

Recall

Recall, often referred to as sensitivity or the true positive rate, holds a prime position in the evaluation metrics used for classification models. Primarily, it answers a critical question: “Of all the actual positive instances, how many were correctly predicted by the model?” This page provides an in-depth understanding of the recall metric and its significance.

What is Recall?

Recall is one of the core metrics in binary classification tasks. It is designed to quantify how well a model can identify and predict positive cases. Mathematically, it’s represented as:

$$ Recall = \frac{\text{True Positives (TP)}}{\text{True Positives (TP)} + \text{False Negatives (FN)}} $$ \(\)

Where:

  • True Positives (TP): Actual positive instances that were rightly predicted by the model.
  • False Negatives (FN): Actual positive instances that the model incorrectly predicted as negative.

Significance of Recall

The metric becomes of paramount importance in situations where missing out on a positive instance is particularly costly. Consider a scenario where we’re testing for a life-threatening disease: failing to identify a patient with the disease (a false negative) could have dire consequences, making recall an essential metric. Here, maximizing recall is often prioritized to ensure that as few positive cases as possible are missed.

Transform your ML development with DagsHub –
Try it now!

Trade-off with Precision

Recall and precision often find themselves on opposite sides of a balance. As recall is increased (by predicting more instances as positive), there’s a likelihood that many of these predictions are incorrect, thus potentially reducing precision. In real-world applications, the choice between optimizing recall or precision is generally based on the specific costs associated with false negatives versus false positives.

Recall in Imbalanced Datasets

Recall is especially noteworthy when dealing with imbalanced datasets. If one class vastly outnumbers the other, models can be biased towards predicting the majority class. In such contexts, even a high-accuracy model can have a low recall for the minority class, making it imperative to monitor recall closely.

Application in Multi-class Classification

While the focus has primarily been on binary classification, recall is equally relevant in multi-class scenarios. In such situations, recall can be computed for each class individually by considering that class as positive and grouping all other classes as negative. An average recall score, either macro or weighted by the number of true instances for each class, can provide an overall picture of the model’s performance.

Tools and Libraries

For those working with Python, the scikit-learn library is an excellent resource, offering the recall_score function, which can compute recall for both binary and multi-class classification tasks.

Transform your ML development with DagsHub –
Try it now!

Back to top
Back to top