How do you pick the train/validation/test split sizes?
easyAnswer
- Depends on total n and problem noise.
- Small (n < 10k): 70/15/15 or use CV on train+val and hold out ~15% for final test.
- Medium (10k-1M): 80/10/10.
- Large (1M+): 98/1/1 is often enough — validation just needs a stable estimate of the metric (typically ≥ 10k samples).
- Time series: contiguous, in temporal order, with test as the newest chunk.
- Imbalanced: ensure enough minority-class examples in val and test — stratify.
Check yourself — multiple choice
- Always 33/33/33
- Scale by data size — small: 70/15/15; medium: 80/10/10; large: 98/1/1; stratify on imbalance
- Split randomly regardless of order
- Never split the data
Scale to data size; ensure enough minority-class samples in each split (stratify).
#cv#validation
Practise Supervised Learning
215 interview questions in this topic.
Related questions
- Leave-One-Out CV — when is it a good idea, and when is it a bad idea?
- What is nested cross-validation and when do you need it?
- Why would you use repeated k-fold instead of standard k-fold?
- How do you set up cross-validation for time series?
- How does cross-validation change for heavily imbalanced classification?
- You use stratified k-fold on a dataset with duplicate customer records — why is it wrong?