-
-
Notifications
You must be signed in to change notification settings - Fork 460
Testing of distributions #357
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Also see #290. |
@vks has some plans for histogram-based testing, though possibly only after PDFs are added. Separately, we should add some tests of value-stability. |
See |
@vks could I interest you (or potentially someone else) in adding at utility to |
I was thinking about using sparklines for that. I'm interested, but I can't make promises that I'll get to it before the end of the year. |
Resolving this issue was started in #1121, more work is needed to extend it to the other distributions. |
I think we should either make this issue more actionable or close it. For which distributions do we want histogram tests? Sometimes, calculating the PDF is non-trivial and requires special functions. |
I suggest the following approach:
This should allow fast and robust testing (within the limits of reproducibility), with the caveat that any value-breaking change must again be visually confirmed. It should be applicable to all distributions, though may be hard to visualise for multi-dimensional outputs. It cannot confirm perfect accuracy, especially in degenerate cases. |
I am a university student with a background in statistics and would love to contribute to this repository. I have a few questions regarding this issue. I noticed that histograms are used in the tests for visual inspection by comparing the expected curve with the sample curve. Would it be possible to use a chi-square test for validation? The process should be similar, but hypothesis testing might provide more convincing results. I wrote a simple test for this: https://github.com/JamboChen/distr_test. The code is rough, and I'm unsure if this is the right approach to use here, I'd appreciate any feedback. |
@JamboChen feel free to take a look at #1494 by @benjamin-lieser implementing a Kolmogorov-Smirnov test. |
Implemented in #1504 thanks to @JamboChen and @benjamin-lieser. Failure cases:
|
We have a PR for the hypergeo issue and #1515 for the Poisson issue, so this can be closed. |
We should add some testing for distributions. Unfortunately since distribution samples are random, this is inherently difficult. Original issue dhardy#72.
See for some direction rust-lang/rust#10084, and the
random-tests
.The text was updated successfully, but these errors were encountered: