gakhov / pdsa

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

Example for Count Sketch #23

Closed victox5 closed 5 years ago

victox5 commented 5 years ago

Nice package! I thought it could be interesting to give some real case example to be aware of the implications of the different variables.

gakhov commented 5 years ago

Thank you! Please, sync the styling with the existing examples and consider fixing grammatical errors and misspellings.

victox5 commented 5 years ago

I will check the other examples, thanks.

gakhov commented 5 years ago

Take this file as an example https://github.com/gakhov/pdsa/blob/add-examples/examples/frequency/count_min_sketch.py

gakhov commented 5 years ago

Closes #24

gakhov commented 5 years ago

I see your wish to express 2 cases in the example, for digits and text values. But having two if __name__ == '__main__': sections actually very confusing.

Maybe let's keep the digits only? The case with string is already explained in the documentation in any case.

victox5 commented 5 years ago

Cool, we can keep only the numeric example. :)

gakhov commented 5 years ago

Thank you and congrats with your first merged PR to PDSA!