-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
MNT Add validation for parameters in ElasticNet
#22240
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once the following is addressed:
ElasticNet
ElasticNet
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Done, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @ArturoAmorQ !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reference Issues/PRs
Solves a part of the Issues #20724 and #21927.
What does this implement/fix? Explain your changes.
Use the helper function
check_scalar
fromsklearn.utils
to validate the scalar parametersl1_regularization
,alpha
,tol
andmax_iter
for the classlinear_model.ElasticNet
to ensure consistent error types and messages. This indirectly validates the last three of said parameters for thelinear_model.Lasso
.The test
Any other comments?