When should a regression model be used?
Use a regression model when the target you want to predict is a numerical quantity rather than a class or category.
Typical regression targets
Regression is appropriate for targets such as:
- house price
- monthly revenue
- temperature
- delivery time
- energy consumption
- customer lifetime value
For example:
Inputs: size, location, number of rooms
Target: house priceBecause the target is a number, this is a regression problem.
Use regression when the output can vary continuously
A regression target usually has many possible numerical values.
For example, predicting:
₹42,50,000
₹43,10,000
₹44,75,000is different from predicting a fixed category such as:
Low
Medium
HighThe first is naturally a regression task, while the second is usually classification.
Regression is useful when the size of the prediction matters
Sometimes you need more than a yes/no decision.
For example:
- not just whether sales will increase, but by how much
- not just whether a delivery will be late, but how many minutes it will take
- not just whether demand is high, but the expected demand value
Regression provides that numerical estimate.
Historical examples should contain the numerical target
Supervised regression requires training examples where the target value is already known.
For example:
features → actual price
features → actual sales
features → actual durationThe model learns from these past relationships and predicts values for new observations.
Regression is not limited to straight-line relationships
Although linear regression models linear relationships, regression as a problem type can also be solved using:
- decision trees
- random forests
- gradient-boosted trees
- neural networks
These models can capture more complex relationships.
Do not use regression just because the target is stored as a number
A numerical code can still represent a category.
For example:
0 = Red
1 = Blue
2 = GreenThese values are category labels, not continuous quantities, so the problem is not regression.
In short, use regression when the target is a meaningful numerical quantity and you want the model to estimate how much, how many, how long, or what value.
Learning Sequence
Machine Learning Curriculum
Explore Related Questions
Deepen your understanding across related Machine Learning topics.