liveBook · Manning

Specificity

As explained in Machine Learning System Design

The proportion of actual negative cases that a classifier correctly identifies.

In fraud detection, most transactions may be genuine. Specificity, also called the true negative rate, is the share of genuine transactions correctly left unflagged: TN / (TN + FP). Unlike precision, it does not change solely because the balance of fraud and genuine cases changes. section 5.2

A low false-positive rate can still mean many bad alerts

Suppose two models each catch 80 of 100 fraud cases among 100,000 genuine transactions. Model A falsely flags 20 genuine transactions; model B flags 920. Their specificities are 99.98% and 99.08%, respectively. Both look high, but only 80 of model B’s 1,000 fraud alerts are correct. Check precision as well when the usefulness of alerts matters. section 5.2

How Machine Learning System Design covers it

How deep it goes
Defines specificity through negative-case counts and compares its class-balance behavior with precision, without developing a deeper derivation.
Examples
Uses changing positive-to-negative sample counts and two fraud models with equal recall but different false-positive counts.
What it assumes
Assumes familiarity with positive and negative cases and true and false classification outcomes.
What you can do after
Evaluate/understand it alongside precision so high specificity does not conceal a large share of incorrect fraud alerts.
How it connects
Connects specificity to true negative rate, false positive rate, precision, recall, and class imbalance.

Also explained in

Compare how 6 books explain specificity →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning System Design. The section links point to the parts of the book it draws on.