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
scipy breakage of scikit-learn hamming distance between ... things #4014
My scipy PR scipy/scipy#4293 merged to fix problems in scikit-bio is now causing a test failure in scikit-learn. I'll try to figure out the best way to fix this, probably by figuring out exactly how CLASSIFICATION_METRICS['hamming'](y1_str, y2_str, pos_label="spam") in sklearn ends up calling hamming(x, y) in scipy so that I can add a scipy regression test or possibly a sklearn PR.
======================================================================
ERROR: Ensure that classification metrics with string labels
----------------------------------------------------------------------
Traceback (most recent call last):
/sklearn/metrics/tests/test_common.py", line 531, in test_invariance_string_vs_numbers_labels
measure_with_str = metric_str(y1_str, y2_str)
/sklearn/metrics/classification.py", line 1307, in hamming_loss
return sp_hamming(y_true, y_pred)
/scipy/spatial/distance.py", line 369, in hamming
return np.not_equal(u, v).mean()
AttributeError: 'NotImplementedType' object has no attribute 'mean'
Activity
rgommers commentedon Dec 28, 2014
OK fix is in, and there is no released scipy version containing the issue. So this can be closed.