Handle Missing Values and Choose ML Algorithms Wisely
Quick Overview
Evaluates core ML modeling concepts for tabular classification and regression interviews. Strong answers cover missing values, algorithm choice, Random Forests versus linear regression, and overfitting versus underfitting.
Handle Missing Values and Choose ML Algorithms Wisely
Company: Amazon
Role: Data Scientist
Category: Machine Learning
Difficulty: medium
Interview Round: Technical Screen
##### Scenario
General ML theory and practice questions during a technical interview.
##### Question
a) How do you handle missing values before model training and why?
b) Given a business scenario, how would you choose an appropriate ML algorithm and justify it?
c) Explain Random Forests in lay terms and contrast them with linear regression.
d) Define overfitting vs. underfitting and methods to detect/mitigate each.
##### Hints
Cover imputation, algorithm bias-variance trade-off, ensemble intuition, cross-validation and regularization.
Quick Answer: Evaluates core ML modeling concepts for tabular classification and regression interviews. Strong answers cover missing values, algorithm choice, Random Forests versus linear regression, and overfitting versus underfitting.
You are in a technical phone screen for a Data Scientist role. Assume primarily tabular datasets and address both classification and regression where relevant.
Answer the questions below with practical modeling judgment.
Constraints & Assumptions
Tie methods to the business problem, data size, interpretability needs, and deployment constraints.
Discuss leakage, validation, and monitoring where relevant.
Explain Random Forests in lay terms as well as technically.
Distinguish overfitting from underfitting using training and validation behavior.
Clarifying Questions to Ask Guidance
What is the prediction target, and what decision will the model support?
How much data is available, and what is the class balance or target distribution?
Are interpretability, latency, calibration, or fairness constraints important?
Is the data tabular, text, image, time-series, or graph data?
Part 1 - Missing Values
How would you handle missing values before model training, and why?
What This Part Should Cover Guidance
Diagnose missingness mechanisms and missingness rates.
Use deletion, simple imputation, model-based imputation, missing indicators, or model-native missing handling where appropriate.
Prevent leakage by fitting imputation on training data only.
Monitor missingness drift in production.
Part 2 - Choosing an ML Algorithm
Given a business scenario, how would you choose and justify an appropriate ML algorithm?
What This Part Should Cover Guidance
Start with baseline models and the decision metric.
Consider data type, sample size, nonlinearity, interactions, interpretability, latency, calibration, and maintenance.
Compare linear/logistic models, trees, random forests, boosted trees, neural models, and time-series models as applicable.
Validate with the right split and business metric.
Part 3 - Random Forests Versus Linear Regression
Explain Random Forests in lay terms and contrast them with linear regression.
What This Part Should Cover Guidance
Describe Random Forests as many decision trees trained on different samples and features, then averaged or voted.
Explain that they capture nonlinearities and interactions with less manual feature specification.
Contrast with linear regression's additive linear relationship and easier coefficient interpretation.
Discuss overfitting, interpretability, speed, and feature importance trade-offs.
Part 4 - Overfitting and Underfitting
Define overfitting and underfitting and how to detect and mitigate each.
What This Part Should Cover Guidance
Overfitting: strong training performance but weak validation performance.
Underfitting: poor training and validation performance due to insufficient model capacity or features.
Use train/validation curves, cross-validation, regularization, pruning, early stopping, more data, better features, or simpler/stronger models.
Monitor generalization after deployment.
Follow-up Questions Guidance
How would you pick a metric for an imbalanced classification problem?
When would you choose logistic regression over a Random Forest?
How would you explain a complex model to a non-technical stakeholder?