Data ScienceData science careers and portfolio decisions

Explain model validation in a data science interview

PK
Pankit Kumar
Sr. Data Scientist at Parexel (a Goldman Sachs–backed company) · 20 September 2026 · 2 min read
Technically reviewed by Ishaan Sharma
In this article (5 sections)

A strong validation answer does more than define three dataset names. It explains which decisions each split may influence, how the split resembles future use and why repeated test inspection stops the test from being independent.

Give every split one role

The career evidence lab records a concise answer.

python
from career_cases import validation_interview_case

result = validation_interview_case()
assert result["answer_complete"] is True
assert result["test_used_for_selection"] is False
print(result["split_roles"])

Training data fits model parameters and preprocessing. Validation data selects features, hyperparameters, candidates and a decision threshold. Test data provides one final estimate after those choices are frozen. Cross-validation can rotate training and validation folds, but it does not make the final test set available for tuning.

Choose the split from the failure mode

Random splitting assumes rows are suitably exchangeable. That is unsafe when time, groups or spatial structure connect observations. A future deployment usually needs chronological evaluation. Repeated observations from the same account may require grouped splitting. A medical model may need a site holdout to test transport across hospitals.

Describe the unit of independence. If transactions from one customer appear in both train and validation, the model may learn identity rather than a pattern that transfers to new customers. If a scaler, imputer or feature selector sees every row before splitting, validation information has already entered training.

Discuss uncertainty and iteration

One score is a sample result. Report the denominator, class prevalence, metric definition and relevant uncertainty or variation across folds/time windows. Inspect slices tied to the intended decision. If the team repeatedly changes the model after viewing test errors, that set has become another validation set; obtain a new untouched evaluation set or describe the evidence honestly.

A compact interview answer can follow this structure: deployment scenario → independence unit → split strategy → preprocessing boundary → selection metric → locked test → uncertainty and slices. Use a real project example and name one mistake you prevented.

The Data Science course develops this answer through split manifests and evaluated projects rather than memorized definitions.

Exercise

Explain validation for three cases: new-customer churn, next-month demand and defect detection across factories. Choose random, grouped, chronological or site-based boundaries, then state what information must remain unavailable during selection.

Continue learning

This article is part of the Data science careers and portfolio decisions sequence. Use the neighbouring tasks when you need the prerequisite or the next application.

Reference: scikit-learn cross-validation guidance.

PK
Pankit Kumar
Lead Instructor, NeuraPath Academy

Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.

This article is part of our Data Science programme — 6 months. From data foundations to machine learning, deep learning and deployment.

Explore Data Science
Counselling is free · no obligation

Not sure which programme fits?

Tell us your background and we will map it to the right entry point — including saying so when a cheaper programme is the better fit. A counsellor replies within one working day.