From 4d1e17ec953dbd1791aa6c98fb8ce13455ec9363 Mon Sep 17 00:00:00 2001 From: Jan Beitner Date: Sat, 2 Jan 2021 10:06:06 +0000 Subject: [PATCH] Make sklearn 0.24 compatible --- lipo/hyperparameter.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lipo/hyperparameter.py b/lipo/hyperparameter.py index 7d3f7fd..d39cd89 100644 --- a/lipo/hyperparameter.py +++ b/lipo/hyperparameter.py @@ -35,7 +35,6 @@ def __init__( random_state=None, scoring=None, n_jobs=None, - iid="deprecated", refit=True, cv=None, verbose=0, @@ -44,8 +43,6 @@ def __init__( return_train_score=False, ): """ - Initialize self - Args: estimator (BaseEstimator): estimator to tune param_space (Dict[str, List]): dictionary where keys are names of parameters to tune and @@ -72,7 +69,6 @@ def __init__( Continue with global search. scoring (Union[str, callable, List, Tuple, Dict, None]: as in sklearn.model_selection.GridSearchCV n_jobs (int): number of jobs for cross validation - iid (bool): deprecated refit (bool): if to refit estimator with best parameters at the end cv (Union[int, iterable]): number of folds or iterable returning indices of (train, test) verbose (int): verbosity level @@ -93,7 +89,6 @@ def __init__( estimator=estimator, scoring=scoring, n_jobs=n_jobs, - iid=iid, refit=refit, cv=cv, verbose=verbose, @@ -125,10 +120,7 @@ def _run_search(self, evaluate_candidates): maximize=True, random_state=self.random_state, ) - if self.multimetric_: - metric = self.refit - else: - metric = "score" + metric = "score" iteration = 0 t = tqdm(total=self.n_iter, desc="Best params at iteration --- with score ----", mininterval=10.0)