DYAP 00915–20 minute lesson

Training, Validation and Testing Data

Training, validation and test sets answer different questions. Mixing their roles produces misleading results.

Editorial learning illustration for Training, Validation and Testing Data
Visual guide · Use the flow from inputs and evidence to models, outputs and human decisions.

What you will be able to do

  • Explain training, validation and testing data accurately in your own words.
  • Recognise how the concept appears in real AI products and professional work.
  • Identify an important limitation, risk or evaluation requirement.
  • Apply the concept through a practical activity and knowledge check.

Build the right mental model

The training set is used to fit model parameters. The validation set guides choices such as model type, features and hyperparameters. The test set is held back until the end to estimate performance on unseen data.

Data leakage occurs when information unavailable in real use influences training or evaluation. Leakage can create impressive test scores that disappear after deployment.

Random splitting is not always suitable. Time-based systems often need earlier data for training and later data for testing. Groups such as patients, customers or devices may need to remain entirely within one split.

01

Training set

Examples used directly to fit model parameters.

02

Validation set

Examples used to compare choices during development.

03

Test set

Held-back examples used for final performance estimation.

04

Data leakage

Information improperly crosses boundaries and inflates evaluation results.

Real-world example

Forecasting demand

A team randomly mixes future sales records into training while predicting earlier periods.

What this teaches: The model indirectly sees the future. A chronological split is required for a realistic evaluation.

Practical activity

  1. Design a split for a dataset from your field.
  2. State the unit that must not cross splits.
  3. Identify one feature that could leak future information.

Write your answers in a learning journal. The value comes from connecting the concept to your own profession.

Test your understanding

Q1Why should the test set be held back?

Answer: Repeatedly using it to make development choices causes overfitting to the test and weakens its independence.

Q2When is chronological splitting appropriate?

Answer: When the model will predict future events and real-world patterns may change over time.

Reflection

If you cannot explain the answer without reading it, revisit the core explanation and example before continuing.

Important industry resources

These links lead to official organisations, industry laboratories or established open-source learning projects.