-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot set l1_ratio as a list when using Elastic Net #52
Comments
@dromare It ran fine with the list input of
If you can post your codes I can take a look. |
Hi sayanpatra, If I print out the values of alpha and l1_ratio in lines 378-379 of C:\ProgramData\Anaconda3\envs\greykite-venv\lib\site-packages\greykite\algo\common\model_summary_utils.py in add_model_df_lm(info_dict) I get the following:
Then in line 384 the calculation because |
Hello there,
I get an error when running Greykite with the Elastic Net algorithm and the l1_ratio parameter set up as a list of floats [.1, .5, .7, .9, .95, .99, 1] rather than as a single float number:
The Scikit Learn link https://scikit-learn.org/0.24/modules/generated/sklearn.linear_model.ElasticNetCV.html#sklearn.linear_model.ElasticNetCV says the following:
...This parameter can be a list, in which case the different values are tested by cross-validation and the one giving the best prediction score is used. Note that a good choice of list of values for l1_ratio is often to put more values close to 1 (i.e. Lasso) and less close to 0 (i.e. Ridge), as in [.1, .5, .7, .9, .95, .99, 1].
I would like to know if there is a workaround other than setting up a grid search and CV validation outside the ElasticNetCV() framework, for example:
_cv_max_splits = 5
Grid search is possible
custom = dict(
fit_algorithm_dict=[
dict(
fit_algorithm="elastic_net",
fit_algorithm_params={
"l1_ratio": 0.7
}
),
dict(
fit_algorithm="elastic_net",
fit_algorithm_params={
"l1_ratio": 0.9
}
),
]
)_
Thank you for the good work !
Best regards,
Dario
The text was updated successfully, but these errors were encountered: