Operating-Point ROC Analysis
Description
Operating-point ROC analysis measures how often a classifier makes each kind of mistake at the decision threshold it will actually use, which is the evidence behind claims such as 'the false-positive rate stays within acceptable bounds'. A classifier that outputs a score is turned into a yes-or-no decision by a threshold, and moving the threshold trades one kind of error against the other. On a labelled held-out set, the receiver operating characteristic (ROC) curve plots the true-positive rate (the share of actual positives that are flagged, also called sensitivity) against the false-positive rate (the share of actual negatives wrongly flagged, equal to one minus specificity) at every possible threshold; the operating threshold is then chosen from the curve to meet a stated limit on one error rate or to minimise the expected cost of errors, or an existing threshold is confirmed. At that one threshold the analysis reports the confusion matrix (the counts of true positives, false positives, false negatives and true negatives) and the false-positive and false-negative rates with their complements, specificity and sensitivity. The output is a set of error rates tied to a named threshold and a named test set, against which a requirement on error rates can be checked.
Example Use Cases
Reliability
A hospital's clinical informatics team evaluating a vendor's sepsis alert scores a year of its own admissions, plots the ROC curve and fixes the alert threshold its operations committee chose from the vendor's recommended range. At that threshold it reports sensitivity, specificity, positive predictive value and the share of all admissions that would trigger an alert, and uses the false-positive count and alert volume to decide whether ward staff can act on the alerts.
A card-payments company re-runs the analysis every month on transactions its fraud analysts have labelled, confirms that the false-positive rate at the live threshold is still under the limit agreed with its customer-service team, and, whenever the rate has drifted above that limit, reopens the threshold choice on the latest ROC curve and confirms the new threshold on the following month's labelled sample.
A manufacturer's quality engineers choose the threshold for a visual-inspection model by weighing the cost of scrapping a good part against the cost of shipping a defective one, using the ROC curve and the line's defect rate, then report the false-reject and defect-escape rates that the chosen threshold gives on a separate held-out production batch.
Safety
A rail operator's safety team assessing a camera-based obstacle detector for level crossings sets the decision threshold on a tuning set so that the miss rate meets the requirement allocated to the detector. It then measures the false-negative rate at that threshold on a separate set of recorded crossings, broken down into daylight, night and rain, and enters the confusion matrices in the safety case as verification evidence.
Limitations
- The rates are evidence only if they are measured on labelled cases that played no part in choosing the threshold. A threshold set to give a 1 per cent false-positive rate on a tuning set gives exactly that rate there by construction, and with a few hundred negative tuning cases its true rate on new data can be half as high again. Choosing the threshold on one set and reporting rates on another, or nesting the choice inside cross-validation, avoids this at the cost of more labelled data.
- False-positive and true-positive rates do not change with how common the positive class is, but the share of alerts that are correct does. A false-positive rate within its limit can still mean most alerts are false when the condition is rare: at 90 per cent sensitivity and a 5 per cent false-positive rate, only about 15 per cent of alerts are correct when 1 case in 100 is positive. Claims about alert burden need the positive predictive value at the deployment prevalence as well.
- A rate from a finite test set is an estimate, and with few negatives or few errors it can fall well below the true rate by chance. A claim that a rate is within a limit needs a confidence interval (exact binomial for a single rate; see Bootstrap Confidence Intervals for Evaluation Metrics for other metrics) narrower than the margin to the limit. With no misses, about 3,000 positives show a miss rate below 1 in 1,000, and 30,000 below 1 in 10,000, at 95 per cent confidence.
- The threshold is a fixed score, so the rates hold only while the scores for each class stay as in the test set. A new scanner, fraud pattern or patient mix shifts the scores and moves the false-positive rate with no change to the model, so the analysis must be repeated on labelled operational samples, which can be slow or costly. Labels matter too: where only flagged cases are reviewed, the rate for unflagged cases is unknown unless a random sample of them is labelled.
- A single rate averages over the whole test set. It can meet its limit overall while exceeding it for a group of people or an operating condition (night-time images, one hospital site) that is rare in the test data. Rates need reporting for each group and condition the claim covers, each with enough cases to be informative, which can multiply the labelled data required.
Resources
Research Papers
Software Packages
Tutorials
Documentations
Receiver operating characteristic (ROC) (Metrics and scoring: quantifying the quality of predictions) — scikit-learn user guide
Which scoring function should I use?: Before we take a closer look into the details of the many scores and evaluation metrics, we want to give some guidance, inspired by statistical decision theory...