Skip to content

Commit

Permalink
Fix overfitting elasticnet model and update its tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
moben1 committed Mar 30, 2024
1 parent 3f5b191 commit 45dde3b
Show file tree
Hide file tree
Showing 2 changed files with 1,560 additions and 94 deletions.
4 changes: 2 additions & 2 deletions qsar/models/elasticnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def optimize_hyperparameters(self, trial: Trial, df: pd.DataFrame) -> float:
:rtype: float
"""
self.params = {
"alpha": trial.suggest_float("alpha", 1e-10, 1e10, log=True),
"l1_ratio": trial.suggest_float("l1_ratio", 1e-10, 1, log=True),
"alpha": trial.suggest_float("alpha", 1e-5, 2, log=True),
"l1_ratio": trial.suggest_float("l1_ratio", 1e-2, 1, log=True),
}

self.model.set_params(**self.params)
Expand Down
Loading

0 comments on commit 45dde3b

Please sign in to comment.