liveBook · Manning

Data representativeness

As explained in Deep Learning with Python, Third Edition

The degree to which a validation set reflects the distribution and variety of the data the model will face in practice.

Data representativeness means making training, validation, and test data resemble the cases a model will encounter in practice. A convincing score depends on that match. section 5.2.3 section 6.2.2

The ordered-digit trap

Suppose digit samples are ordered by class. Taking the first 80% for training and the last 20% for testing puts classes 0–7 in training and classes 8–9 in testing. Randomly shuffling before splitting usually prevents this mismatch. section 5.2.3

Use these practical checks when choosing an evaluation protocol:

  • Shuffle before splitting when observations have no meaningful time order. section 5.2.3
  • Preserve chronological order when predicting the future from the past; otherwise, future data leaks into training. section 5.2.3
  • Keep training and validation sets disjoint, especially when duplicate samples exist. section 5.2.3
  • Choose hold-out validation, K-fold cross-validation, or iterated K-fold validation according to dataset size. section 6.2.2

How Deep Learning with Python, Third Edition covers it

How deep it goes
Explains representative splitting through a digit example and adds temporal-order and duplicate-data caveats.
Examples
Uses ordered digit classes, future prediction, duplicate samples, and hold-out or cross-validation protocols.
What you can do after
Diagnose unreliable evaluation splits and choose a validation protocol suited to data volume and temporal structure.
How it connects
Connects training sets, validation sets, test sets, temporal leakage, cross-validation, generalization, underfitting, and overfitting.

Also explained in

Compare how 2 books explain data representativeness →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with Python, Third Edition. The section links point to the parts of the book it draws on.