Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using RandomizedSearchCV, fit() got an unexpected keyword argument 'epochs'... #5

Closed
jiacheng-ye opened this issue Jan 22, 2019 · 2 comments

Comments

@jiacheng-ye
Copy link

rnd_search_cv = RandomizedSearchCV(keras_reg, param_distribs, n_iter=10, cv=3, verbose=2)
rnd_search_cv.fit(X_train_scaled, y_train, epochs=100,
                           validation_data=(X_valid_scaled, y_valid),
                           callbacks=[keras.callbacks.EarlyStopping(patience=10)])

then it occurs:

TypeError: fit() got an unexpected keyword argument 'epochs'

and the fit() of RandomizedSearchCV is like this,

class RandomizedSearchCV(BaseSearchCV)  
    def fit(self, X, y=None, groups=None)

and I'm confusing about how to pass epochs, validation_data and callbacks to this function...
Waiting for answering, thinks :)

@ageron
Copy link
Owner

ageron commented Jan 22, 2019

Hi @Stark-JC ,
Thanks for your feedback. Perhaps you have an older version of Scikit-Learn? You need at least 0.20, what version are you using?

@jiacheng-ye
Copy link
Author

@ageron Thanks a lot. I find my scikit-learn version is 0.18.2. And it's fixed after I update to 0.20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants