Skip to content

MAINT validate parameter in GaussianNB #23583

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 10 commits into from
Jun 28, 2022

Conversation

Jitensid
Copy link
Contributor

Reference Issues/PRs

GaussianNB uses _validate_parameters as part of #23462

What does this implement/fix? Explain your changes.

  1. GaussianNB has a new class attribute _parameter_constraints that defines the valid types and values for the parameters.
  2. Both fit and partial_fit methods first call the self._validate_params() method.

Any other comments?

If there are any mistakes please let me know and I will fix them as soon as possible.

Copy link
Member

@jeremiedbb jeremiedbb 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 @Jitensid. Here are some suggestions

@Jitensid
Copy link
Contributor Author

@jeremiedbb I have made changes as per your suggestion.

@Jitensid Jitensid requested a review from jeremiedbb June 13, 2022 07:26
@jeremiedbb jeremiedbb added the Validation related to input validation label Jun 13, 2022
@Jitensid Jitensid changed the title [MRG] Gaussian NB uses validate_params [MAINT] Gaussian NB uses validate_params Jun 21, 2022
@Jitensid Jitensid changed the title [MAINT] Gaussian NB uses validate_params [MRG] Gaussian NB uses validate_params Jun 21, 2022
@glemaitre glemaitre self-requested a review June 27, 2022 07:34
@glemaitre glemaitre changed the title [MRG] Gaussian NB uses validate_params MAINT validate parameter in GaussianNB Jun 27, 2022
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.

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

LGTM. thanks @Jitensid

@jeremiedbb jeremiedbb merged commit a00441f into scikit-learn:main Jun 28, 2022
ogrisel pushed a commit to ogrisel/scikit-learn that referenced this pull request Jul 11, 2022
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