Tensor by Tensor

02.05 · UNIT 02 · Supervised learning and reliable experiments · Lesson

Datasets, batching, splits, and trustworthy metrics

Separate data gives parameter learning, model choices, and final testing different jobs.

PLAIN-LANGUAGE INTRODUCTION

What is this?

Separate data gives parameter learning, model choices, and final testing different jobs.

One simple example

Split 100 rows into 70 training, 15 validation, and 15 test rows.

What goes in?

Examples, targets, and a split rule chosen before training.

What comes out?

Separate batches and honest measurements on untouched rows.

Why does it matter?

A final test must not guide training or model choices.

What is it not?

A low training error does not show performance on new data.

WORK THROUGH THE IDEA

See the idea in more detail

  1. Training rows change model parameters. Validation rows help choose settings. Test rows give the final check.
  2. For 100 rows, this example assigns 70, 15, and 15 rows.
  3. Suppose training values have mean 10 and standard deviation 2. Transform validation value 14 to (14−10)/2 = 2.
  4. Fit preprocessing only on training rows. Then reuse those fitted numbers everywhere else.
  5. Common mistake: fitting a scaler on all rows leaks information from validation and test data.
Open the detailed notes ↗