Which linear model to use for regression?

Should I use the linear model( sklearn.linear_model.LinearRegression) which use the Ordinary least squares method or the linear model( sklearn.linear_model.SGDRegressor) which uses Stochastic Gradient Descent?

Can anyone tell me which is the best and why? And how they impact the prediction quality?

You can read the last paragraph here: https://sdsawtelle.github.io/blog/output/week2-andrew-ng-machine-learning-with-python.html

1 Like