Closed ankane closed 5 months ago
Another approach would be to change Hamming distance to use mean
.
metrics = {
"hamming": Metric(
- distance=lambda a, b: np.sum(a.astype(np.bool_) ^ b.astype(np.bool_)),
+ distance=lambda a, b: np.mean(a.astype(np.bool_) ^ b.astype(np.bool_)),
distance_valid=lambda a: True
),
Thanks!
Thanks @maumueller!
Both
sift-256-hamming
andword2bits-800-hamming
always report 0 recall, as the distances in the HDF5 files are floats between 0 and 1 rather than the Hamming distance. Multiplying by the dataset dimensions fixes it.This issue is likely the cause of #420.