Implementing the Gradient Descent Algorithm in R
The intercept is the point on the y-axis where the value of the predictor x is zero. In order to apply the linear hypothesis to a dataset with the end aim of modelling the situation under investigation, there needs to be a linear relationship between the variables in question. A simple scatterplot is an excellent visual tool to assess linearity between two variables. Below is an example of a linear relationship between miles per gallon (mpg) and engine displacement volume (disp) of automobiles which could be modelled using linear regression. Note that there are various methods of transforming non-linear data to make them appear more linear such as log and square root transformations but we won't discuss those here.
Jan-11-2018, 21:17:04 GMT