-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New common test framework for distributions #31
Merged
Merged
Conversation
This file contains 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
aherbert
force-pushed
the
dist-test2
branch
11 times, most recently
from
October 1, 2021 10:05
bce5221
to
3a30e4b
Compare
aherbert
force-pushed
the
dist-test2
branch
7 times, most recently
from
October 4, 2021 17:47
460e998
to
686b01f
Compare
Resource files are used to store test cases for parameterizations of a distribution. Updated base test class for Nakagami, binomial and Poisson distributions.
Capture limitation of normal distribution inverse CDF. This test fails and is currently disabled.
Correct bounds to upper inclusive
Added exceptions when parameters are not strictly positive. Do not raise an exception for x=0 or x=1 when alpha or beta<1 and return the limit. Add special cases for x=0 and x=1 when alpha or beta = 1.
Required an updated value for the Euler-Mascheroni constant to compute the mean.
Add a framework for creating assertions using absolute, relative, or ULP distances. Add a custom assertEquals method with formatted error message containing the tolerance.
This replaces JUnit absolute tolerance assertions with a more configurable tolerance. Added missing cases for CDF(lower) and CDF(upper) in the consistency test. Fix geometric distribution CDF to handle edge case of integer max value.
This renames the previous tolerance to absolute tolerance. The relative tolerance is combined with the absolute tolerance using an Or operation. With no changes to the absolute tolerane all tests still pass.
This clarifies the usage and difference with equals(). Add combinations and symmetry test for the DoubleTolerance instances.
Disable absolute tolerance in the base distribution test.
The absolute values were often limited by the inverse CDF mapping test returning x-points that have a magnitude far above the probability range of [0, 1]. In these cases the inverse mapping is limited by the relative accuracy of the default implementation (1e-9). Relative accuracy in most cases which use the default inverse CDF function can be set at 1e-9. Many tests pass the relative accuracy default of 1e-12. Some tests required explicit survival function values since 1-CDF is inaccurate as CDF -> 1. Use 1 ULP tolerance for some high precision additional tests.
Recomputed all reference values.
The default for the high precision relative tolerance is fine for these tests.
Add extreme test for geometric distribution Use double addition to avoid overflow
Add test with a large range. Add a survival function.
This requires a flag to disable the PMF sum test. The CDF and PMF do not match for the range at integer max value.
Added tests that fail using 1 - cdf(x).
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.
Another update to the base distribution test. This one uses properties files to contain distribution test data.