[go: up one dir, main page]

Skip to content
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 prevent infinite loop in KMeans #28165

Merged
merged 10 commits into from
Jan 19, 2024

Conversation

jeremiedbb
Copy link
Member

Fixes #28055

When there are more centers than non-duplicate samples, the relocation of empty cluster will trigger at every iteration preventing the algorithm to stop.

Copy link
github-actions bot commented Jan 18, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 1f3d9e3. Link to the linter CI: here

@glemaitre glemaitre self-requested a review January 18, 2024 15:21
doc/whats_new/v1.4.rst Outdated Show resolved Hide resolved
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. Thanks @jeremiedbb

jeremiedbb and others added 2 commits January 18, 2024 16:33
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Copy link
Contributor
@OmarManzoor OmarManzoor 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 @jeremiedbb

@OmarManzoor OmarManzoor merged commit 26dfe83 into scikit-learn:main Jan 19, 2024
27 checks passed
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Feb 10, 2024
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Feb 13, 2024
glemaitre pushed a commit that referenced this pull request Feb 13, 2024
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.

Infinite Loop in K-means when relocating empty clusters
3 participants