You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
using sklearn.metrics.normalized_mutual_info_score for continuous data does not return a warning #17892
I have been informed that using sklearn.metrics.normalized_mutual_info_score to estimate a normalized mutual information score on continuous data should have returned at least a warning that this module is for use only on discrete data; and error on floats.
an example of test data:
noise=np.random.rand(500)
wavelength=np.linspace(0.01,1,500)*1e-6
# testing the normalized MI score between wavelength and noise - should return near zero for totally unrelated data sets
constant_normalized_mi=normalized_mutual_info_score(wavelength,noise)
I think the check_clustering function should call type_of_target. We're doing that in the classification metrics. I think this has come up before, I think there's something in the issue tracker about that already.
I've implemented the change for check_clustering to raise an error for a float. In the example that @bfiranski can you confirm whether the function should produce an error or a near zero value.
Activity
amueller commentedon Jul 11, 2020
I think the
check_clusteringfunction should calltype_of_target. We're doing that in the classification metrics. I think this has come up before, I think there's something in the issue tracker about that already.dachosen1 commentedon Jul 11, 2020
I can take this.
dachosen1 commentedon Jul 11, 2020
I've implemented the change for
check_clusteringto raise an error for a float. In the example that @bfiranski can you confirm whether the function should produce an error or a near zero value.Ashutosh619-sudo commentedon Jul 19, 2020
#17938
can you please update me on this.
dachosen1 commentedon Jul 20, 2020
I fixed this issue. From my understanding the fix is suppose to return a warning not a error.