Frame an ML Problem
Purpose
Turn a vague "use ML for X" idea into a precise, testable problem definition with a label, a decision, a baseline and success criteria, so the team knows whether ML is justified and what "good enough" means before investing in modeling.
When to use
- A business team asks for a prediction, classification, ranking or forecasting capability.
- A data science project is being kicked off or re-scoped.
- A model exists but nobody agrees what it is optimizing.
When not to use
- The question is whether an AI initiative is worth doing at all across value, risk and readiness. Use
ai-use-case-assessment.
- The problem is generative (text, summaries, chat). Use
prompt-design or rag-design.
- The need is a one-off explanatory analysis. Use
analysis-plan.
Inputs
Required:
- The business need and the decision or process the prediction would change.
Optional, improves quality:
- Available data sources and history length.
- Current process and its performance (the implicit baseline).
- Cost of errors, volume, latency and regulatory constraints.
If the decision or process is missing, ask; ML without a decision is not framed.
Process
- Write the decision: who acts, on what, when, and what they do differently with a prediction.
- Define the target precisely: entity, event, observation window and label rule (e.g. "invoice paid > 15 days after due date"). Note label delay and label noise.
- Define the prediction point: when the model is called and what data is available at that moment; this defines the leakage boundary.
- Choose the ML task type (binary/multiclass classification, regression, ranking, forecasting, anomaly detection) and justify it from the decision.
- Define a non-ML baseline (current rule, heuristic, last-period value) and the metric it achieves or
[UNKNOWN].
- Define success: offline metric aligned to the decision (e.g. precision at top-k capacity, recall at fixed precision, MAE, calibration), and the business KPI with target. Write the cost of false positives vs false negatives.
- Assess feasibility: label volume and class balance, history length versus seasonality, feature availability, data access and privacy constraints (KVKK/GDPR, lawful basis, sensitive attributes).
- Identify risks: feedback loops (model actions change future labels), fairness on protected groups, concept drift, explainability requirements, automation of adverse decisions.
- Define deployment shape: batch vs real-time, latency, volume, human-in-the-loop, fallback when the model is unavailable.
- Give a go / no-go / do-a-spike recommendation with the smallest experiment that would reduce uncertainty.
- Label every inference
[ASSUMPTION] and move unsupported items to open questions. If the user's goal continues, suggest feature-engineering-plan on a go decision, or ai-use-case-assessment if the business case is still open.
Output format
# ML Problem Frame: <name>
| Field | Value |
|---|---|
| Decision supported | <who does what when> |
| Task type | ... |
| Prediction point | <trigger, data cutoff> |
| Target / label | <precise rule, window> |
| Unit of prediction | ... |
## Baseline
<current approach and its performance or [UNKNOWN]>
## Success Criteria
- Offline: <metric, threshold>
- Business: <KPI, target or [TBD]>
- Error costs: FP = ..., FN = ...
## Feasibility
| Aspect | Status | Notes |
|---|---|---|
| Label volume / balance | ... | ... |
| Feature availability at prediction time | ... | ... |
| Data access / privacy | ... | ... |
## Risks
- ...
## Deployment Shape
<batch/real-time, latency, human review, fallback>
## Recommendation
Go / No-go / Spike: <smallest next experiment>
## Open Questions
1. ...
Quality checklist
Common pitfalls
- Optimizing accuracy on imbalanced classes. Use metrics tied to capacity (precision@k) and cost.
- Framing a label that is only known long after the decision is needed without accounting for label delay.
- Skipping the baseline; many "ML wins" are beaten by a simple rule.
Example
Input: "Collections wants to predict which customers will not pay on time so they can call earlier."
Excerpt of output:
- Decision: Each morning, the collections team calls the top N open invoices ranked by risk, 7 days before due date.
- Label: Invoice paid more than 15 days after due date or unpaid at day 45
[confirm threshold with finance].
- Offline metric: Precision at N = daily call capacity
[UNKNOWN]; baseline = current rule "customers late last quarter".
- Risk: Calls change payment behavior, so future labels are influenced by the model; keep a random holdout.
1---2name: ml-problem-framing3description: "Frames a business need as a machine learning problem - decision supported, prediction target and label, unit and timing of prediction, features available at prediction time, success metrics (offline and business), baseline, data feasibility and go/no-go. Use when someone proposes \"let's use ML/AI to predict X\", before any data work or model selection starts."4license: MIT5metadata:6 source: https://skillmd.com/skills/muratdincer/ml-problem-framing7 version: "1.0.0"8 language: en9 category: 08-data10 role: ml-ai-engineer11 area: ml12 title: "Frame an ML problem"13 related: "ai-use-case-assessment, feature-engineering-plan, model-evaluation-report, analysis-plan, problem-statement"14 prompt: "Frame this as an ML problem: the collections team wants to predict which customers will not pay their invoice on time so they can call them earlier."15---1617# Frame an ML Problem1819## Purpose20Turn a vague "use ML for X" idea into a precise, testable problem definition with a label, a decision, a baseline and success criteria, so the team knows whether ML is justified and what "good enough" means before investing in modeling.2122## When to use23- A business team asks for a prediction, classification, ranking or forecasting capability.24- A data science project is being kicked off or re-scoped.25- A model exists but nobody agrees what it is optimizing.2627## When not to use28- The question is whether an AI initiative is worth doing at all across value, risk and readiness. Use `ai-use-case-assessment`.29- The problem is generative (text, summaries, chat). Use `prompt-design` or `rag-design`.30- The need is a one-off explanatory analysis. Use `analysis-plan`.3132## Inputs33Required:34- The business need and the decision or process the prediction would change.3536Optional, improves quality:37- Available data sources and history length.38- Current process and its performance (the implicit baseline).39- Cost of errors, volume, latency and regulatory constraints.4041If the decision or process is missing, ask; ML without a decision is not framed.4243## Process441. Write the decision: who acts, on what, when, and what they do differently with a prediction.452. Define the target precisely: entity, event, observation window and label rule (e.g. "invoice paid > 15 days after due date"). Note label delay and label noise.463. Define the prediction point: when the model is called and what data is available at that moment; this defines the leakage boundary.474. Choose the ML task type (binary/multiclass classification, regression, ranking, forecasting, anomaly detection) and justify it from the decision.485. Define a non-ML baseline (current rule, heuristic, last-period value) and the metric it achieves or `[UNKNOWN]`.496. Define success: offline metric aligned to the decision (e.g. precision at top-k capacity, recall at fixed precision, MAE, calibration), and the business KPI with target. Write the cost of false positives vs false negatives.507. Assess feasibility: label volume and class balance, history length versus seasonality, feature availability, data access and privacy constraints (KVKK/GDPR, lawful basis, sensitive attributes).518. Identify risks: feedback loops (model actions change future labels), fairness on protected groups, concept drift, explainability requirements, automation of adverse decisions.529. Define deployment shape: batch vs real-time, latency, volume, human-in-the-loop, fallback when the model is unavailable.5310. Give a go / no-go / do-a-spike recommendation with the smallest experiment that would reduce uncertainty.5411. Label every inference `[ASSUMPTION]` and move unsupported items to open questions. If the user's goal continues, suggest `feature-engineering-plan` on a go decision, or `ai-use-case-assessment` if the business case is still open.5556## Output format57```markdown58# ML Problem Frame: <name>59| Field | Value |60|---|---|61| Decision supported | <who does what when> |62| Task type | ... |63| Prediction point | <trigger, data cutoff> |64| Target / label | <precise rule, window> |65| Unit of prediction | ... |6667## Baseline68<current approach and its performance or [UNKNOWN]>6970## Success Criteria71- Offline: <metric, threshold>72- Business: <KPI, target or [TBD]>73- Error costs: FP = ..., FN = ...7475## Feasibility76| Aspect | Status | Notes |77|---|---|---|78| Label volume / balance | ... | ... |79| Feature availability at prediction time | ... | ... |80| Data access / privacy | ... | ... |8182## Risks83- ...8485## Deployment Shape86<batch/real-time, latency, human review, fallback>8788## Recommendation89Go / No-go / Spike: <smallest next experiment>9091## Open Questions921. ...93```9495## Quality checklist96- [ ] The prediction is tied to a concrete action and actor.97- [ ] The label rule is precise and computable from historic data.98- [ ] Only data available at prediction time is assumed as input.99- [ ] A non-ML baseline is defined.100- [ ] The offline metric reflects the business error costs and capacity.101- [ ] Privacy, fairness and feedback-loop risks are addressed.102- [ ] All checks pass; if any fails, revise the output and re-run this checklist before answering.103104## Common pitfalls105- Optimizing accuracy on imbalanced classes. Use metrics tied to capacity (precision@k) and cost.106- Framing a label that is only known long after the decision is needed without accounting for label delay.107- Skipping the baseline; many "ML wins" are beaten by a simple rule.108109## Example110Input: "Collections wants to predict which customers will not pay on time so they can call earlier."111112Excerpt of output:113- Decision: Each morning, the collections team calls the top N open invoices ranked by risk, 7 days before due date.114- Label: Invoice paid more than 15 days after due date or unpaid at day 45 `[confirm threshold with finance]`.115- Offline metric: Precision at N = daily call capacity `[UNKNOWN]`; baseline = current rule "customers late last quarter".116- Risk: Calls change payment behavior, so future labels are influenced by the model; keep a random holdout.