Linear regression analysis is used to predict the value of a continuous variable of a variable based on the value of another variable. The variable that is predicted is the dependent, or output. The variable that is used to make the prediction is the independent variable, or input.
Linear regression fits a straight line or surface that minimises the discrepancies between predicted and actual output values.
Linear regression can be performed in a variety of software packages, but for the purpose of this course it will be undertaken is Python’s machine learning library, sklearn.
Regression is used in many different fields, such as economics, computer science, and social science.
Linear regression is one of the most important and widely used regression techniques. It is one of the simplest regression models and it is easy to interpret the results of the regression.
Simple linear regression, or single variate regression, is the simplest case of linear regression, as it has a single independent variable, being X.
The formula for the linear regression model can be seen below:-