IntermediateAbout 22 min

    Precision/Recall Trade-off & PR vs ROC

    Read the full article on Substack

    6 min read.

    A classifier outputs a score, not a class — something compares it to a threshold. Drag that threshold and watch every metric move, then drag the positive class rare and watch the ROC curve hold steady while the PR curve collapses. Same model, same scores, two different verdicts.

    negativespositivesscore →
    PRAUC 0.925
    recallprecision
    ROCAUC 0.925
    false positive ratetrue positive rate

    Precision 87.7%, recall 78.3%. With balanced classes the two curves broadly agree. Drag the positive class rate below 10% and watch them split.

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Which error is worse here?

    Sort

    Sort each application by the metric it should optimise.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    Favour recall

    Drop items here

    Favour precision

    Drop items here
    6 pieces left to place

    Quiz

    20 questions
    Question 1 of 20
    Score: 0

    What does a binary classifier actually produce before any class label exists?

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going