-
-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Performance Degradation in MeanShift When Data Has No Variance #28926
Comments
The first snippet lead to |
I think that the fact that:
The second bug is probably caused by the Please feel free to open two PRs (one for each problem, in either order), along with non-regression tests. |
@glemaitre @ogrisel |
Describe the bug
When data provided to
MeanShift
consists of values with no variance (for example, two clusters of 0 and 1), the performance becomes extremely slow.I am unsure whether this is a bug or an unavoidable aspect of the algorithm's design. Any clarification would be appreciated.
Steps/Code to Reproduce
Link to Google Colab: https://colab.research.google.com/drive/1hlqhtaD8T40hwcleUKoI4uzrW1XtSRA4?usp=sharing#scrollTo=6g5qI45KUW_i
Expected Results
When data provided to
MeanShift
consists of values with no variance, the performance becomes as fast as when handling data with variance.Actual Results
If
MeanShift
receives a 1D array with no variance, the computation is significantly slower.Below is a control example, where the input has some variance:
Versions
The text was updated successfully, but these errors were encountered: