Machine Learning Engineering · Module 12
Model evaluation and experimentation
- Lessons
- 12
- Free
- 1
- Reading
- ~3 h
Your progress
0 / 12 lessons done
Sign in to trackLessons
- Choosing a metric that matches the goalEvery model comparison you run ends in one number, and the team ships whichever model that number favours. If the number measures something the business never uses, you can ship a worse model with a better score.
- Precision and recall: two ways to be wrongFreeEvery model that answers yes or no makes two kinds of mistake, and they rarely cost the same. Precision and recall count each kind separately, so you can tell whether a new model is better at the thing the business pays for.
- ROC and precision-recall curvesAlmost every classifier at work is reported with one area-under-curve number. Knowing what that number counts, and which part of the curve your product actually uses, stops you shipping a model that scores higher on paper and does worse where it matters.
- Regression metrics: MAE, RMSE and beyondEvery model that predicts a number, from spend to delivery time to weekly demand, gets judged by one error number. Pick the wrong one and the model that wins the comparison is the one that does the job worse.
- Ranking metrics: NDCG, MAP and recall at kMost models that reach customers produce an ordered list, not a yes or no: recommendations, search results, a feed, a list of customers to contact. Score the list the way people use it, or you will ship models that look the same offline and behave differently in front of customers.
- Calibration: probabilities you can trustWhenever a model’s chance feeds a cut set from costs or a sum, such as a voucher budget, a fraud review threshold or an ad bid, a chance that is a few points off moves real money, even when the ranking is perfect.
- Error analysis: where and why the model failsA model’s overall score says how often it is wrong, never where or why. Error analysis turns thousands of mistakes into a short list of causes, so the next week of work goes to the fix that wins back the most, not to the tuning run that feels productive.
- Fairness: checking models for biasA model can look good on average and still serve one group of customers far worse. The overall precision never shows it. A per-group report does, and then someone has to decide which gap matters.
- Explaining predictions: SHAP and feature importanceSooner or later someone asks why the model scored a customer, a payment or a product the way it did. A chart of the most important features can’t answer that, and a wrong answer can send a team after a cause that isn’t there.
- Offline and online evaluationEvery model you ship passes through a gap between the notebook and the business. Teams that skip the steps across that gap either ship models that look better and do nothing, or wait months to learn that something broke on the first day.
- A/B testing ML modelsMost model changes move the business by a small amount, and a live test is the only way to measure it. A test read the wrong way ships the worse model with a confident number attached; a test sized the wrong way runs for months and can’t say anything.
- Experiment tracking: recording every runEvery model you ship was one of dozens of training runs. When someone asks which run it was, what data it saw or why last month’s model scored higher, the answer is either in a tracker or nowhere.
Practise with
No tools or paper guides for this module yet.