Skip to content

Commit

Permalink
bugfix for regressors
Browse files Browse the repository at this point in the history
  • Loading branch information
Eden Wu committed Sep 1, 2024
1 parent 3dbf2bf commit 1da9766
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion alpha_automl/automl_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def fit(self, X, y):
if self.optimizing and index < 10:
opt_pipeline = optimizer.optimize_pipeline(pipeline.get_pipeline())
smac_pipeline = score_pipeline(opt_pipeline, X_sample, y_sample, self.scorer, self.splitter, self.task_type)
if smac_pipeline.get_score() > pipeline.get_score():
if smac_pipeline.get_score() < pipeline.get_score():
logger.critical(f'[SMAC] Former {pipeline_id} successfully optimized: {pipeline.get_score()} => {smac_pipeline.get_score()}')
sorted_pipelines[index] = smac_pipeline

Expand Down
2 changes: 1 addition & 1 deletion alpha_automl/hyperparameter_tuning/smac.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def __init__(
y=None,
n_trials=50,
splitter=make_splitter('holdout'),
scorer=make_scorer('accuracy_score'),
scorer=make_scorer('r2_score'),
):
self.pipeline = None
self.X = X
Expand Down

0 comments on commit 1da9766

Please sign in to comment.