Skip to content

FIX MeanShift when estimated bandwidth is 0 - #17742

Merged
glemaitre merged 10 commits into
scikit-learn:masterfrom
jeremiedbb:fix-mean-shift-bin-size
Jul 10, 2020
Merged

glemaitre merged 10 commits into
scikit-learn:masterfrom
jeremiedbb:fix-mean-shift-bin-size

Conversation

@jeremiedbb

Copy link
Copy Markdown
Member

Fixes #17727

def test_mean_shift_zero_bandwidth():
# Check that mean shift works when the estimated bandwidth is 0.
X = np.array([1, 1, 1, 2, 2, 2, 3, 3]).reshape(-1, 1)
MeanShift(bin_seeding=True).fit(X)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

worth checking that the output is sane?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sure, I updated the test.

@rth rth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks @jeremiedbb . Please add a what's new entry.

@glemaitre

Copy link
Copy Markdown
Member

@jeremiedbb Could you merge master just to run the CIs?

@glemaitre
glemaitre merged commit 591146d into scikit-learn:master Jul 10, 2020
@glemaitre

Copy link
Copy Markdown
Member

Thanks @jeremiedbb

@ogrisel ogrisel added this to the 0.23.2 milestone Aug 3, 2020
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Aug 3, 2020
jayzed82 pushed a commit to jayzed82/scikit-learn that referenced this pull request Oct 22, 2020
@jeremiedbb
jeremiedbb deleted the fix-mean-shift-bin-size branch September 3, 2026 16:08
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.

Error in sklearn.cluster import MeanShift when bin_seeding is true

5 participants