Recall measures how many relevant items a system successfully finds. For a classifier, it is the number of correctly identified positive cases divided by all actual positive cases: true positives / (true positives + false negatives). In search, a relevant document that goes unmatched is a false negative and lowers recall. section 4.2.1 section 10.3.2
Finding toxic comments
A classifier identified 125 of 326 actually toxic comments, giving it 38.3% recall. Labeling every comment nontoxic would score 87% accuracy on this dataset but have zero recall for toxicity. Labeling every comment toxic would achieve perfect recall while incorrectly flagging many nontoxic comments. The useful balance depends on whether the system alerts moderators or blocks publication. section 4.2.1
>>> from sklearn.metrics import confusion_matrix
>>> confusion_matrix(y_test, lda.predict(X_test))
array([[1261, 913],
[ 201, 125]], dtype=int64)
Inspect the classifier’s confusion matrix: its toxic-comment row contains 201 missed cases and 125 correctly identified cases, so recall is 125 / (201 + 125). section 4.2.1
Retrieval has the same problem. Lowercasing both a search index and its queries can match documents containing either “Age” or “age,” increasing recall but potentially returning unwanted results. Semantic search addresses another source of missed matches: a query about big cats may otherwise miss documents about lions, tigers, and jaguars that never say “cat.” More matches are not automatically better; check precision alongside recall. section 2.3.2 section 10.3.2























