Lesson 2: Cross-validation, tuning and messages that fit nowhere
58 min read·14 Oct 2026
Module 5 · Lesson 2 · About 55 minutes · Needs: basic Python; Lesson 1 of this module (precision, recall and macro F1) helps, but this lesson builds the model it tests
The situation
It is Wednesday 7 October 2026, project week 5. Rosa wants the intent router to run on its own, with Ines checking only what it sends her. Ines has three conditions: an honest score, not one tuned until it looks good; praise and spam, the smallest intents, not ignored; and when the model is unsure, or a message fits no intent, it passes the message to her.
The running example is HT15, hand-written and labelled praise: "Bike is lovely, delivery was a nightmare. Overall happy though, thanks Ines." Lesson 1's model sent it to repair_booking. All data is simulated.