If we add a further 1000 random strings (giving a total of 1002 strings) we'll have a count roughly within 1% of the true value, in this case it counts 1007 (within +/- 10. 100 natural and nontoxic age-defying skincare without a drop of synthetic chemicals. Print len(hll) # 1 as items aren't added more than once Hll = hyperloglog.HyperLogLog(0.01) # accept 1% counting error Use pip install hyperloglog to install from PyPI. Python implementation of the Hyper LogLog and Sliding Hyper LogLog cardinality counter algorithms.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |