Why do we split data into training, validation, and test sets, and what is each one used for?

technical-conceptual · Junior level · data-ml

What the interviewer is really asking

Assess whether the candidate understands the distinct role of each split and why touching the test set during development invalidates the final estimate.

What to say

What to avoid

Example answers

Strong: On a classification project I trained on 70% of the data, used a 15% validation set to grid-search the regularisation strength and pick between logistic regression and a gradient-boosted model, then evaluated the single winning model once on the held-out 15% test set — that test number was the one I reported to stakeholders.

Weak: I split into train and test, then keep checking the test score after each change until it looks good.

Want questions matched to your role? Paste a job title, job description, or CV and get a personalized set, or go Pro to unlock the full bank.