Accuracy, Precision, Recall, and F1

Different mistakes have different costs

A true positive (TP) is a correctly detected positive; true negative (TN) is a correctly rejected negative. A false positive (FP) is a false alarm, while a false negative (FN) misses a real positive.

Accuracy is (TP + TN) / all predictions. It can mislead on imbalanced data: predicting every transaction as legitimate may be 99% accurate while catching no fraud. Precision is TP / (TP + FP) and asks, when the model raises an alert, how often is it right? Recall is TP / (TP + FN) and asks, how many real positives did it find?

The F1 score is the harmonic mean of precision and recall. It rewards a balance between them, but it still hides which error is more expensive. In medical screening, recall may lead because missed disease is costly. In an expensive manual-review queue, precision may matter more.

Scenario: A screening service selects by accuracy and misses sick patients. The team changes its acceptance metric to recall, then examines the extra false alarms created by that choice.
Goal: Repair the model-evaluation lab, compare a dummy baseline with logistic regression, and select using the stated operational metric.