Open saranyapuvvada opened 2 years ago
Hi @saranyapuvvada , The error message indicates that the name 'SGDRegressor' is not defined. This is probably because it was not imported. Please run:
from sklearn.linear_model import SGDRegressor
When you run into an issue, please try running the official notebook, and see if you still get the error. If the error disappears, then it must be because the code you ran was different or missing something.
Hope this helps.
NameError Traceback (most recent call last) in
----> 1 sgd_reg = SGDRegressor(penalty="l2", max_iter=1000, tol=1e-3, random_state=42)
2 sgd_reg.fit(X, y.ravel())
3 sgd_reg.predict([[1.5]])
NameError: name 'SGDRegressor' is not defined