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

Make algorithm='auto' default to using 'full' instead of 'elkan' #21735

Merged
merged 5 commits into from Nov 25, 2021

Conversation

ageron
Copy link
Contributor

@ageron ageron commented Nov 21, 2021

Reference Issues/PRs

Fixes #21729

What does this implement/fix? Explain your changes.

In sklearn.cluster.KMeans, the default algorithm="auto" now uses the full classical EM-style algorithm (as with algorithm="full") instead of Elkan's algorithm, as the former is often faster in practice.

Any other comments?

This does not affect the result of clustering, and the default parameter remains "auto", so this should only affect performance.

Copy link
Member

@ogrisel ogrisel left a comment

Thanks for the quick PR, overall it looks good to me. Just a few comments:

doc/whats_new/v1.1.rst Show resolved Hide resolved
doc/whats_new/v1.1.rst Outdated Show resolved Hide resolved
sklearn/cluster/tests/test_k_means.py Show resolved Hide resolved
@ageron
Copy link
Contributor Author

@ageron ageron commented Nov 22, 2021

Thanks for the review @ogrisel , I'll take care of this today.

@ageron
Copy link
Contributor Author

@ageron ageron commented Nov 22, 2021

Done

Copy link
Contributor

@glemaitre glemaitre left a comment

LGTM. Only a small nitpick.

doc/whats_new/v1.1.rst Outdated Show resolved Hide resolved
@glemaitre glemaitre merged commit bacc91c into scikit-learn:main Nov 25, 2021
7 of 11 checks passed
@glemaitre
Copy link
Contributor

@glemaitre glemaitre commented Nov 25, 2021

I merge my small nitpick to go ahead.

@glemaitre
Copy link
Contributor

@glemaitre glemaitre commented Nov 25, 2021

Thanks @ageron

@ageron ageron deleted the kmeans_algo_default_full branch Nov 25, 2021
glemaitre added a commit to glemaitre/scikit-learn that referenced this issue Nov 29, 2021
samronsin added a commit to samronsin/scikit-learn that referenced this issue Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants