8000 MNT Add validation for parameters in `ElasticNet` by ArturoAmorQ · Pull Request #22240 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 9 commits into from
Jan 22, 2022

Conversation

ArturoAmorQ
Copy link
Member

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 from sklearn.utils to validate the scalar parameters l1_regularization, alpha, tol and max_iter for the class linear_model.ElasticNet to ensure consistent error types and messages. This indirectly validates the last three of said parameters for the linear_model.Lasso.

The test

Any other comments?

Copy link
Member
@ogrisel ogrisel left a 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:

@ArturoAmorQ ArturoAmorQ changed the title [WIP] MNT Add validation for parameters in ElasticNet MNT Add validation for parameters in ElasticNet Jan 19, 2022
ArturoAmorQ and others added 3 commits January 19, 2022 16:37
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>
@ArturoAmorQ
Copy link
Member Author

Done, thanks!

Copy link
Member
@thomasjpfan thomasjpfan left a 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 !

Copy link
Member
@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thomasjpfan thomasjpfan merged commit d7fc1df into scikit-learn:main Jan 22, 2022
@ArturoAmorQ ArturoAmorQ deleted the validations_lasso branch March 30, 2022 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0