You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you do not add 1 to the number of trailing zeros. Reading the original HLL paper, as well as the subsequent "Understanding the HyperLogLog", it seems they always add 1 (to quote from the original paper: "equivalently one plus the length of the initial run of 0’s").
This makes a big difference, since the buckets are initialized with zeros, so not adding 1 means that in many cases we won't even update the buckets.
I have to ask, because yes, of course I added inc to that line, and quickly discovered that when I do, the tests do not pass and the results are incorrect. So the code works correctly, but why?
The text was updated successfully, but these errors were encountered:
Ok, I realize this might be wasting your time, but I can't let go and I have to ask:
In
hll/insert*
, line 24sketchy/src/clj/bigml/sketchy/hyper_loglog.clj
Line 24 in fa64f2b
This makes a big difference, since the buckets are initialized with zeros, so not adding 1 means that in many cases we won't even update the buckets.
I have to ask, because yes, of course I added
inc
to that line, and quickly discovered that when I do, the tests do not pass and the results are incorrect. So the code works correctly, but why?The text was updated successfully, but these errors were encountered: