Linear Regression:
Linear regression is one of the easiest and most popular Machine learning algorithm. It is statistical method that is used for predictive analysis. Linear regression makes predictions for continuous/real or numeric variables such as sales, salary, age, product, price and etc.,
Linear Regression algorithm shows a linear relationship between a dependent variable (Y) and one or more independent variables (X), hence called as linear regression. Since, linear regression shows the linear relationship, which means it finds how the value of the dependent variable is changing according to the value of the independent variable.
The Linear regression model provides a sloped straight line representing the relationship between the variables.
Mathematically we can represent a linear regression as:
Y = B๊ง+B₁ X+ ๐
Here,
- Y = Dependent variable ( Target Variable ).
- X = Independent variable (predictor variable)
- B๊ง = Intercept of the line
- B₁ = Linear regression co-efficient (slope)
- ๐ = Random error.
Negative Linear Relationship:
If the dependent variable decreases on the Y- axis and independent variable increases on the X- axis, then such relationship is called as a negative linear relationship.here, X is indirectly proportional to Y
⇒ X ๐ฐ 1/Y
Finding the best fit line:
When working with linear regression, our main goal is to find the best fit line that means the error between predicted values and actual values should be minimized. The best fit line have the least error.
Comments
Post a Comment