Removed old EpsilonFromK model#197
Merged
Merged
Conversation
Codecov Report
@@ 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); |
Contributor
There was a problem hiding this comment.
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)); |
Contributor
There was a problem hiding this comment.
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)) { |
Contributor
There was a problem hiding this comment.
should not be restricted to power of 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.