addthis / stream-lib

Stream summarizer and cardinality estimator.
Apache License 2.0
2.26k stars 558 forks source link

Corrected accuracy equation, added withAccuracy builder method #157

Closed kujon closed 5 years ago

kujon commented 5 years ago

Hi there 👋

First of all, what an amazing collection of utilities, super useful.

I noticed a few things I thought I improve:

  1. What is referred to in the accuracy equation as accuracy is really the error (1 - accuracy).
  2. The existing constructors require developers to have an understanding of log2m and relative standard deviation to be able to choose the value that is right for them.

This pull request aims to improve that by:

  1. Correcting the comment
  2. Introducing withAccuracy method to the builder
kujon commented 5 years ago

You're welcome @abramsm! Any chance of getting it merged reasonably soon?

tedpearson commented 5 years ago

Sorry for the delay. We'll try to release this in version 2.9.7 shortly.

tedpearson commented 5 years ago

@kujon 2.9.8 is now available on maven central. (2.9.7 had an incorrect sources jar so we made another release.)

kujon commented 5 years ago

Amazing @tedpearson , thank you!