Continue where you left off ×
Honest scores: cross-validation, leakage and bias-variance
How Do You Know It's Good · Open board
The board that asks how you know a model is good. This lesson is the first answer for models that learn from rows of numbers: grade them only on rows they have never seen.
Before you start. You need Precision and Recall (where to set the spam filter's bar) , where a model gave a yes-or-no answer and you counted its right and wrong answers in four boxes. You need How It Learns (loss, gradient descent, backprop) , where a model nudges its weights to make its error smaller on the examples it is shown. This lesson asks the next question: error on which examples? It also feeds Trees, forests and boosting and Groups nobody labelled: k-means and PCA , whose models need the same honest grading.
The idea in 30 seconds
Split data into training (learn), validation (choose) and test (report once), and never choose with the test set.
Training error always falls as a model gets more freedom, so it cannot tell you the model is good.
Overfitting is a model learning noise: low training error, high error on fresh rows.
Cross-validation tests on every fold in turn, and you read the mean and the spread.
Leakage is test information reaching the model early, and 96% on pure noise shows how large it can be.
Every learning step belongs inside the fold, not before the split.
Read the story
Lesson 26 of 83 in AI
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year .
See plans Already a member? Sign in
Or start free : a free account opens lessons 2 and 3 of every track.
In this lesson 2009: the Netflix Prize and the half nobody could see Training, validation and test sets: three piles with three jobs Overfitting: a curve that learns the noise Cross-validation: five tests instead of one Leakage: when the answer sneaks into the question Bias and variance: two ways to be wrong Regularisation: a penalty that tames the wobble Metrics beyond accuracy Where honest splits go wrong in practice All of it in code Terms it explains: training set, validation set, test set, overfitting, Cross-validation, Leakage, Common mistakes, Bias, Variance, underfitting, Regularisation, 2).sum(1) > ((Z-mp).
Review AI
Mark as read Saved in this browser, and to your account when you sign in.