Ultralytics YOLO27: Join the waitlist.
License YOLO
Back to Ultralytics Glossary

False Positive Rate

False positive rate (FPR) is the share of actual negatives wrongly labeled positive, with its formula, related metrics, and threshold effects explained.

False positive rate (FPR) is the proportion of actual negative examples that a model incorrectly classifies as positive. It measures false alarms among cases where the target condition is absent. In machine learning, it helps evaluate classification systems when unnecessary alerts carry operational costs.

How to Calculate False Positive Rate#

FPR uses two counts from a confusion matrix: false positives (FP), negatives incorrectly labeled positive, and true negatives (TN), negatives correctly labeled negative. The ground-truth labels establish which examples are actually negative.

FPR = FP / (FP + TN)

The denominator includes every actual negative. FPR ranges from 0 to 1; multiplying by 100 gives a percentage. With 20 false positives and 980 true negatives, FPR is 20 / 1,000 = 2%. With no actual negatives, FPR is undefined.

Install scikit-learn to calculate FPR using its bundled handwritten-digit images. This logistic regression classifier recognizes the digit 9; scikit-learn's confusion matrix supplies the error counts.

from sklearn.datasets import load_digits
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import confusion_matrix
from sklearn.model_selection import train_test_split

images, digits = load_digits(return_X_y=True)
# Treat 9 as positive and every other digit as negative.
labels = (digits == 9).astype(int)
X_train, X_test, y_train, y_test = train_test_split(images, labels, test_size=0.3, random_state=42, stratify=labels)
model = LogisticRegression(max_iter=1000)
model.fit(X_train, y_train)
predictions = model.predict(X_test)

tn, fp, fn, tp = confusion_matrix(y_test, predictions, labels=[0, 1]).ravel()
fpr = fp / (fp + tn)
print(f"False positive rate: {fpr:.2%}")

The percentage measures how often held-out images of other digits are incorrectly recognized as 9.

FPR vs. Specificity, Precision, and Recall#

Specificity is the true negative rate, TN / (TN + FP), so FPR = 1 − specificity. A specificity of 98% corresponds to an FPR of 2%. True positives (TP) are correctly identified positives; false negatives (FN) are actual positives labeled negative.

The related metrics use different denominators:

  • Precision: TP / (TP + FP) measures correctness among positive predictions. Its complement, FP / (TP + FP), is the false discovery proportion.
  • Recall: TP / (TP + FN), also called sensitivity or true positive rate, measures how many actual positives are found. False negative rate is 1 − recall.
  • Accuracy: (TP + TN) / all examples measures overall correctness. FPR isolates mistakes within the negative class.

FPR's statistical foundation is Type I error: rejecting a true null hypothesis. Jerzy Neyman and Egon Pearson formalized controlling this error while maximizing detection power in their 1933 hypothesis-testing framework.

Thresholds and False Alarm Costs#

A confidence threshold turns scores into decisions. For fixed scores, raising it can only maintain or reduce FPR, while recall can also decrease. A receiver operating characteristic (ROC) curve plots recall against FPR across thresholds; area under the curve summarizes that ranking behavior.

FPR multiplied by negative-case volume gives the expected false-alarm count. Threshold selection uses validation data, with final reporting on separate test data. Hard negative mining focuses training on confusing negatives. Ultralytics YOLO26 models expose conf in Predict mode, filtering detections below a chosen score threshold and changing which false alarms reach an application.

In healthcare, false-positive screening results can cause anxiety and additional invasive procedures.

FPR in Computer Vision#

In object detection, unmatched bounding boxes count as false positives; duplicate boxes can also count despite matching a labeled object's class and intersection over union requirements. Background regions have no standard true-negative count, so detection commonly uses false positives per image or a precision-recall curve. For image-level FPR, define a positive as at least one target-class detection: each target-absent image with such a detection contributes one FP, regardless of box count.

In security, facial recognition can produce erroneous identity matches. NIST's one-to-many evaluation defines false positive identification rate as the proportion of searches by people absent from the gallery that return at least one candidate above the match threshold.

Explore solutions

Computer vision in sports

Computer vision in sports

Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Turn drone and aerial imagery into real-time insights for agriculture, aquaculture, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Apply computer vision in aerospace with Ultralytics YOLO for aircraft inspection, runway FOD detection, airport ground operations, and composite defect detection.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning