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

job exception: __init__() got an unexpected keyword argument 'presort' #174

Open
muratonuryildirim opened this issue Aug 29, 2021 · 4 comments

Comments

@muratonuryildirim
Copy link

muratonuryildirim commented Aug 29, 2021

Hi,

I am just running your following sample code:

from hpsklearn import HyperoptEstimator, any_classifier, any_preprocessing
from sklearn.datasets import load_iris
from hyperopt import tpe
import numpy as np

iris = load_iris()

X = iris.data
y = iris.target

test_size = int(0.2 * len(y))
np.random.seed(13)
indices = np.random.permutation(len(X))

X_train = X[indices[:-test_size]]
y_train = y[indices[:-test_size]]
X_test = X[indices[-test_size:]]
y_test = y[indices[-test_size:]]

estim = HyperoptEstimator(classifier=any_classifier('my_clf'),
preprocessing=any_preprocessing('my_pre'),
algo=tpe.suggest,
max_evals=100,
trial_timeout=120)

estim.fit(X_train, y_train)

print(estim.score(X_test, y_test))
print(estim.best_model())

However, I receive the following error:
job exception: init() got an unexpected keyword argument 'presort'
init() got an unexpected keyword argument 'presort'

Could you please help me about it?

@Duonghailee
Copy link

Hi, have you resolved this issue?

@sergedegosson70
Copy link

@Duonghailee Have you managed to solve it? I got the same issue.

@Duonghailee
Copy link

@Duonghailee Have you managed to solve it? I got the same issue.

You can install hyper-opt from this version: pip install git+https://github.com/hyperopt/hyperopt-sklearn@fd718c44fc440bd6e2718ec1442b1af58cafcb18 , it should work.

@zioalex
Copy link

zioalex commented Aug 17, 2022

Did anybody solved this?
The only way I found to solve it is with scikit-learn==0.23

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

4 participants