The iid parameter used in BayesSearchCV has been depreciated in scikit-learn's RandomizedSearchCV and GridSearchCV for a while now and is set to be removed in scikit-learn 0.24. As I ran scikit-learn's nightly, I got an exception after BayesSearchCV passed iid to one of scikit-learn's methods/classes. Considering that the iid parameter has been depreciated, I think it should be removed before scikit-learn updates to make sure BayesSearchCV still works. I may make a PR for that change later, if I have time.
A PR would be great, thanks in advance 馃憤
Any updates here? I'm having troubles running skopt with sklearn 0.24
I am experiencing this issue as of Feb 22 2021. Running with sklearn 0.24 produces
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-12-f15f8ce4bc93> in <module>
32 }
33
---> 34 grid = BayesSearchCV( estimator = tune_pipe,
35 #estimator=eclf,
36 search_spaces=tune_params,
~/lambda-stack-py/lib/python3.8/site-packages/skopt/searchcv.py in __init__(self, estimator, search_spaces, optimizer_kwargs, n_iter, scoring, fit_params, n_jobs, n_points, iid, refit, cv, verbose, pre_dispatch, random_state, error_score, return_train_score)
307 self.fit_params = fit_params
308
--> 309 super(BayesSearchCV, self).__init__(
310 estimator=estimator, scoring=scoring,
311 n_jobs=n_jobs, iid=iid, refit=refit, cv=cv, verbose=verbose,
~/lambda-stack-py/lib/python3.8/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
61 extra_args = len(args) - len(all_args)
62 if extra_args <= 0:
---> 63 return f(*args, **kwargs)
64
65 # extra_args > 0
TypeError: __init__() got an unexpected keyword argument 'iid'
For now I've reverted to 0.23.2, 0.23.0 did not work due to an unrelated exception. (pip install scikit-learn==0.23.2)
Most helpful comment
Any updates here? I'm having troubles running skopt with sklearn 0.24