Data & validation

A model learns from examples. How do you know it learned the pattern and not just the examples?

Training, validation and test

40 points; the model learns from 24, is compared on 8 and tested on 8.

Training error (RMSE)
–
Validation error (RMSE)
–

RMSE: a typical error, in the same unit as y.

The model's parameters

The weights are learned; the degree and λ are hyperparameters.

Show the points
xySet

K-fold cross-validation

The 32 points that are not test are split into k parts; each part validates once.


Grid search

Every combination of degree and λ, scored with cross-validation.

lower error higher error


The test data, once

Train the winner on all 32 points and try it on the 8 test points: that is the number to report.