liveBook · Manning

Recall

As explained in Statistics Every Programmer Needs

Sensitivity is the proportion of actual positive instances that a classifier correctly identifies as positive.

Recall, also called sensitivity or the true positive rate, measures the share of actual positive instances that a classifier correctly identifies. It divides true positives by all actual positives: recall = TP / (TP + FN). section 5.2.4

Table 5.1 Confusion matrix for raisin classification. A confusion matrix stores classification metrics from a regression with actual and predicted binary outcomes.
Predicted
Kecimen (0)
Besni (1)
Actual
Kecimen (0)
tn
fp
Besni (1)
fn
tp

Use the confusion matrix to identify TP and FN: actual positives predicted positive are true positives, while actual positives predicted negative are false negatives. section 5.2.4

Calculate and interpret recall in two equivalent ways:

  • Compute the percentage directly from the confusion-matrix counts: (TP / (TP + FN)) × 100. section 5.2.4
  • Call scikit-learn's recall_score() with actual class labels and predictions; the default positive label determines which class supplies TP and FN. section 5.2.4
  • Compare recall with specificity, which measures correct identification of negative instances, to assess performance across both classes. section 5.2.4

Raisin classification

A logistic regression produces 384 true positives and 66 false negatives. Recall is 384 / (384 + 66) × 100 = 85.33%, meaning the model correctly identifies about 85% of actual positive instances. In Python, recall_score(raisins_subset['Class'], raisins_subset['prediction']) returns 0.8533. section 5.2.4

Recall evaluates one important dimension of binary classification performance. Alongside true and false positive rates, accuracy, misclassification rate, and ROC AUC, it helps identify model strengths and weaknesses and informs optimization or deployment decisions. section 5.3

How Statistics Every Programmer Needs covers it

How deep it goes
Defines the formula, maps it to confusion-matrix counts, and demonstrates direct and scikit-learn calculations.
Examples
Uses raisin classification counts, a confusion matrix, Python arithmetic, and scikit-learn's recall_score().
What it assumes
Assumes binary actual and predicted outcomes, while defining true positives and false negatives through the confusion matrix.
What you can do after
Apply it via scikit-learn or confusion-matrix counts to evaluate binary predictions.
How it connects
Connects recall with confusion matrices, specificity, false negative rate, accuracy, logistic regression, and ROC AUC.

Also explained in

Compare how 24 books explain recall →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.