Skip to content

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

Open
@muratonuryildirim

Description

@muratonuryildirim

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions