# Stop Guessing in ML Interviews: A 5-Step Model Choice Framework

# Stop Guessing in ML Interviews: A 5-Step Model Choice Framework

<img src="https://bugfree-s3.s3.amazonaws.com/mermaid_diagrams/image_1777396573340.png" alt="Model choice framework" style="max-width:800px; width:100%; height:auto; display:block; margin:12px auto;">

Model selection in interviews isn't about intuition or luck — it's about a clear, repeatable reasoning process. Use this 5-step framework to structure your answer, show that you think like an engineer, and justify your choices.

## 1) Define the task
Start by naming the problem type and edge cases.

- Classification (binary, multiclass, multilabel) — e.g., spam vs not-spam.
- Regression — predict continuous values like price or temperature.
- Clustering — unsupervised grouping when labels aren't available.
- Anomaly detection — rare-event detection or outlier scoring.
- Other: ranking, forecasting, survival analysis, or multi-task problems.

Quick interview tip: restate the objective and any constraints (latency, interpretability, cost) before proposing models.

## 2) Read the data
Describe what's in the dataset and what matters for modeling.

- Size: number of samples (small vs large) guides model complexity.
- Feature types: numerical, categorical, text, images, time series.
- Missing values, duplicates, label quality, and leakage risks.
- Class imbalance and how skewed the target is.

Actionable note: if the dataset is small or labels are noisy, favor simpler models and focus on feature engineering and cross-validation.

## 3) Match complexity to the problem
Choose model families based on data richness and constraints.

- Start with baselines: logistic/linear regression, decision trees, k-NN.
- If patterns are non-linear and data is moderate: tree ensembles (Random Forest, XGBoost/LightGBM).
- For very large labeled datasets or unstructured data: neural networks (CNNs for images, transformers for text).
- Consider interpretability, training time, memory, and deployment complexity.

Rule of thumb: try a simple interpretable model first — if it fails, ramp up complexity with clear reasons.

## 4) Pick the right metric
Tie the evaluation metric to business goals and class properties.

- Classification: accuracy (only if balanced), precision/recall, F1, AUROC, AUPRC (preferred for imbalanced data).
- Regression: MAE, MSE/RMSE, R² — choose based on sensitivity to outliers.
- Other metrics: calibration, ranking metrics (NDCG), or business KPIs (conversion, revenue).

Interview tip: explain consequences of optimizing the wrong metric (e.g., high accuracy but poor recall on rare positive cases).

## 5) Justify trade-offs and propose alternatives
Explain why your choice balances performance, cost, and risk.

- Interpretability vs performance: when stakeholders need explanations, prefer simpler or explainable models.
- Latency and footprint: for real-time systems, prefer lightweight models or distilled networks.
- Data and labeling costs: semi-supervised learning, transfer learning, or active learning when labels are expensive.
- Deployment and maintenance: consider model updates, monitoring, and data drift.

Always propose a short experimental plan: baseline → tuned model → ablation tests → monitoring.

## Quick interview checklist (what to say)

1. "This is a [task type]."  
2. "The data looks like X (size, types, issues)."  
3. "Baseline: [simple model]. If needed, escalate to [ensemble/NN] because..."  
4. "I'll evaluate with [metric] because..."  
5. "Trade-offs: [list], and next steps would be..."

If you can clearly explain "why this model" and how you would validate it, you’re interview-ready.

—

Tags: #MachineLearning #DataScience #TechInterviews
