diff --git a/alpha_automl/automl_api.py b/alpha_automl/automl_api.py index d2aa862..4b17721 100644 --- a/alpha_automl/automl_api.py +++ b/alpha_automl/automl_api.py @@ -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 diff --git a/alpha_automl/hyperparameter_tuning/smac.py b/alpha_automl/hyperparameter_tuning/smac.py index b9f667a..c91ad6c 100644 --- a/alpha_automl/hyperparameter_tuning/smac.py +++ b/alpha_automl/hyperparameter_tuning/smac.py @@ -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