liveBook · Manning

Precision-recall curve

As explained in Machine Learning Algorithms in Depth

A precision-recall curve plots precision against recall across classification thresholds.

A precision–recall curve evaluates a binary classifier across classification thresholds by plotting precision against recall. Each threshold changes the confusion-matrix counts and therefore produces a different point. section 5.2

Precision measures the fraction of predicted positives that are correct: TP/(TP + FP). Recall measures the fraction of actual positives detected: TP/(TP + FN). Averaging precision over recall values approximates the curve’s area. section 5.2

Threshold comparison

Adjusting a classifier’s threshold traces different precision–recall points. For a fixed threshold, the F1 score summarizes both measures as 2PR/(P + R), their harmonic mean. section 5.2

Figure 5.4 Receiver operating characteristic (ROC) plot (left) and precision-recall plot (right)
figure

Compare the precision–recall plot with the receiver operating characteristic plot in the paired figure. section 5.2

How Machine Learning Algorithms in Depth covers it

How deep it goes
Defines both axes, relates them to confusion-matrix counts, and adds mean precision and F1 summaries.
Examples
Uses a precision–recall plot and contrasts it visually with a receiver operating characteristic plot.
What it assumes
Assumes binary-classification thresholds and confusion-matrix counts including true positives, false positives, and false negatives.
What you can do after
Evaluate classifier performance across thresholds and summarize it with mean precision or F1.
How it connects
Connects classification thresholds with confusion matrices, receiver operating characteristic curves, area under the curve, and F1 scores.

Also explained in

Compare how 2 books explain precision-recall curve →

Related concepts

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