8000 Make algorithm='auto' default to using 'full' instead of 'elkan' by ageron · Pull Request #21735 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

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

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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ageron
Copy link
Contributor Author
ageron commented Nov 22, 2021

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

@ageron
Copy link
Contributor Author
ageron commented Nov 22, 2021

Done

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. Only a small nitpick.

@glemaitre glemaitre merged commit bacc91c into scikit-learn:main Nov 25, 2021
@glemaitre
Copy link
Member

I merge my small nitpick to go ahead.

@glemaitre
Copy link
Member

Thanks @ageron

@ageron ageron deleted the kmeans_algo_default_full branch November 25, 2021 18:56
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Nov 29, 2021
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
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.

KMeans Elkan algorithm (the default) is generally slower than Full
3 participants
0