-
-
Notifications
You must be signed in to change notification settings - Fork 26k
Fix inconsistent labels returned by BayesianGaussianMixture.fit_predict #12451
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
Fix inconsistent labels returned by BayesianGaussianMixture.fit_predict #12451
Conversation
is that also an issue for GaussianMixture? |
Probably since it inherits it's fit method from BaseMixture. But this fix is made in BaseMixture so it should fix both. |
Indeed. I updated the relevant test and the changelog. |
We should add the two models in the |
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.
Are we sure this change belongs in 0.20.1?
There is not Changed models section for 0.20.1. I think that the change log for the bug fix release is short enough that such a section is not required in this case.
It's not a regression fix but I believe it's a bug fix that can fix a potentially hard to understand annoying breakage of our fit_predict contract. So I am in favor of including it in 0.20.1 (although I don't think this bug impacts that many people). |
I'm ambivalent about 0.20.1. Maybe leaning towards including it? |
I fixed the conflict. |
The flake8 issue on travis seems like a false positive resulting from my last merge commit. @lesteve if you ever wanted to consider a new edge case for your diff flake8 thingy ;) |
I can't see the false positive you are talking about, but maybe I am missing something ... The error I see in the Travis flake8 failure:
Looking at the diff, it does look like you introduced a second "import pytest" (line 13) where there was already one on line 8. |
…it_predict (scikit-learn#12451)" This reverts commit ff0f29f.
…it_predict (scikit-learn#12451)" This reverts commit ff0f29f.
This is a fix for the issue reported in #12266. It includes a non-regression test to highlight the problem. I will add a changelog entry once the PR is open.