Model Evaluation and Validation Questions
Measuring whether a model is good enough to trust and ship. Covers metric selection for classification, regression, and ranking (precision/recall, ROC-AUC, calibration, RMSE), offline validation design, evaluation-metric-to-business-objective alignment, and production safety guardrails. Emphasizes choosing metrics that reflect real objectives and avoiding misleading evaluations.
Given a binary classifier's confusion matrix (true positives, false positives, false negatives, true negatives) on an imbalanced dataset where positives are rare, compute accuracy, precision, recall, and F1. Then explain, in plain language a non-technical stakeholder could follow, why accuracy alone is misleading here.
Design a reproducible experiment to test whether a feature transformation identified during exploratory data analysis (for example a log transform, binning, or a specific imputation strategy) actually improves predictive performance across several models and datasets. Include the experiment design, evaluation metrics, cross-validation scheme (nested CV if needed), and how you would avoid peeking at the test set while iterating.
Explain the difference between a validation set and a test set. Describe best practices for splitting data for production ML systems (time-based splits, group splits by user or session, stratification) and the common pitfalls that lead to data leakage or overfitting to the test set during model selection.
Write a SQL query against a predictions log table (prediction_id, user_id, model_version, predicted_label, ground_truth_label, event_time) that computes daily precision and recall per model_version for the last 30 days, excluding rows with a null ground-truth label. Then explain how you would extend it to break the same metrics out per customer segment without re-scanning the full table for every segment.
Compare ROC-AUC and PR-AUC (precision-recall AUC) for a binary classifier. For a task where positives are rare (for instance 0.5% prevalence), which curve is more informative and why? Sketch or describe a scenario where ROC-AUC looks strong but PR-AUC reveals the model is actually poor, and explain the intuition for why that happens.
Unlock Full Question Bank
Get access to all 15 Model Evaluation and Validation interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.