Simple Linear Regression:
Linear Regression: The relationship between variables such that it forms a straight line.
The Relation that defines linearity in the data is called Co-relation.
Co-Relation:
The correlation in three forms i.e
a)Positive correlation
b)Negative correlation
What is Linear Regression:
It is all about getting the best fit line that supports linearity in the data is called Linear Regression.
"WHAT IS BEST FIT LINE"?
"HOW TO IDENTIFY BEST FIT LINE"?
- By using the Pearson correlation coefficient -Allows us to create a basic ideal line
- Using the error function & Gradient Descent to get a line that has the least error possible.
Now the question is how we identify the line is best-fit?
By using an error function("The Function that holds the difference between actual and predicted value").
- Mean Squared Error(MSE)
- Mean Absolute Error(MAE)
- Root Mean Squared Error(RMSE)
- R2_score
"Which Error function we have to use"
The main intuition of an error function is to calculate the Low error.
Here we are seeing different error functions which one we have used
- we can use any error function it's our wish.
- In terms of computation time use MAE(mean absolute error) because it takes less time.
for example, if we compared MSE with RMSE, Root Mean Squared Error it takes more time because it is squaring the MSE value so it takes more time while compilation.
FORMULAE FOR LINEAR REGRESSION IS
"Y=MX+C"
Comments
Post a Comment