-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
scipy breakage of scikit-learn hamming distance between ... things #4014
Copy link
Copy link
Closed
scipy/scipy
#4319Description
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'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels