Module 1 · step 4 of 4 · Navigation and projects
Frame the problem
Turn a business question into a task, a target and a success measure before touching data.
Concept7 min
In this lesson you turn a business wish into a problem a model can learn, and you see where mlflow asks for the same things. It matters because most failed projects fail before any code runs: the question was vague, so no model could answer it.
The idea
Every model answers one question. Framing means choosing three things: a task, a target and a measure of success.
The task is the kind of answer you need. A category such as "will leave" or "will stay" is classification. A number, such as a price, is regression. If there is no known answer and you want groups, it is clustering. The target is the exact column that holds the answer, taken from past cases where the outcome is already known. The measure of success says what a good model looks like in business terms: catching most of the people who will leave, even with some false alarms, or the opposite.
A fourth question comes just as often: when will the model be used, and what will you know at that moment? A column filled in after the outcome cannot be used to predict it. Deciding this now saves you from a model that looks perfect and fails in real use.
For the demo's churn example the framing is short. The question is which employees are likely to leave. The task is classification. The target is the column named left. The output would be a probability that someone leaves, which a person in HR could act on early.
Step by step in mlflow
- On the Projects page, select Start from a use case. Each card names the task, the Sample dataset, the Target, the Preprocessing steps and the Algorithms. Read the Churn prediction card as a model answer.
- In Pipeline Studio, open New pipeline. The dialog asks for the same things in order: a Name, a Task, a Dataset and a Target column.
- If you cannot fill those four fields, the problem is not framed yet. The data profile also suggests a task from the shape of the target, but it only suggests; the decision is yours.
- Write your own one-line framing for the churn example: task, target, success measure and one column you would not trust. Then read Problem framing and What is machine learning.
Common mistakes
- Starting from the data instead of the decision. Ask what someone will do differently because of the prediction.
- Choosing a target that is easy to get but not what you care about, such as "clicked" when you care about "bought".
- Using columns that will not exist at prediction time. This is data leakage, and the app helps you spot it later: the data profile has a Target leakage card that flags columns tied too closely to the target, and a model that looks too good deserves suspicion.
- Skipping a baseline. Every run keeps a Baseline row, a dummy model; a real model has to beat it clearly.
- Ignoring the cost of errors. A missed leaver and a false alarm rarely cost the same, so one metric may fit better than another.
As a data scientist
Write the framing down before you upload anything, and keep it in the project description so the team can challenge it. A good frame fits in two sentences: what is predicted, from what, and what counts as good enough. When results disappoint, return to the frame first; the fix is often a better target or a better measure, not a fancier algorithm.