-
-
Notifications
You must be signed in to change notification settings - Fork 26k
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
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
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
).
@thomasjpfan Do you want to make a quick review of this one? |
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.
Thank you for the PR!
LGTM
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.