gakhov / pdsa

Probabilistic Data Structures and Algorithms in Python
http://pdsa.readthedocs.io
MIT License
121 stars 19 forks source link

Implement probabilistic counter with stochastic averaging #8

Closed gakhov closed 7 years ago

gakhov commented 7 years ago

Probabilistic Counting algorithm with stochastic averaging (Flajolet-Martin algorithm) was proposed by Philippe Flajolet and G. Nigel Martin in 1985.

The Algorithm has been developed for large cardinalities when ratio card()/num_of_counters > 10-20, therefore a special correction required if low cardinality cases has to be supported. In this implementation we use correction proposed by Scheuermann and Mauve (2007).