kayzhu / LSHash

A fast Python implementation of locality sensitive hashing.
MIT License
660 stars 158 forks source link

How to set a appropriate hash size? #29

Open Tegrisco opened 4 years ago

Tegrisco commented 4 years ago

Sorry to bother. This might be a stupid question. I really don't know how to set the hash size, is that depend on my data size? In the quick start example, I try to change LSHash (6, 8) to LSHash(3, 8) and getting the same result.

lsh2 = LSHash(3, 8) lsh2.index([1,2,3,4,5,6,7,8]) lsh2.index([10,12,99,1,5,31,2,3]) lsh2.query([1,2,3,4,5,6,7,7]) [((1, 2, 3, 4, 5, 6, 7, 8), 1), ((2, 3, 4, 5, 6, 7, 8, 9), 11)]

Thanks!