How a HyperLogLog works
opensourceconnections.com
How a HyperLogLog works
1–10 of 19 posts
Re: How a HyperLogLog works
#2Re: How a HyperLogLog works
#3Seriously? Someone renamed the title? Nobody likes Ren & Stimpy these days?
Re: How a HyperLogLog works
#4Re: How a HyperLogLog works
#5"The basic idea of HyperLogLog (and its predecessors PCSA, LogLog, and others) is to apply a good hash function to each value observed in the stream and record the longest run of zeros seen as a prefix of any hashed value. If the hash function is good, the bits in any hashed value should be close to statistically independent, so seeing a value that starts with exactly X zeros should happen with probability close to 2 -(X + 1). So, if you've seen a run of 5 zeros in one of your hash values, you're likely to have around 2 6 = 64 values in the underlying set. The actual implementation and analysis are much more advanced than this, but that's the idea."
Re: How a HyperLogLog works
#6I don't think this does a very good job of explaining the HyperLogLog, honestly. A slightly less contrived example would've been useful.
Re: How a HyperLogLog works
#7A simpler and more concise explanation in https://github.com/aaw/hyperloglog-redis . "The basic idea of HyperLogLog (and its predecessors PCSA, LogLog, and others) is to apply a good hash function to each value observed in the stream and record the longest run of zeros seen as a prefix of any hashed value. If the hash function is good, the bits in any hashed value should be close to statistically independent, so seei…
Of course that's just an artifact of what's really happening, which is pseudo-random values + laws of probability.
Re: How a HyperLogLog works
#8I don't think this does a very good job of explaining the HyperLogLog, honestly. A slightly less contrived example would've been useful.
:)
Re: How a HyperLogLog works
#9Seriously? Someone renamed the title? Nobody likes Ren & Stimpy these days?
Re: How a HyperLogLog works
#10I don't think this does a very good job of explaining the HyperLogLog, honestly. A slightly less contrived example would've been useful.
I agree. Additionally, the words "distinct" or "cardinality" don't appear anywhere in this article, which is a major omission when discussing HyperLogLog. The primary use of the algorithm is to provide a cardinality estimate.