I am really confused about why do I need to use ravel() before fitting the data to SGDRegressor.
This is the code:
from sklearn.linear_model import SGDRegressor
sgd_reg = SGDRegressor(max_iter = 1000, tol = 1e-3, penalty = None, eta0= 0.1)
sgd_reg.fit(X, y.ravel())
These are the shape of X and y:
>>> X.shape
(100, 1)
>>> y.shape
(100, 1)
>>> y.ravel().shape
(100,)