-
Notifications
You must be signed in to change notification settings - Fork 86
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
test: add check for derivative of CDF to ensure it matches PDF #320
Conversation
Hmm, I see that this appears for
I believe the Uniform one makes sense for the error when there's an evaluation over the stepped edges. The other two CDF rely on some special functions which could have insufficient precision for finite differences over some steps. That is, For δ, the precision error in CDF evaluation and ε, the roundoff error from subtraction and representation, and step size h, we have some error from finite difference techniques Could you rule out that possibility? Note that our tests for special functions are typically checking at least 12 digits1. Let me know if you need any other guidance or advice. EDIT 1: fix typo for footnote Footnotes
|
It is resolved by comparing, instead of, seems like we lost precision due to floating point division. |
I have set at least one of the checks should pass, i.e. integration of pdf should be equal to cdf or derivative of cdf should be equal to pdf! |
I think the multiplication is a good solution! I made some comments, one for an error chaining idiom, and the other on docs. I'm against using |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #320 +/- ##
==========================================
+ Coverage 93.81% 94.27% +0.45%
==========================================
Files 53 58 +5
Lines 11996 12974 +978
==========================================
+ Hits 11254 12231 +977
- Misses 742 743 +1 ☔ View full report in Codecov by Sentry. |
I have used finite difference approximation of derivatives. It seems like there are some numerical inaccuracies!