[MRG] FIX IndexError due to imprecision in KMeans++#11756
Merged
glemaitre merged 2 commits intoscikit-learn:masterfrom Jul 18, 2019
Merged
[MRG] FIX IndexError due to imprecision in KMeans++#11756glemaitre merged 2 commits intoscikit-learn:masterfrom
glemaitre merged 2 commits intoscikit-learn:masterfrom
Conversation
Fixes scikit-learn#8583 I'm not sure how to test this.
Member
Author
|
Apparently it's not so simple (or I just have a simple logic error) |
Member
Author
|
Does this seem to be an appropriate fix for the issue in #8583? |
Member
|
why not use the random choice alternative and not use cumsum? |
Member
Author
|
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 |
Member
Member
Author
|
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.
|
Member
|
Agreed |
jeremiedbb
approved these changes
Jun 11, 2019
|
@jeremiedbb it's not easy to reproduce as it depends on the dataset, but thanks for approving it. |
jnothman
added a commit
to jnothman/scikit-learn
that referenced
this pull request
Jul 23, 2019
jnothman
added a commit
to jnothman/scikit-learn
that referenced
this pull request
Jul 23, 2019
jnothman
added a commit
to jnothman/scikit-learn
that referenced
this pull request
Jul 23, 2019
jnothman
added a commit
that referenced
this pull request
Jul 24, 2019
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.
I'm not sure how to test this.
As noted in #8583 (comment) we could instead switch to using
random_state.choicebut will probably lose backwards compatibility.