Hi,

I have queries on Lesson 1 - Linear regression with Scikit Learn.

As per Assignment, I used SGDRegressor to fit the model and compute loss.

Initially when i fit the model, the loss was over 5000 and again I fit the model (iterative approach) then the loss was around 4800. Am I doing it right? Below is code.

from sklearn.linear_model import SGDRegressor

sgdr = SGDRegressor()

sgdr.fit(inputs, targets)

predictions = sgdr.predict(inputs)

rmse(targets, predictions)

Actually SGDRegressor gives different RSME everytime we fit the model…In this post it is explained properly…

1 Like