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

Using hyperopt_search with regressors #3

Open
aelabibi opened this issue Dec 6, 2017 · 0 comments
Open

Using hyperopt_search with regressors #3

aelabibi opened this issue Dec 6, 2017 · 0 comments

Comments

@aelabibi
Copy link

aelabibi commented Dec 6, 2017

Hello,

I am trying to use hyperopt_search with random_forest_regression and gradient_boosting_regressor but I got the following error :

TypeError: estimator should be an estimator implementing 'fit' method, <hyperopt.pyll.base.Apply object at 0x000000000D093048> was passed

And in one of the lines error it checks if it is a classifier :

C:\user\Anaconda3\lib\site-packages\sklearn\cross_validation.py in cross_val_score(estimator, X, y, scoring, cv, n_jobs, verbose, fit_params, pre_dispatch)
   1571 
   1572     cv = check_cv(cv, X, y, classifier=is_classifier(estimator))
-> 1573     scorer = check_scoring(estimator, scoring=scoring)
   1574     # We clone the estimator to make sure that all the folds are
   1575     # independent, and that it is pickle-able. 

I am wondering if the error comes from using a regressor and not a classifier.
Thank you for your help.

Regards.

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

1 participant