AI Glossary / Causal inference and experimentation / Beginner

True positive rate

Definition

True positive rate is the proportion of actual positive cases that a classifier correctly identifies as positive. It is also called recall or sensitivity. Its formula is TP / (TP + FN), where TP means true positives and FN means false negatives.

What it means

The question is: of the cases we wanted to detect, how many did the system catch? A positive case is whichever class the task designates as positive. It could be a defective component or a relevant document; positive does not necessarily mean desirable.

The denominator contains actual positives, including those the classifier missed. It does not contain every item the system flagged. That other denominator belongs to precision, which asks how trustworthy the positive predictions are.

A rate of 80% means that four out of five labeled positive cases were detected in the evaluated sample. It does not establish that every future group will achieve that rate. The number, selection and reliability of the labeled cases matter.

How it works

First define the positive class and obtain appropriate reference labels. Apply the classifier using a stated decision threshold. Count correctly flagged positive cases as TP and missed positive cases as FN, then divide TP by their sum.

For a fixed set of prediction scores, lowering the positive threshold generally detects more actual positives. It can also flag more negative cases. A receiver operating characteristic curve shows this trade-off by plotting true positive rate against false positive rate across thresholds.

A classifier that labels everything positive obtains a true positive rate of one whenever actual positives exist. Its false alarms can make it useless. Read the measure alongside false positive rate, precision and the consequences of errors.

When a sample contains no actual positives, the mathematical ratio is undefined. Software may use a configured convention or warning. Report that lack of evidence rather than presenting a substituted number as measured detection performance.

Three practical examples

  • A document search team measures how many genuinely relevant files appear among the files its filter accepts.
  • A manufacturing team measures the fraction of labeled defective components that an inspection model flags.
  • A support team measures how many genuinely urgent requests its routing system sends to the urgent queue.

Think of it this way

Think of a net intended to collect red balls from a mixed container. True positive rate measures how many of the red balls the net collects. It says nothing by itself about how many blue balls also enter the net.

Real classification has uncertain labels and changing populations, unlike a container with perfectly known colors. The analogy explains the denominator, not the reliability of the reference labels.

Worked example

Separating detection from false alarms

An invented inspection dataset contains 1,000 components, including 100 labeled defects. The model detects 80 defects and misses 20. It also flags 90 of the 900 non-defective components.

True positive rate is 80 / (80 + 20) = 0.80, or 80%. Precision is 80 / (80 + 90), approximately 47.1%. False positive rate is 90 / 900 = 10%.

These numbers describe different questions. The model catches most defects, but fewer than half of its flags correspond to defects. A business with limited review capacity might find that burdensome. Changing the threshold requires measuring the new counts rather than assuming detection improves without additional false alarms. The example is arithmetic, not a recommended inspection target.

Illustrative case study

A fictional archive service, Willow Records, filters documents for references to a particular contract. Its first demonstration highlights a high true positive rate on a collection where relevant documents are common.

The deployment collection contains far fewer relevant documents. Reviewers encounter many unhelpful flags even though detection of genuinely relevant items appears similar. The team separates detection rate from precision and examines both on representative collections.

It also checks short scanned documents separately because those documents were underrepresented in the demonstration. A single overall detection rate had hidden uncertainty about an important document type. The revised report includes counts and the collection characteristics rather than advertising one universal percentage.

Common misconceptions and mistakes

Do not confuse true positive rate with the percentage of all predictions that are correct. Overall accuracy includes true negatives as well.

Do not confuse it with precision. A model can have high recall and low precision when it accepts many cases indiscriminately.

Avoid comparing percentages without examining denominators. Nine detections out of ten positives provide different evidence from 900 out of 1,000. Differences between groups may reflect sampling variation, label quality or genuine performance differences; the rate alone does not explain the cause.

Business use

Use true positive rate when missed positive cases carry a meaningful cost. Define that cost alongside the capacity and cost of investigating false alarms.

Reports should identify the positive class, threshold, reference-label process, sample period and actual-positive count. Compare relevant subgroups and operating conditions, with suitable uncertainty estimates when decisions depend on small differences. Choose an operating threshold using development evidence and business requirements, then evaluate it on appropriately separate data.

People also ask

Is true positive rate the same as recall?

For the specified positive class in binary classification, yes. Multiclass recall summaries depend on how class-specific values are averaged.

Does 100% true positive rate mean a perfect classifier?

No. A classifier that flags every item can achieve it while producing many false positives.

Can the rate change without changing the model?

Yes. A threshold change or a change in the types of positive cases being evaluated can change the measured rate.

Check your understanding

A system detects 45 of 60 actual positive cases and issues 75 positive predictions overall. What is its true positive rate?

Answer: 45 / 60 = 75%. The calculation 45 / 75 = 60% measures precision instead.

Related terms

  • Recall
  • Precision
  • False negative
  • False positive rate
  • Confusion matrix
  • Classification threshold
  • ROC (receiver operating characteristic) Curve
  • sensitivity
  • ROC curve
  • class imbalance

Learn next

Construct a confusion matrix for a small example and calculate recall, precision and false positive rate separately. Then vary a threshold and observe which counts change. Study ROC and precision-recall curves before choosing a threshold from a single headline score.

  • False positive rate
  • Confusion matrix
  • Recall
  • Precision

More in Causal inference and experimentation

  • Training loss - Training loss is the value of the learning objective measured on examples used to fit a model.
  • Treatment-confounder feedback - Treatment-confounder feedback occurs when earlier treatment changes a later variable that both influences subsequent treatment and predicts the outcome.
  • Treatment effect - A treatment effect is the causal difference between outcomes under two specified interventions or treatment conditions.
  • Validation - Validation is the assessment of a model or system against criteria that help determine whether it is suitable for its purpose.
  • Validation error - Validation error is the average loss a trained model incurs on a validation dataset that is separate from the examples used to fit it.
  • Validation loss - Validation loss is the value of a specified loss function measured on validation data for a model checkpoint or candidate.

Sources

Sources: Google Machine Learning Glossary, true positive rate: https://developers.google.com/machine-learning/glossary#true-positive-rate Google, accuracy, precision and recall: https://developers.google.com/machine-learning/crash-course/classification/accuracy-precision-recall Google, ROC and AUC: https://developers.google.com/machine-learning/crash-course/classification/roc-and-auc Scikit-learn, classification metrics and averaging conventions: https://scikit-learn.org/stable/modules/model_evaluation.html

Previous: True positive Next: Truncated Newton method

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer