All jobs / Data science / ML / AI / Model Evaluation
Data science / ML / AI interview question · 0–1 years
Why do we split data into train, validation, and test instead of one pile?
The strongest answer
Train fits the model, validation guides choices I still control, test is a last look I do not tune against — two piles collapse those jobs
Why it works
Exactly. Three roles: fit, choose, report. Mixing them is how scores lie to you.
What a good answer covers
- Train fits; val chooses; test reports.
- Do not tune on test.
- Two piles merge choice and report.
- More data is not a substitute for a held-out look.
Answers that fall short
- Close, but not the strongest: Three folders look more professional; any random split into three is fine
The count of folders is not the method. The rule is what you are allowed to look at. - Weak: Validation and test are the same thing; I pick the nicer number
If you pick the nicer number, that set is no longer a test. - Red flag: I train on everything so the model “sees more” and then quote that score as the result
Training on everything and calling it the result is the definition of an untested fit.
Who gets asked this
More Model Evaluation questions
- A teammate keeps rerunning the test set after each hyperparameter tweak. What do you say?
- Fraud is 1% of rows. The model is “99% accurate.” What is the problem?
- You have daily sales for two years. How do you split?
- When do you care more about recall than precision for a screening model?
- The interviewer draws a 2×2 and asks where a false negative sits. Strongest answer?
- A few huge outliers dominate the loss. What do you say in an interview?
- A peer says “we optimise F1 because that is what ML people do.” Your reply?
- Each user has 40 sessions. You split rows at random. What goes wrong?