Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flaml/automl/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2032,6 +2032,9 @@ def config2params(self, config: dict) -> dict:

def __init__(self, task="binary", **config):
super().__init__(task, **config)
random_seed = self.params.pop("random_seed", config.get("random_seed", 10242048))
if "random_state" not in self.params:
self.params["random_state"] = random_seed
assert self._task.is_classification(), "LogisticRegression for classification task only"
self.estimator_class = LogisticRegression

Expand Down
4 changes: 2 additions & 2 deletions test/automl/test_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def test_sparse_matrix_lr(self):
"histgb",
"kneighbor",
"lgbm",
# "lrl1",
"lrl1",
"lrl2",
"rf",
"sgd",
Expand Down Expand Up @@ -495,7 +495,7 @@ def test_reproducibility_of_classification_models(estimator: str):
"histgb",
"kneighbor",
"lgbm",
# "lrl1",
"lrl1",
"lrl2",
"svc",
"rf",
Expand Down
Loading