A true positive (TP) is a test example whose true class is positive and which the classifier correctly predicted as positive. It’s one of the four entries of the Confusion matrix for binary classification, alongside True negative (TN), False positive (FP), and False negative (FN).

In context: if the positive class is patient has heart disease, a true positive is a patient who actually has the disease and was correctly flagged by the model. If the positive class is email is spam, a true positive is a spam message that was correctly classified as spam.

True positives are the “good” predictions on the positive side of the confusion matrix, complementary to true negatives. Together, TP and TN make up the main diagonal — the cases the classifier got right. The classifier’s accuracy is .

Several metrics depend on TP in their numerator:

  • Recall (sensitivity, TPR) = — of actual positives, what fraction the classifier caught.
  • Precision = — of predicted positives, what fraction were actually positive.
  • F1 score — the harmonic mean of precision and recall.

A classifier with many TPs is doing well at finding the positives it should find. A classifier with few TPs is missing many real positives — either it’s too conservative (preferring to predict negative) or it just hasn’t learned the positive class well.

The labels positive and negative are arbitrary — which class we call positive depends on the question we’re asking. In medical screening, the diseased class is typically positive because that’s the case we want to catch. In quality control, the defect class is typically positive for the same reason. Swapping the labels swaps TP with TN and FP with FN; everything else follows.