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

Space Saving, HyperLogLog and Hierarchical Heavy Hitters algorithms #1559

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Remove white line
laraabastoss committed Jun 21, 2024
commit 898f83a22178d0a001ffa95af8b2c261a720e698
1 change: 0 additions & 1 deletion river/sketch/hyper_log_log.py
Original file line number Diff line number Diff line change
@@ -121,7 +121,6 @@ def count(self) -> int:
Estimate the number of distinct elements.
This method uses the harmonic mean of the registers to provide an estimate.
"""

est = self.alpha * self.m ** 2 / sum(2 ** (-reg) for reg in self.registers)

if est <= 5 / 2 * self.m: