-
-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
numerical stability bug in adjusted_mutual_info_score with numpy master (1.20 dev) #19165
Labels
Comments
Ouch.... |
glemaitre
changed the title
numerical stability bug in adjusted_mutual_info_score with numpy master (1.20 dev)
numerical stability bug in adjusted_mutual_info_score with numpy master (1.21 dev)
Jan 14, 2021
Uhm it is weird: In [2]: >>> import numpy as np
...: >>> from sklearn.metrics.cluster import adjusted_mutual_info_score
...: >>> n_samples = 1000
...: >>> labels_a = np.ones(n_samples, dtype=int)
...: >>> labels_b = np.arange(n_samples, dtype=int)
...: >>> adjusted_mutual_info_score(labels_a, labels_b, average_method="min")
Out[2]: 0.0
In [3]: np.__version__
Out[3]: '1.21.0.dev0+417.gfde2e536a'
In [4]: import sklearn
In [5]: sklearn.__version__
Out[5]: '1.0.dev0' I cannot reproduce |
glemaitre
changed the title
numerical stability bug in adjusted_mutual_info_score with numpy master (1.21 dev)
numerical stability bug in adjusted_mutual_info_score with numpy master (1.20 dev)
Jan 14, 2021
Isn't it Scipy then. |
I cannot reproduce neither with:
|
Could not reproduce with the following versions (same as the CI apart of pandas)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproducer that works with numpy 1.19.5:
and that fails on the
[scipy-dev]
build in the testtest_exactly_zero_info_score
with the numpy nightly build:https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=25088&view=logs&j=dfe99b15-50db-5d7b-b1e9-4105c42527cf&t=ef785ae2-496b-5b02-9f0e-07a6c3ab3081
It returns 2.2207031250001146 instead of 0.0...
The text was updated successfully, but these errors were encountered: