What Is Regression?
Regression is a type of machine learning problem where the goal is to predict a numerical value.
Regression predicts a number.
If the answer we want to predict is a numerical value, such as price, salary, temperature, sales, or house size, we are dealing with a regression problem.
What Does Regression Predict?
Regression predicts a value that can take different numerical values.
Predict the price of a house.
Predict a person's salary.
Predict future sales.
In all these examples, the output is a number.
A Simple House Price Example
Imagine that we have information about several houses.
We want the machine learning model to learn the relationship between house size and house price.
Regression With a New House
Now suppose we have a new house:
The model uses what it learned from the previous houses to estimate the price.
The ₹82 lakh value is only an example. A real model would calculate its own prediction from the training data.
Regression Finds a Relationship
Regression does not simply memorize one answer for every input. It tries to learn a relationship between the input features and the numerical output.
In our house example:
The model uses this learned relationship to make predictions for new examples.
::contentReference[oaicite:0]{index=0}Regression Is About Numerical Output
The easiest way to recognize a regression problem is to look at what you want the model to predict.
Example: ₹75 lakh
Example: Spam / Not Spam
This difference is extremely important.
Two Real-World Examples
Inputs: house size, bedrooms, location
Output: ₹85 lakh
→ RegressionInputs: advertising, previous sales, season
Output: 12,500 units
→ RegressionRegression Does Not Mean Perfect Prediction
A regression model usually does not know the exact future. It makes an estimate based on patterns learned from the training data.
For example, if the actual house price is:
The difference between the actual value and predicted value is part of what we later use to evaluate the regression model.
We will study this properly in the final topic of this lesson: Evaluate a Regression Model.
Regression = Predicting a Numerical Value.
Give the model input features, let it learn the relationship between those features and a numerical target, and then use that learned relationship to predict a value for new data.
Is This Regression?
House price and temperature are regression problems because their outputs are numerical values. Spam detection is classification because its output is a category.