Skip to content

Commit

Permalink
Make sklearn 0.24 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Beitner committed Jan 2, 2021
1 parent 535e44b commit 4d1e17e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lipo/hyperparameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def __init__(
random_state=None,
scoring=None,
n_jobs=None,
iid="deprecated",
refit=True,
cv=None,
verbose=0,
Expand All @@ -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
Expand All @@ -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
Expand All @@ -93,7 +89,6 @@ def __init__(
estimator=estimator,
scoring=scoring,
n_jobs=n_jobs,
iid=iid,
refit=refit,
cv=cv,
verbose=verbose,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4d1e17e

Please sign in to comment.