FAQ Database Discussion Community


trying to understand LSH through the sample python code

python,similarity,locality-sensitive-hash
the concise python code i study for is here Question A @ line 8 i do not really understand the syntax meaning for "res = res << 1" for the purpose of "get_signature" Question B @ line 49 (SOLVED BY myself through another Q&A) "xor = r1^r2" does not really...

Why k and l for LSH used for approximate nearest neighbours?

algorithm,hash,knn,locality-sensitive-hash,approximate-nn-searching
In all the Locality Sensitive Hashing explanations (i.e. http://en.wikipedia.org/wiki/Locality-sensitive_hashing#LSH_algorithm_for_nearest_neighbor_search ) They describe that k Hash Functions are generated, but only l (l < k) are used in the hash tables to hash the values. Why generating k at all and not just generate l? Why the seperate factors k and...