Training data is a sample
What it is
A model learns from a sample of the world, and is used on the whole of it. The sample must look like the cases the model will meet:
- the same kinds of users, products and situations;
- in roughly the same proportions, or with the difference corrected for;
- from a recent enough period that behaviour has not changed.
Why it matters
Whatever the sample leaves out, the model does not know.
- A delivery model trained only on weekday orders has never seen a festival rush.
- A recommender trained only on loyal customers does badly for new ones.
- The gap between the sample and the real traffic is one of the main reasons offline scores do not survive launch.
In the real world: Kirana Kart samples training orders from every city and every hour, and checks that each city's share of the training set roughly matches its share of live orders.
Training on whatever is easiest to export. 'Orders from our biggest city last month' is convenient, and teaches a model that every city looks like that one.