liveBook · Manning

False positive

As explained in Statistics Every Programmer Needs

A false positive is a negative-class observation incorrectly classified as positive, or the corresponding count in a classification summary.

A false positive occurs when a negative observation is classified as positive. In a confusion matrix, it is the count where the actual label is 0 and the predicted label is 1. section 5.2.4 section 6.3.4

Table 5.1 Confusion matrix for raisin classification. A confusion matrix stores classification metrics from a regression with actual and predicted binary outcomes.
Predicted
Kecimen (0)
Besni (1)
Actual
Kecimen (0)
tn
fp
Besni (1)
fn
tp

Locate false positives at the intersection of the actual negative row and predicted positive column. section 5.2.4

Use false positives to evaluate classification behavior:

  • Count them directly by filtering actual labels equal to 0 and predictions equal to 1. section 5.2.4
  • Relate the count to specificity and the false positive rate: FPR = fp / (fp + tn). section 5.2.4
  • Adjust the probability cutoff when false positives are more costly than false negatives; a higher cutoff generally changes which cases become positive predictions. section 5.2.3
  • Inspect false positives alongside true positives, true negatives, and false negatives rather than relying only on overall accuracy. section 6.3.4

Raisin classification

A logistic regression produced 53 false positives: Kecimen raisins, coded 0, were predicted as Besni, coded 1. With 397 true negatives, the false positive rate was 11.78%. section 5.2.4

How Statistics Every Programmer Needs covers it

How deep it goes
Defines the confusion-matrix cell, demonstrates its count and rate, and stops short of deriving threshold optimization.
Examples
Uses raisin logistic regression and football decision-tree and random-forest confusion matrices with false-positive counts of 53, 67, and 70.
What it assumes
Assumes binary labels and predictions while establishing confusion-matrix components and metric calculations explicitly.
What you can do after
Diagnose classification errors with pandas or confusion matrices and compute the false positive rate for model interpretation.
How it connects
Connects false positives to confusion matrices, true negatives, false negatives, specificity, false positive rate, and classification thresholds.

Also explained in

Compare how 26 books explain false positive →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.