-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
[MRG] FIX IndexError due to imprecision in KMeans++ #11756
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
Fixes scikit-learn#8583 I'm not sure how to test this.
Apparently it's not so simple (or I just have a simple logic error) |
Does this seem to be an appropriate fix for the issue in #8583? |
why not use the random choice alternative and not use cumsum? |
Somehow missed this ancient comment of yours, @amueller
No reason, assuming it's fine to change the fit across versions. |
voting for this pr to be merged |
I think regardless of whether we can get a reproducible example we should
fix this because we can see this as the likely or only source of error.
|
Agreed |
@jeremiedbb it's not easy to reproduce as it depends on the dataset, but thanks for approving it. |
I'm not sure how to test this.
As noted in #8583 (comment) we could instead switch to using
random_state.choice
but will probably lose backwards compatibility.