Choose Models for Imbalanced Data and Time-Series Forecasting
Quick Overview
Choose Models for Imbalanced Data and Time-Series Forecasting evaluates core ML concepts, assumptions, math intuition, training/evaluation trade-offs, and practical failure modes in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Choose Models for Imbalanced Data and Time-Series Forecasting
Company: Amazon
Role: Data Scientist
Category: Machine Learning
Difficulty: hard
Interview Round: Technical Screen
##### Scenario
You are asked to choose and tune models for forecasting marketplace demand and detecting fraud in a highly imbalanced dataset.
##### Question
Explain how ordinary least squares linear regression works and state its key assumptions. Compare gradient-boosted trees, random forests, and bagging; when would you prefer each? Your positive class is 0.2 % of the data. How would you handle this imbalance during model training and evaluation? Describe a full workflow for building a time-series forecasting model when seasonality and trend are present.
##### Hints
Cover data preprocessing, feature engineering, resampling/weighting, proper metrics, and cross-validation for temporal data.
Quick Answer: Choose Models for Imbalanced Data and Time-Series Forecasting evaluates core ML concepts, assumptions, math intuition, training/evaluation trade-offs, and practical failure modes in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Choose Models for Imbalanced Data and Time-Series Forecasting
Scenario
You must choose and tune models for (a) forecasting marketplace demand with seasonality and trend, and (b) detecting fraud where the positive class rate is only 0.2%.
Tasks
Ordinary Least Squares (OLS): Explain how OLS linear regression works and list its key assumptions.
Tree Ensembles: Compare gradient-boosted trees, random forests, and bagging. When would you prefer each?
Class Imbalance (0.2% positive): How would you handle this imbalance during model training and evaluation?
Time-Series Forecasting Workflow: Describe a full, practical workflow for modeling a series with trend and seasonality, including preprocessing, feature engineering, appropriate metrics, and time-aware cross-validation.
Hint
Address data preprocessing, feature engineering, resampling/weighting, proper metrics for imbalance, and cross-validation suited for temporal data.
Clarifying Questions to Ask Guidance
Clarify the task, data shape, labels, constraints, and evaluation metric.
State assumptions behind the math or modeling technique you choose.
Connect theory to practical training, debugging, and deployment implications.
What a Strong Answer Covers Guidance
Correct definitions and formulas where the prompt requires them.
A practical explanation of how the method behaves on real data.
Trade-offs, failure modes, diagnostics, and mitigation strategies.
Evaluation choices that match the product or modeling objective.
Follow-up Questions Guidance
How would noisy labels, class imbalance, or distribution shift affect the answer?