07-29-2019 06:07 PM
# Create the model using sklearn (don't worry about the parameters for now): model = SGDRegressor(loss='squared_loss', verbose=0, eta0=0.0003, max_iter=3000)
Train/fit the model to the train-part of the dataset:odel.fit(X_train, y_train)
ERROR:
TypeError: init() got an unexpected keyword argument 'max_iter'
TypeError Traceback (most recent call last) <command-894361499296960> in <module>() 1 # Create the model using sklearn (don't worry about the parameters for now): ----> 2 model = SGDRegressor(loss='squared_loss', verbose=0, eta0=0.0003, max_iter=3000) 3 4 # Train/fit the model to the train-part of the dataset: 5 model.fit(X_train, y_train)
TypeError: init() got an unexpected keyword argument 'max_iter'
I m running the linear regression code in Community edition.
Google says reinstall --
pip install scikit-learn==0.18 --force-reinstall
How to re-install in notebook?
08-08-2019 05:29 AM
Try replacing the failing line with the following:
model = SGDRegressor(loss='squared_loss', verbose=0, eta0=0.0003, n_iter=3000)
07-29-2019 06:08 PM
I m running the linear regression code in Community edition.
Google says reinstall --
pip install scikit-learn==0.18 --force-reinstall
How to re-install in notebook?
08-08-2019 05:29 AM
Try replacing the failing line with the following:
model = SGDRegressor(loss='squared_loss', verbose=0, eta0=0.0003, n_iter=3000)
08-13-2019 03:55 AM
Replacing max_iter with n_iter resolves the error. Thnx!
It is a bit unusual to expect errors like this with this type of solution from Microsoft. As if it could not be prevented..
10-14-2021 11:54 PM
Thank you for your share.It is nice. Ancestormoneyshop
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group