Skip to content

[MRG] FIX IndexError due to imprecision in KMeans++#11756

Merged
glemaitre merged 2 commits intoscikit-learn:masterfrom
jnothman:fix8583
Jul 18, 2019
Merged

[MRG] FIX IndexError due to imprecision in KMeans++#11756
glemaitre merged 2 commits intoscikit-learn:masterfrom
jnothman:fix8583

Conversation

@jnothman
Copy link
Copy Markdown
Member

@jnothman jnothman commented Aug 6, 2018

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.

@jnothman jnothman added the Bug label Aug 6, 2018
@jnothman
Copy link
Copy Markdown
Member Author

jnothman commented Aug 6, 2018

Apparently it's not so simple (or I just have a simple logic error)

@jnothman
Copy link
Copy Markdown
Member Author

jnothman commented Aug 7, 2018

Does this seem to be an appropriate fix for the issue in #8583?

@amueller
Copy link
Copy Markdown
Member

why not use the random choice alternative and not use cumsum?

@jnothman
Copy link
Copy Markdown
Member Author

jnothman commented Mar 4, 2019

Somehow missed this ancient comment of yours, @amueller

why not use the random choice alternative and not use cumsum?

No reason, assuming it's fine to change the fit across versions.

@jsmolina
Copy link
Copy Markdown

jsmolina commented Jun 7, 2019

voting for this pr to be merged

@jeremiedbb
Copy link
Copy Markdown
Member

jeremiedbb commented Jun 7, 2019

@jsmolina have you encountered the #8583 issue with sklearn 0.21.2 ? If so can you provide a reproducible example because I haven't been able to reproduce it so far.

@jnothman
Copy link
Copy Markdown
Member Author

jnothman commented Jun 10, 2019 via email

@jeremiedbb
Copy link
Copy Markdown
Member

Agreed

@jsmolina
Copy link
Copy Markdown

@jeremiedbb it's not easy to reproduce as it depends on the dataset, but thanks for approving it.
I guess it will get into next version.

@jnothman jnothman modified the milestones: 0.21.3, 0.20.4 Jun 13, 2019
@glemaitre glemaitre merged commit 67130a5 into scikit-learn:master Jul 18, 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 to jnothman/scikit-learn that referenced this pull request Jul 23, 2019
jnothman added a commit that referenced this pull request Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants