Framing a Business Problem as ML
Translating ambiguous business goals into clear machine learning problem formulations and optimization targets.
What is ML Problem Framing?
In machine learning system design interviews and industry projects, business stakeholders rarely hand you a clean dataset with labeled target columns.
Instead, you receive vague business requests:
- "Increase e-commerce sales."
- "Reduce customer churn."
- "Stop abusive comments on our platform."
ML Problem Framing is the disciplined process of translating vague business goals into a formulated machine learning task:
Vague Business Goal: "Reduce Customer Churn"
│
▼
[ ML PROBLEM FRAMING ]
- Task Type: Binary Classification
- Target Label (Y): Y = 1 if User cancels paid plan within next 30 days; else 0
- Prediction Trigger: Executed automatically on the 1st of every month
- Observation Window: User activity features collected over past 90 days
- Business Metric: Revenue Retained = Saved Accounts * LTV - Campaign Intervention Cost
The 5 Steps of ML Problem Framing
┌──────────────────────────┬──────────────────────────┬──────────────────────────┐
│ 1. TASK CLASSIFICATION │ 2. LABEL DEFINITION │ 3. WINDOW TIMELINES │
├──────────────────────────┼──────────────────────────┼──────────────────────────┤
│ Binary, Multi-Class, │ Define positive/negative │ Specify Observation Window│
│ Regression, Ranking, or │ target label rules │ (X features) vs Prediction│
│ Reinforcement Learning. │ unambiguously. │ Horizon (Y label). │
└──────────────────────────┴──────────────────────────┴──────────────────────────┘
┌──────────────────────────┬──────────────────────────┐
│ 4. OFFLINE / ONLINE METRICS│ 5. BUSINESS CONSTRAINTS│
├──────────────────────────┼──────────────────────────┤
│ Align Loss (LogLoss/NDCG)│ Latency SLAs (<50ms), │
│ to Business KPIs (LTV). │ VRAM memory limits, cost.│
└──────────────────────────┴──────────────────────────┘
Step 3: Defining Observation & Prediction Windows
A common framing mistake is Temporal Data Leakage: including future features in prediction inputs.
Always define strict temporal boundaries:
│◄──────────── Observation Window (Past 90 Days) ────────────►│◄── Prediction Horizon (Next 30 Days) ──►│
│ Collect Feature Inputs (X): Clicks, Logins, Support Tickets │ Observe Target Output Label (Y): Churn? │
└─────────────────────────────────────────────────────────────┴─────────────────────────────────────────┘
Timestamp T_0 (Prediction Trigger Time)
- Feature Inputs ($X$): Aggregate data collected strictly before $T_0$.
- Target Label ($Y$): Measured over the window after $T_0$.
Common Framing Transformations
| Ambiguous Business Goal | Machine Learning Problem Formulation |
|---|---|
| "Recommend products users will like" | Pointwise pCTR / CVR Prediction or Pairwise Learning-to-Rank ($NDCG@K$) |
| "Detect spam messages" | High Precision Binary Classification with cost-sensitive thresholding |
| "Estimate house prices" | Continuous Regression evaluating Mean Absolute Percentage Error (MAPE) |
| "Auto-complete search queries" | Language Modeling (Causal Next-Token Prediction over search logs) |
Say this out loud
Problem Framing translates vague business goals into concrete machine learning tasks. It defines prediction targets, label rules, observation windows, prediction horizons, and technical loss metrics aligned with business KPIs. Establishing clear temporal boundaries prevents data leakage and ensures model outputs translate to business ROI.
Followups to expect
- How do you handle framing when ground truth labels are delayed by months (e.g. Loan Default)? Use short term proxy targets (e.g. missed payment in first 30 days) to train early iteration models while waiting for long term loan default labels.
- What is Pointwise vs Pairwise vs Listwise framing in ranking? Pointwise frames ranking as independent binary classification per item. Pairwise frames it as relative preference ordering between item pairs. Listwise frames it as optimizing full list order metrics ($NDCG$).
Check yourself
Why must an ML engineer frame an ambiguous request like 'Reduce Customer Churn' into specific prediction targets before building a model?