Open opatiny opened 1 year ago
Should get inspired by Tanimoto: https://github.com/mljs/distance/blob/master/src/similarities/tanimoto.js Take care than tanimoto has this flag 'bitvector' to specifiy that the a and b parameters are array (of uint32 I guess).
The Hamming distance can typically be used to compute the distance between two bit strings very easily, by doing
sum(xor(a,b))
. It counts the number of dissimilar elements between the strings. It can be used as a distance measurement for feature matching.https://en.wikipedia.org/wiki/Hamming_distance