Similarity join (Min-hash)
blog.yellowflash.in
Similarity join (Min-hash)
1–10 of 10 posts
Re: Similarity join (Min-hash)
#2Re: Similarity join (Min-hash)
#3Brilliant stuff. Isn't the XORing essentially just equivalent to a 1-time pad -- which isn't very hash-like. I'd think using a PRNG [1] with the initial hash value as the seed, to generate more values, would be more effective. https://en.wikipedia.org/wiki/Pseudorandom_number_generator
Re: Similarity join (Min-hash)
#4Brilliant stuff. Isn't the XORing essentially just equivalent to a 1-time pad -- which isn't very hash-like. I'd think using a PRNG [1] with the initial hash value as the seed, to generate more values, would be more effective. https://en.wikipedia.org/wiki/Pseudorandom_number_generator
Yeah, I had a similar intuition about that approach possibly being weak or problematic. However, if my cursory reading of the algorithm is at all correct, the goal may simply be to consistently choose another hash value (a different min hash) and it may work fine. In other words, the same hash values would be considered the minimum after XORing with a random number and they will be different from the initial hash tha…
Re: Similarity join (Min-hash)
#5Re: Similarity join (Min-hash)
#6That's clear, call this P1
> The probability that two documents A and B having the same representative token is, equal again to Jaccard’s similarity
That's less clear (call this P2) and not equivalent to the first statement, afaict. In fact, this probability seems lower than the previous one. Consider the table:
token A B
a False True
b True True
This counts as matching under P1, but not under P2.What am I missing here?
In order words, the number of cases where `reptoken(A) = reptoken(B)` is a subset of cases where `reptoken(A) is in B`
Re: Similarity join (Min-hash)
#7> The probability of C also having true in the row would be equal to Jaccard’s similarity! That's clear, call this P1 > The probability that two documents A and B having the same representative token is, equal again to Jaccard’s similarity That's less clear (call this P2) and not equivalent to the first statement, afaict. In fact, this probability seems lower than the previous one. Consider the table: token A B a Fal…
Re: Similarity join (Min-hash)
#8Brilliant stuff. Isn't the XORing essentially just equivalent to a 1-time pad -- which isn't very hash-like. I'd think using a PRNG [1] with the initial hash value as the seed, to generate more values, would be more effective. https://en.wikipedia.org/wiki/Pseudorandom_number_generator
I don't think xor works, but simple arithmetic, IIRC h_i(key) = i*h(key) + C mod 2^32, is viable and SIMD-friendly. Look up minwise-independent hash functions.
Re: Similarity join (Min-hash)
#9> The probability of C also having true in the row would be equal to Jaccard’s similarity! That's clear, call this P1 > The probability that two documents A and B having the same representative token is, equal again to Jaccard’s similarity That's less clear (call this P2) and not equivalent to the first statement, afaict. In fact, this probability seems lower than the previous one. Consider the table: token A B a Fal…
The net result of the hashing etc. is to shuffle the unique elements of A union B. In that shuffled union, the first element is in at least one of A or B; if it's in both it's in the intersection. The chance of that is J.
Re: Similarity join (Min-hash)
#10> The probability of C also having true in the row would be equal to Jaccard’s similarity! That's clear, call this P1 > The probability that two documents A and B having the same representative token is, equal again to Jaccard’s similarity That's less clear (call this P2) and not equivalent to the first statement, afaict. In fact, this probability seems lower than the previous one. Consider the table: token A B a Fal…
I could have explained that a bit better I suppose.