MEPX
Chapter 3 of 10All chapters

Chapter 3 of 10

Training and testing

Honest evaluation.

The split

Hold back data the model never sees during training, and use it once at the end. A validation set is used for tuning so the test set stays untouched.

  • Cross-validation rotates the held-out part for a more reliable estimate.
  • Time series must be split by time, never randomly.

Leakage

If any information from the future or the test set reaches training, scores become fantastic and useless. It is the most common cause of a model that works in the notebook and fails in production.