Suppose you use a train/validation/test split to choose among M=100 candidate models (with 0–1 loss) on a validation set of size nval. Using Hoeffding's inequality and the union bound, how large must nval be so that simultaneously all M validation errors are within ϵ=0.05 of their true errors with probability at least 95%, why do large datasets not need 20\% validation splits, and should you retrain on train+validation before testing?

Foundations, Model selection
Level L4 Advanced. Length Medium. Nature Th+Mat Both.

What's being asked

Whether you can size a validation set quantitatively from Hoeffding + union bound and design train/validation/test splits properly across dataset scales.

Key idea

Validation accuracy depends on the *absolute* validation count nval (growing only as ln⁡M) rather than a fixed percentage of n, and once λ∗ is locked in, retraining on train+validation uses more data without touching the test set.

Steps

  1. Apply Hoeffding's inequality and the union bound over the M fixed trained models: for each model m, R^val(m) is an average of nval i.i.d. Bernoulli indicators in [0,1], so P(∣R^val(m)−R(m)∣>ϵ)≤2e−2nvalϵ2. By the union bound over M models, P ⁣(max⁡1≤m≤M∣R^val(m)−R(m)∣>ϵ)≤2Me−2nvalϵ2≤δ.
  2. Solve for nval with M=100, ϵ=0.05 and δ=0.05: nval≥12ϵ2ln⁡ ⁣(2Mδ)=12(0.0025)ln⁡ ⁣(2000.05)=200ln⁡(4000)≈200×8.2940=1658.81, so nval=1,659 examples suffice (notice nval grows only logarithmically in M, though choosing adaptively on the validation set repeatedly still erodes the independence of later candidates).
  3. Explain split sizing across dataset scales: for n=107, a 20\% validation split wastes 2×106 training points when 10,000 validation examples (0.1%) already achieve standard error ≤0.5%, so splits like 98/1/1 are sensible at massive n. Conversely, for small n (say n=200), a single 20\% validation set (40 points) is too noisy, motivating k-fold CV.
  4. Address retraining: once you pick the single best hyperparameter λ∗ on the validation set, yes — retrain the model from scratch on the combined train+validation data with λ∗ fixed, and evaluate that final model once on the untouched test set (provided λ∗ does not depend directly on sample size, or is scaled appropriately, e.g., regularisation strength λ∝1/n in an averaged-loss objective, and early-stopping epochs are handled carefully since no separate early-stopping set remains).

Common mistakes

How long your answer should be

Half a page; 5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Foundations: Suppose you evaluate M hyperparameter settings using a single 5-fold cross-validation loop and report the minimum CV error min⁡merr^m as your model's expected generalisation error. Why is this estimate optimistically biased, how does nested cross-validation eliminate this selection bias, and how many model fits does a Kout-outer, Kin-inner nested CV over G hyperparameter candidates require for Kout=5, Kin=4 and G=10 (including refitting)?
Next in Foundations: A binary classification population has positive-class proportion p∈(0,1), and a fixed classifier has true error rates e1 on positives and e0 on negatives. How do the bias and variance of the validation error estimate compare between m i.i.d. validation draws (simple random sampling) and m stratified validation draws (m1=mp positives and m0=m(1−p) negatives, assumed integers), and when does stratification reduce variance the most?