This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Description
scikit-learn 0.24.1
scikit-optimize 0.8.1
Steps to reproduce:
from sklearn.ensemble import RandomForestClassifier
from skopt import BayesSearchCV
from skopt.space import Real, Categorical, Integer
x_train, y_train, x_valid, y_valid = load_data()
rf = BayesSearchCV(
RandomForestClassifier(max_features=30, n_jobs=-1),
{
'max_depth': Integer(9, 30),
},
n_iter=32, random_state=60111, cv=5,
)
rf.fit(x_train, y_train)
model.append(rf)
Traceback:
Traceback (most recent call last):
File "~/model_01_classification.py", line 15, in <module>
rf = BayesSearchCV(
File "~/.conda/envs/ml-tf/lib/python3.8/site-packages/skopt/searchcv.py", line 309, in __init__
super(BayesSearchCV, self).__init__(
File "~/.conda/envs/ml-tf/lib/python3.8/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'iid'