Skip to content

Commit

Permalink
Merge branch 'master' into maa-jpra-readme_update
Browse files Browse the repository at this point in the history
  • Loading branch information
fmohr authored Oct 7, 2024
2 parents d48b0ef + 08fe0cb commit e3ff27b
Show file tree
Hide file tree
Showing 7 changed files with 1,568 additions and 1,729 deletions.
2 changes: 1 addition & 1 deletion python/naiveautoml/algorithm_selection/_sklearn_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ def score_func(X, y):
return sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis(**params)

if clazz == sklearn.linear_model.LogisticRegression:
params["dual"] = check_for_bool(params["dual"])
# params["dual"] = check_for_bool(params["dual"]) -- disabled now
return sklearn.linear_model.LogisticRegression(**params)

if clazz == sklearn.neural_network.MLPClassifier:
Expand Down
7 changes: 5 additions & 2 deletions python/naiveautoml/naiveautoml.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,11 @@ def fit(self, X, y, categorical_features=None):

# get candidate descriptor
as_result_for_best_candidate = relevant_history.sort_values(self.task.scoring["name"]).iloc[-1]
config_space = self.algorithm_selector.get_config_space(as_result_for_best_candidate)

if (
if len(config_space) == 0:
self.logger.info(f"The selected algorithms {as_result_for_best_candidate} have no hyperparameters.")
elif (
deadline is None or
deadline is not None and deadline - time.time() >= as_result_for_best_candidate["runtime"] + 5
):
Expand All @@ -244,7 +247,7 @@ def fit(self, X, y, categorical_features=None):
self.hp_optimizer.reset(
task=self.task,
runtime_of_default_config=as_result_for_best_candidate["runtime"],
config_space=self.algorithm_selector.get_config_space(as_result_for_best_candidate),
config_space=config_space,
history_descriptor_creation_fun=lambda hp_config: self.algorithm_selector.create_history_descriptor(
as_result_for_best_candidate,
hp_config
Expand Down
Loading

0 comments on commit e3ff27b

Please sign in to comment.