ENH Adding variable force_alpha to classes in naive_bayes.py#22269
Merged
jjerphan merged 79 commits intoscikit-learn:mainfrom Jul 22, 2022
Merged
ENH Adding variable force_alpha to classes in naive_bayes.py#22269jjerphan merged 79 commits intoscikit-learn:mainfrom
force_alpha to classes in naive_bayes.py#22269jjerphan merged 79 commits intoscikit-learn:mainfrom
Conversation
Merging changes from the main repository
Merging changes from the main repository
Merging changes from the main repository
Update branch
Resolving conflicts
…ka204/scikit-learn into alpha-close-or-equal-0-update
Alpha close or equal 0 update
Update master
…a-is-close-or-equal-0' into master-copy
Update branch
…ernoulliNB-and-MultinomialNB-when-alpha-is-close-or-equal-0 # Conflicts: # doc/whats_new/v0.24.rst # sklearn/naive_bayes.py
# Conflicts: # doc/whats_new/v1.0.rst
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
# Conflicts: # sklearn/naive_bayes.py
Diadochokinetic
added a commit
to Diadochokinetic/scikit-learn
that referenced
this pull request
Jun 25, 2022
thomasjpfan
reviewed
Jun 29, 2022
Member
thomasjpfan
left a comment
There was a problem hiding this comment.
For the force_alpha=True everywhere in tests, I prefer pytestmark = pytest.filterwarnings in this case.
In many cases force_alpha=True does not change anything because the default alpha is 1.0.
This reverts commit 14a360f.
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
thomasjpfan
reviewed
Jul 6, 2022
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
jjerphan
approved these changes
Jul 16, 2022
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
force_alpha to classes in naive_bayes.pyforce_alpha to classes in naive_bayes.py
thomasjpfan
reviewed
Jul 20, 2022
thomasjpfan
approved these changes
Jul 22, 2022
Member
thomasjpfan
left a comment
There was a problem hiding this comment.
Minor nits, otherwise LGTM
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
greglandrum
added a commit
to rdkit/laplaciannb
that referenced
this pull request
Jan 6, 2023
The NaiveBayes classifiers now have a force_alpha attribute, which is explained in: scikit-learn/scikit-learn#22269 This PR just gets the code working; it would be good to invest some time into reading the details of that sklearn PR and making the appropriate adjustments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Fixes #10772
Resolves #10775 (stalled)
Resolves #16747 (stalled)
Resolves #18805 (stalled)
What does this implement/fix? Explain your changes.
This PR takes over stalled PR #18805.
From the description of #16747 and #18805: "This PR adds a new variable
alphaCorrectionin classes innaive_bayes.py, which is set toTrueby default and if set toFalse, then foralpha=0(or greater, but still smaller than_ALPHA_MIN) alpha is not being rounded up to_ALPHA_MIN."This PR updated minor version details in documentation as well as began a double-deprecation cycle, initially adding a
force_alpha=Falsekeyword and begins a deprecation cycle to change its default toTrue. After completion of this default change, a new deprecation cycle will begin to removeforce_alpha.Any other comments?
Follow-up PR to begin deprecation for removal of
force_alpha