Skip to content

Removed old EpsilonFromK model#197

Merged
AlexanderSaydakov merged 3 commits into
masterfrom
RemoveOldEpsFromK
Apr 19, 2018
Merged

Removed old EpsilonFromK model#197
AlexanderSaydakov merged 3 commits into
masterfrom
RemoveOldEpsFromK

Conversation

@leerho
Copy link
Copy Markdown
Member

@leerho leerho commented Apr 18, 2018

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2018

Codecov Report

Merging #197 into master will increase coverage by 0.06%.
The diff coverage is 87.72%.

@@             Coverage Diff              @@
##             master     #197      +/-   ##
============================================
+ Coverage     93.28%   93.33%   +0.06%     
+ Complexity     4607     4605       -2     
============================================
  Files           197      197              
  Lines         13051    13020      -31     
  Branches       2142     2124      -18     
============================================
- Hits          12173    12151      -22     
- Misses          190      192       +2     
+ Partials        688      677      -11

* @return the value of <i>k</i> given a value of epsilon.
*/
public static int getKFromEpsilon(final double epsilon, final boolean pmf) {
final double eps = max(epsilon, 4.7E-5);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's explain this constant

: exp(log(1.576 / eps) / 0.9726);
final double krnd = round(kdbl);
final double del = abs(krnd - kdbl);
final int k = (int) ((del < 1E-6) ? krnd : ceil(kdbl));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's explain the purpose of this

Add MAX_K to quantiles and checkK() to KLL.
* @param k must be greater than 1 and less than 65536.
*/
static void checkK(final int k) {
if ((k < MIN_K) || (k > MAX_K) || !isPowerOf2(k)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not be restricted to power of 2

@AlexanderSaydakov AlexanderSaydakov merged commit df2237b into master Apr 19, 2018
@AlexanderSaydakov AlexanderSaydakov deleted the RemoveOldEpsFromK branch April 19, 2018 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants