-
Notifications
You must be signed in to change notification settings - Fork 172
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
Add Error Handling for cit.py line 165/166 #107
Comments
Thanks for reporting. Math errors are a little bit tricky, and sometimes we just don't know why, especially with finite samples :) @chenweiDelight @MarkDana Any thoughts on potential causes? Or shall we first add handling there? |
See issue py-why#107 for details. The numerical issue of |sample partial correlation|>=1 happens when the samplesize is very small, or the relationship is deterministic. Abs set to 1. - machine epsilon. No tests required.
See issue py-why#107 for details. The numerical issue of |sample partial correlation|>=1 happens when the samplesize is very small, or the relationship is deterministic. Abs set to 1. - machine epsilon. No tests required.
See issue py-why#107 for details. The numerical issue of |sample partial correlation|>=1 happens when the samplesize is very small, or the relationship is deterministic. Abs set to 1. - machine epsilon. No tests required. Signed-off-by: Haoyue Dai <hyda@cmu.edu>
See issue py-why#107 for details. The numerical issue of |sample partial correlation|>=1 happens when the samplesize is very small, or the relationship is deterministic. Abs set to 1. - machine epsilon. No tests required. Signed-off-by: Haoyue Dai <hyda@cmu.edu>
Hi @maddiehill Thanks so much for identifying this! I just made a pr #108 to solve this. The numerical issue of |sample partial correlation|>=1 happens when the samplesize is very small, or the relationship is deterministic. So we set the abs to 1. - machine epsilon to prevent log(<=0) errors. Thanks again! |
Hi, I experienced a
ValueError: math domain error
on this line fromlog
as the value of(1 + r) / (1 - r)
was negative.Please see the screenshot below and the value of r from the debugger.
I'm not sure why this might be happening, but it would be good to catch potential errors here :)
The text was updated successfully, but these errors were encountered: