CourseNatural Language Processing: The Complete Course · Module 5: Evaluation, Sentiment and Topics · part 33 of 73
Part 33 · Module 5: Evaluation, Sentiment and Topics

Lesson 1: Measuring a classifier: beyond one accuracy number

57 min read·14 Oct 2026
Module 5 · Lesson 1 · About 50 minutes · Needs: basic Python; Module 4 (a TF-IDF and logistic regression intent model) helps, but this lesson builds the model it measures

The situation

It is Monday 5 October 2026, project week 5. Rosa has read last week's result: the intent model gets 0.613 of HARD_TEST right, the 80 hand-written messages. "Sixty-one per cent. Is that good? Which messages does it get wrong, and who suffers?"

Ines points at one: "cheers for sorting the refund so quick, really appreciate it". That is praise, but the model sent it to returns_refund. One number cannot tell Rosa that. This lesson takes it apart by intent, by kind of mistake and by language (simulated data throughout).

THE INTENT MODEL ON HARD_TEST, 80 MESSAGES accuracy 0.613 one number praise: 2 of 10 found HT38 sent to returns_refund
One accuracy figure (blue: your measurement) hides that only 2 of the 10 praise messages were found (red: failure); HT38, a thank-you, went to the refunds queue.

The rest of this part opens with an account

Signing up is free and takes one email. Nothing to pay, and nothing renews.