Area Under Precision-Recall Curve

Description

Area Under Precision-Recall Curve (AUPRC) summarises how well a classifier finds the cases that matter when those cases are rare. Precision is the share of positive predictions that are correct, and recall is the share of actual positives that are found. Plotting one against the other at every classification threshold gives a curve, and AUPRC is the area under it, from 0 to 1. Neither precision nor recall uses true negatives, so a large majority class does not flatter the score as it can flatter accuracy and AUC-ROC. A model with no skill scores about the proportion of positives in the data, so the score is only meaningful next to that baseline.

Example Use Cases

Reliability

A payments team compares candidate fraud models on a held-out month of transactions in which about 1 in 500 is fraudulent. It ranks them by AUPRC against the 0.2% no-skill baseline, then reads the best model's curve to choose a threshold that keeps false alarms within what the investigation team can review.

A hospital evaluates a model that screens for a rare condition affecting about 1 in 200 patients. ROC AUC can look high even when most flagged patients are healthy, so the team reports AUPRC against the 0.5% baseline and reads the precision at the recall clinicians require, to decide whether the follow-up workload is manageable.

A manufacturer compares two defect-detection models for a production line where about 1 in 1,000 parts is faulty. It uses AUPRC on a labelled validation batch to choose between them, so that a model is not preferred simply for labelling nearly every good part correctly.

Limitations

  • AUPRC depends on the share of positives in the data, so scores from datasets or groups with different proportions cannot be compared directly, and no universal pass mark can be set. Each score has to be read against its own no-skill baseline, which is about the positive proportion.
  • It treats one class as the positive class and ignores true negatives, so it says nothing about how reliably the model clears the majority class. That matters where certifying a case as negative or safe is as important as catching positives.
  • A single area averages over every threshold, including ones no deployment would use, and can hide poor precision at the recall the application needs. Choosing the operating point needs a look at that part of the curve and the cost of each kind of error.
  • The area can be computed in different ways. Trapezoidal linear interpolation between points gives an overly optimistic value, whereas step-wise average precision does not, so scores from different libraries or settings may not match.
  • Few positive test cases make precision-recall estimates unstable, so a high score from a small sample may not hold on a larger, representative evaluation set.

Resources

Research Papers

The relationship between Precision-Recall and ROC curves
Jesse Davis and Mark Goadrich•Jan 1, 2006

Receiver Operator Characteristic (ROC) curves are commonly used to present results for binary decision problems in machine learning. However, when dealing with highly skewed datasets, Precision-Recall (PR) curves give a more informative picture of an algorithm's performance. We show that a deep connection exists between ROC space and PR space, such that a curve dominates in ROC space if and only if it dominates in PR space. A corollary is the notion of an achievable PR curve, which has properties much like the convex hull in ROC space; we show an efficient algorithm for computing this curve. Finally, we also note differences in the two types of curves are significant for algorithm design. For example, in PR space it is incorrect to linearly interpolate between points. Furthermore, algorithms that optimize the area under the ROC curve are not guaranteed to optimize the area under the PR curve.

Software Packages

scikit-learn

scikit-learn: machine learning in Python. Contribute to scikit-learn/scikit-learn development by creating an account on GitHub.

Tutorials

scikit-learn Precision-Recall
Scikit-learn Developers•Jan 1, 2007

Documentations

Precision, recall and F-measures (Metrics and scoring: quantifying the quality of predictions)

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...

Tags

Reliability Dimensions

Other Categories

Data Requirements:
Data Type:
Evidence Type:
Expertise Needed:
Technique Type: