What Do We Want to Predict?
Once we understand what information is available, the next question is simple but extremely important: what exactly do we want the Machine Learning system to produce?
A Machine Learning problem needs a clearly defined outcome.
If we do not know what the model should predict, we cannot properly define the problem, prepare the data, or evaluate whether the model is useful.
The Target
The value or outcome that we want the model to predict is commonly called the target.
For example, if we want to predict the price of a house, the house price is the target.
If we want to predict whether an email is spam, "Spam" or "Not Spam" is the target outcome.
The target is the answer or outcome that we want the model to predict.
Features vs Target
This is one of the most important distinctions in Machine Learning.
Features describe the example. The target is what we want to predict.
House size: 1,500 sq ft
Bedrooms: 3
Bathrooms: 2
House price: $420,000
Here, size, bedrooms, and bathrooms are features. The house price is the target.
The Target Depends on the Problem
There is no universal target. The target depends entirely on the question we are trying to answer.
- House prediction → house price.
- Spam detection → Spam or Not Spam.
- Customer prediction → Will Buy or Will Not Buy.
- Weather prediction → temperature.
The first step is therefore to translate the real-world question into a specific outcome.
A Vague Goal Is Not Enough
Consider a business saying:
This is a useful business goal, but it is not yet a clearly defined Machine Learning target.
We need to make the question more specific.
"Predict whether a customer will cancel their subscription within the next 30 days."
Now the target is much clearer: whether the customer will cancel within the specified period.
The Target Must Match the Question
A common mistake is choosing a target simply because it exists in the dataset.
The target should represent the actual outcome that matters to the problem.
Suppose an e-commerce company wants to reduce abandoned carts.
Predicting the customer's age does not directly solve that problem. Predicting whether the customer will complete the purchase is much closer to the actual goal.
Choose the target because it represents the real-world outcome you actually care about.
Numerical Targets
Sometimes the target is a number.
- House price → $420,000.
- Product demand → 250 units.
- Temperature → 31°C.
These are numerical prediction problems because the model is trying to estimate a numerical value.
Categorical Targets
Other problems have a target that represents a category rather than a continuous number.
- Email → Spam / Not Spam.
- Transaction → Fraudulent / Legitimate.
- Customer → Will Buy / Will Not Buy.
These are classification problems.
The important point is that the target is still clearly defined.
The Target Can Also Depend on Time
Sometimes the question includes a time period.
Compare these two questions:
- "Will this customer ever stop buying?"
- "Will this customer stop buying within the next 30 days?"
These are not exactly the same problem. The second one has a clearly defined prediction window.
Time boundaries can therefore be an important part of defining the target.
What Makes a Good Target?
A useful target should be:
- Clearly defined.
- Relevant to the real-world problem.
- Something the available data can help predict.
- Measurable or observable.
- Defined consistently across examples.
If different examples use different definitions, the model receives confusing training information.
Features and Target Together
A simple way to think about a supervised Machine Learning problem is:
During training, the model sees examples containing both the features and the known target.
Later, for a new example, the target is unknown. The model uses the features to produce a prediction.
Define the Target Before Choosing the Model
A clear target tells us what the Machine Learning system is actually trying to learn. Without a clear target, there is no precise prediction problem to solve.
Identify the Target
Consider this problem:
What are the features?
- Previous purchases.
- Amount spent.
- Pages viewed.
- Cart activity.
What is the target?