Skip to content
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

How to set max_alpha in GeneralizedLinearRegressorCV? #810

Open
mlondschien opened this issue Jun 20, 2024 · 2 comments
Open

How to set max_alpha in GeneralizedLinearRegressorCV? #810

mlondschien opened this issue Jun 20, 2024 · 2 comments

Comments

@mlondschien
Copy link
Contributor

The class does not have an argument max_alpha. The min_alpha description states

Minimum alpha to estimate the model with. The grid will then be created over [max_alpha, min_alpha]

If I set min_alpha and min_alpha_ratio I get a warning

UserWarning: `min_alpha` is set. Ignoring `min_alpha_ratio`.
@MarcAntoineSchmidtQC
Copy link
Member

The documentation should be clearer. max_alpha is always set to be the level of alpha required to get all coefficients to be zero when using l1 regularization. Glum computes it internally, and creates a search grid between the min_alpha and that number (or a search grid between min_alpha_ratio * this number and this number). This is also the behavior of glmnet if I recall correctly.

@mlondschien
Copy link
Contributor Author

Thanks! For 0 < l1_ratio < 1, is this "the level of alpha required to get all coefficients to be zero had l1_ratio=1" or "the level of alpha required to get all coefficients to be zero"? What for l1_ratio = 0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants