What is regression in machine learning?
Regression is a type of supervised machine learning used to predict a continuous numerical value.
Instead of predicting a category such as spam or not spam, a regression model predicts a quantity.
Examples of regression problems
Regression can be used to predict values such as:
- house price
- monthly sales
- temperature
- delivery time
- customer lifetime value
- electricity consumption
For example:
Input: house size, location, number of rooms
Output: predicted house price = ₹72,00,000How regression works
A regression model learns a relationship between input features and a numerical target from historical examples.
During training, it tries to find a function that produces predictions close to the known target values.
In simple form:
features → regression model → numerical predictionRegression target
The target variable in a regression problem is usually continuous or ordered numerical data.
Examples include:
price = 250000
temperature = 31.5
delivery_time = 42 minutesRegression vs classification
- Regression: predicts a numerical quantity, such as price or demand.
- Classification: predicts a category or class, such as fraud/not fraud or cat/dog.
The important question is what kind of output the problem requires.
Common regression algorithms
Examples include:
- linear regression
- Ridge regression
- Lasso regression
- decision tree regression
- random forest regression
- gradient-boosted regression models
Different algorithms can model different types of relationships between the features and target.
Regression predictions are not always exact
A regression model estimates the target based on patterns learned from data.
Its quality is evaluated by comparing predictions with actual values using regression metrics such as MAE, MSE, RMSE, or R².
These evaluation metrics are covered later in this section.
In short, regression is supervised learning for predicting numerical quantities. It learns from examples where the target is a number and estimates that number for new observations.
Learning Sequence
Machine Learning Curriculum
Explore Related Questions
Deepen your understanding across related Machine Learning topics.