CourseAI Engineering: The Complete Course · Module 3: Machine Learning Basics · part 26 of 105
Part 26 · Module 3: Machine Learning Basics

Lab: Build the ticket classifier baseline

13 min read·13 Oct 2026
Module 3 · Lab · About 45 minutes · Needs: lessons 1, 3 and 4 (cross-validation, the confusion matrix, pipelines and joblib)

What you are building

40 tickets text + label Pipeline tfidf word scores clf classifier category one of four WHAT THE LAB PRODUCES scorecard 0.25 vs 0.55 confusion matrix 4 x 4 counts error table 18 tickets joblib file pipeline + scores loaded by Modules 5, 7 and 12
The finished piece: one pipeline (blue: your system) that turns raw ticket text into a category (green: the answer), plus the scorecard, confusion matrix and error table that say how far to trust it (amber: measured, uncertain), and the saved file a service would load.

Priya wants tickets sorted into refund, shipping, warranty or other before a person reads them. By the end of this lab BrightCart has its first classifier: one scikit-learn pipeline that takes raw text and returns a category, scored honestly against a do-nothing baseline on the 40 labelled tickets, with a confusion matrix and an error table that say where it goes wrong. The fitted pipeline is saved to ticket_classifier.joblib with its scores inside, the way a service would load it. Module 4's lab refits the same pipeline as its baseline. Later modules compare against the numbers recorded here (0.55 against 0.25), not the file. No model key is needed; everything runs locally in Colab.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.