A · The three-way split
Homework (training) · mock exam (validation) · final exam (test, sat once, at the very end). The curve is fitted on the training dots only.
training dots (homework)validation dots (mock exam)test dots (final exam, hidden)fitted curvehidden truth
Error on training dots
–
Error on validation dots
–
Error on test dots
???
Error vs degree. Training error only falls. Validation error makes a U. Pick the bottom of the U (the validation line), then reveal the test line to see how close you were.
B · Cross-validation: everyone takes a turn as the judge
All non-test dots are cut into k slices (folds). Each slice gets one turn as the mock exam while the model is fitted on the other slices. Average the k scores.
Press Run cross-validation.
| Fold | dots in slice | validation error |
|---|
CV-average error vs degree (red). The single-split validation line from panel A is drawn faintly for comparison.