Regression Series -01 :Overview about Linear Regression
Before Discussing about Linear Regression let’s take an overview about what exactly is regression?
Overview about Regression
Imagine you’re trying to guess how much ice cream someone will eat based on how hot it is outside. Regression is like a formula that helps you make a good guess.
You collect data on how much ice cream people eat on different temperature days. Then, you use that data to create a simple formula:
“Ice cream consumption = a little bit more ice cream for every degree it gets hotter”
This formula is like a regression model. It helps you predict (or guess) how much ice cream someone will eat based on the temperature.
The Goal is to make the best possible guess:
- If it’s 30°C outside, your formula might guess that someone will eat 2 scoops of ice cream.
- If it’s 35°C outside, your formula might guess that someone will eat 3 scoops of ice cream.
As you collect more data on ice cream consumption on different temperature days. Your formula gets more accurate, so your guesses get better.
That’s regression in a nutshell!
Let’s Look at actual definition about Regression.
Regression is a statistical method used to establish a relationship between two or more variables. It involves creating a mathematical model that predicts the value of a continuous outcome variable based on one or more predictor variables.
What is Linear Regression?
Linear regression is a type of supervised machine learning algorithm that computes the linear relationship between the dependent variable and one or more independent features by fitting a linear equation to observed data.
When there is only one independent feature, it is known as Simple Linear Regression, and when there are more than one feature, it is known as Multiple Linear Regression.
Types of Linear Regression
There are two main types of linear regression:
Simple Linear Regression
This is the simplest form of linear regression, and it involves only one independent variable and one dependent variable. The equation for simple linear regression is:
Y = θ0 + θ1X
where:
- Y is the dependent variable
- X is the independent variable
- θ0 is the intercept
- θ1 is the slope
Multiple Linear Regression
This involves more than one independent variable and one dependent variable. The equation for multiple linear regression is:
Y = θ0 + θ1X1 + θ2X2 + ………+ θnXn
where:
- Y is the dependent variable
- X1, X2, …, Xn are the independent variables
- θ0 is the intercept
- θ1, θ2, …, θn are the slopes
The goal of the algorithm is to find the best Fit Line equation that can predict the values based on the independent variables.
What is the best Fit Line?
The best Fit Line equation provides a straight line that represents the relationship between the dependent and independent variables. The slope of the line indicates how much the dependent variable changes for a unit change in the independent variable(s).
Here Y is called a dependent or target variable and X is called an independent variable also known as the predictor of Y.
If you want to know more about how to estimate parameters θ or you want to know practical implementation on a dataset. checkout this blog…….