Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MAINT Use check_scalar to validate scalar in: BayesianRidge #23051

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 5 commits into from
May 20, 2022

Conversation

TheBicPen
Copy link
Contributor

Reference Issues/PRs

Fixes #21927

What does this implement/fix? Explain your changes.

Adds validation for scalar parameters of BayesianRidge.

Any other comments?

I assumed that for bool-type params, int values 0 and 1 are acceptable. This matches the validation used in other estimators. I'm not sure what the valid ranges of values are for the hyperparameters, so I only validated their type.

@glemaitre glemaitre self-requested a review May 17, 2022 09:46
Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

LGTM

Actually, since the documentation never stated int, it is better to just consider only np.bool_ and bool (even if bool is actually an in).

@glemaitre glemaitre added the Quick Review For PRs that are quick to review label May 17, 2022
@glemaitre
Copy link
Member

@thomasjpfan Do you want to make a quick review of this one?
I know that we are going to make the automated parameter validation but it will make it easier for this estimator.

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.

Thank you for the PR!

LGTM

@thomasjpfan thomasjpfan merged commit ebab121 into scikit-learn:main May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use the function check_scalar for parameters validation
4 participants