The basic idea behind linear regression is quite simple. In mathematical terms we want to predict a dependent variable Y using an independent variable X. By assuming that the two variables correlate in a linear fashion we can predict Y with a simple linear formula:
Linear equation by Author
(The wavy equal sign signifies “approximately”). Simply put, as soon as we know a bit about the relationship between the two coefficients, i.e. we have approximated the two coefficients **α **and β, we can (with some confidence) predict Y. Alpha α represents the intercept (value of y with f(x = 0)) and Beta β is the slope.
With the help of linear regression, we can answer a lot of questions; e.g.
#linear-regression #machine-learning-python #data-science #machine-learning #python