Deep Learning · MT2 · section

Training validation and test data

Neural-network foundations

Definition. Dataset partitioning separates parameter estimation, model selection and final performance assessment. This separation is essential to evaluate generalization without contaminating the evaluation with selection decisions.

Explanation and working

Training data changes the weights. Validation data helps choose settings such as layer size, learning rate and the stopping epoch. Test data is held back for the final estimate of performance on unseen samples. A possible split is 70% training, 15% validation, 15% testing, but the best split depends on the task and dataset size.

The three splits have different jobs. Only the training part is used to fit preprocessing and model parameters. Tap the diagram to enlarge.

For 1,000 independent samples, this split gives 700 training, 150 validation and 150 testing. Avoid putting duplicates or near-identical views of the same subject across splits. For time series, later observations normally belong after earlier observations rather than being mixed randomly without considering time.

Data leakage occurs when information that would not be available at prediction time enters training or model selection. Fitting a normalization rule to the whole dataset before splitting can leak information. Estimate preprocessing quantities from training data and apply the same rule to validation and test data.

Normalization example. To map a training range 0 to 100 into 0 to 1, divide by 100. A value 40 becomes 0.4. Standardization instead subtracts the training mean and divides by the training standard deviation. Scaling can make gradients easier to optimize; it does not create labels or guarantee accuracy.