lmcinnes / pynndescent

A Python nearest neighbor descent for approximate nearest neighbors
BSD 2-Clause "Simplified" License
899 stars 105 forks source link

Add support for bitpacked vectors with hamming and jaccard #238

Closed lmcinnes closed 8 months ago

lmcinnes commented 8 months ago

as 1bit embedding vectors become more common it has become worth the effort to support bitpacked (into uint8) vectors of binary data via hamming and jaccard distance (notionally equivalent to inner-product and cosine distances). This should add basic support via the metric "bit_hamming" and "bit_jaccard" assumiong data is passed as an ndarray of dtype np.uint8.