-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
ENH KMeans initialization account for sample weights #25752
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
|
For reasons unknown (for now) bisect kmeans does not pass tests:
Got:
And assertion error as the result. This happens without any weighting of the input at all. |
|
The test was not robust and very sensitive to rng. Since your changes impact the initialization (even without sample weights), this test started to fail. I pushed a more robust version of the test that is not subject to rng. The clusters will always be the same no matter the initialization (up to a permutation). |
glemaitre
left a comment
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.
Few documentation nitpicks. Otherwise, it starts to look good.
jeremiedbb
left a comment
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.
Some more nitpicks
jeremiedbb
left a comment
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.
cln
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.
I directly pushed a last round of nitpicks.
LGTM. Thanks @glevv !
|
LGTM. Thanks @glevv |
|
We could in a subsequent PR add the possibility to pass @glevv If you feel like you want to have a look, feel free to propose a PR. |
Fixes #25527