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

InvalidParameterError when running the classifier #198

Closed
roydbt opened this issue May 12, 2023 · 2 comments
Closed

InvalidParameterError when running the classifier #198

roydbt opened this issue May 12, 2023 · 2 comments
Assignees

Comments

@roydbt
Copy link

roydbt commented May 12, 2023

When I run

model = HyperoptEstimator(classifier=any_classifier('cla'), preprocessing=any_preprocessing('pre'))

I get

InvalidParameterError: The 'base_estimator' parameter of AdaBoostClassifier must be an object implementing 'fit' and 'predict' or a str among {'deprecated'}. Got None instead.
@mandjevant
Copy link
Contributor

Hey, thanks for raising this question. In sklearn 1.2, the base_estimator parameter was renamed to estimator.

Hyperopt-sklearn is not yet compatible with sklearn 1.2. as I have been busy irl.
A few months ago, other issues were raised regarding incompatibility. And the requirements.txt was updated to reflect this.

For next time, take a look at requirements.txt,

It says:

scikit-learn>=1.0,<1.2

Your installation of scikit-learn must be 1.2 or newer.
Downgrading should solve your issue.

The following commands in your terminal should downgrade your sklearn installation.
pip uninstall scikit-learn
`pip install 'scikit-learn>=1.0,<1.2'

Let me know if it works!

@mandjevant mandjevant self-assigned this May 12, 2023
@roydbt
Copy link
Author

roydbt commented May 12, 2023

Installed scikit-learn==1.1.0 and it worked!

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