All jobs / Data science / ML / AI / Model Evaluation
Data science / ML / AI interview question · 0–1 years
You have daily sales for two years. How do you split?
The strongest answer
By time — train on the past, validate a later window, test the latest you still refuse to touch — not a shuffle that leaks tomorrow into today
Why it works
Exactly. Time-ordered data needs a time-respecting cut. Shuffle is future leakage.
What a good answer covers
- Temporal data: split in time.
- Do not shuffle days.
- Keep all kinds of days in the holdout.
- Shared periods are leakage.
Answers that fall short
- Close, but not the strongest: Shuffle all days so every split looks similar
Similar-looking splits are how you cheat the calendar. - Weak: Put holidays only in train so the model “sees them”
Hiding holidays from val/test hides the days you will fail. - Red flag: Use the same week in train and test to keep the score high
Shared weeks are leakage, not robustness.
Who gets asked this
More Model Evaluation questions
- 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?
- When is ROC-AUC a reasonable headline, and when is it a dodge?
- A slide says “model accuracy 99%.” What do you add or refuse?
- Users appear across months. How do you validate a churn model?