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























