Skip to content

Commit

Permalink
Grid search: optimize alpha not l1_ratio
Browse files Browse the repository at this point in the history
Do not optimize `l1_ratio`. Instead use the default of 0.15. Search a denser
grid for `alpha`. See cognoma#56
  • Loading branch information
dhimmel committed Oct 11, 2016
1 parent 66df379 commit 10308e0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cognoml/classifiers/logistic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
'classify__class_weight': ['balanced'],
'classify__loss': ['log'],
'classify__penalty': ['elasticnet'],
#'classify__alpha': 10.0 ** np.arange(-3, 2),
#'classify__l1_ratio': [0.0, 0.1, 0.2, 0.5, 0.8, 0.9, 1.0],
'classify__alpha': 10.0 ** np.arange(-1, 1),
'classify__l1_ratio': [0.0, 1.0],
'classify__alpha': 10.0 ** np.linspace(-3, 1, 10),
'classify__l1_ratio': [0.15],
}

grid_search = GridSearchCV(
Expand Down

0 comments on commit 10308e0

Please sign in to comment.