Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure of HLL downsize law #572

Open
oscar-stripe opened this issue Nov 5, 2016 · 1 comment
Open

Failure of HLL downsize law #572

oscar-stripe opened this issue Nov 5, 2016 · 1 comment
Labels

Comments

@oscar-stripe
Copy link

[info] ! HyperLogLog.Downsize dense HLLs from 14 bits to 4 bits: Falsified after 0 passed tests.
[info] > Successes: 80 (out of 100)
[info] > Expected successes: 99.72
[info] > Required successes: 84.55
[info] > Example failures:
[info]   >: Exact result: 4976. Approx result: Approximate(592,2693,4795,0.9972).
[info]   >Exact result: 4976. Approx result: Approximate(592,2693,4795,0.9972).
[info]   >Exact result: 4976. Approx result: Approximate(592,2693,4795,0.9972).
[info]   >Exact result: 4976. Approx result: Approximate(592,2693,4795,0.9972).
[info]   >Exact result: 4976. Approx result: Approximate(592,2693,4795,0.9972).

One thing that is interesting is that all of these are the same. I wonder if that is something about downsizing to 4 bits?

Anyway, something is amiss...

@oscar-stripe oscar-stripe changed the title Failure of downsize law Failure of HLL downsize law Nov 5, 2016
@sritchie sritchie added the bug label Nov 5, 2016
@johnynek
Copy link
Collaborator

I guess this is actually buggy:

failing seed for HyperLogLog.Downsize dense HLLs from 14 bits to 4 bits is JWFZvPc_XzUZXFpMqCp2JSEkQaYNSPCIIszXMxU4NIC=
[info] ! HyperLogLog.Downsize dense HLLs from 14 bits to 4 bits: Falsified after 0 passed tests.
[info] > Successes: 80 (out of 100)
[info] > Expected successes: 99.72
[info] > Required successes: 84.55
[info] > Example failures:
[info]   >: Exact result: 5014. Approx result: Approximate(496,2258,4020,0.9972).
[info]   >Exact result: 5014. Approx result: Approximate(496,2258,4020,0.9972).
[info]   >Exact result: 5014. Approx result: Approximate(496,2258,4020,0.9972).
[info]   >Exact result: 5014. Approx result: Approximate(496,2258,4020,0.9972).
[info]   >Exact result: 5014. Approx result: Approximate(496,2258,4020,0.9972).

Exact result 5014, but the 99.72% confidence interval is 496 to 4020? Yeah, that doesn't make sense.

I imagine there is a bug with either the way downsizing works, the estimate, or the confidence interval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants