-
Notifications
You must be signed in to change notification settings - Fork 225
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
Return NaN for negative ModeResult variance estimates #2471
Conversation
This is related to #2048 I don't fully agree with the conclusion that there is nothing to fix in Turing.jl here. Propagating a NaN makes it easier to inspect the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2471 +/- ##
==========================================
+ Coverage 84.45% 84.59% +0.13%
==========================================
Files 21 21
Lines 1570 1597 +27
==========================================
+ Hits 1326 1351 +25
- Misses 244 246 +2 ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 13376341310Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @frankier. It looks like a nice improvement!
Thanks @frankier, I agree that the current situation where |
Yes, I think on balance that would be better. I think there is also the possibility of getting a SingularException in I'll update this PR to work this way soon. |
3ad099c
to
937c1b6
Compare
937c1b6
to
8ad39c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really nice @frankier! I had a few small proposals. Let me know once you're done making edits and I'm happy to merge. Also, I realise you're helping out on a volunteer basis, so if you don't have time to attend to my comments that's fine too, we can merge as is and I can add a couple of tests myself and call it done.
Co-authored-by: Markus Hauru <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presuming tests pass, happy to merge when you are @frankier.
Learnt something new from the test. LGTM! |
The failing tests are the known x86 OOM issues we are working on, nothing to do with this PR. Merging. Thanks so much @frankier! Always a pleasure to receive a community PR, and especially so when it's so well written. |
Here's a modified example that gets negative estimates for variance of some parameters (
coefficients_versicolor[3]
):Without this PR, this will throw a
DomainError
incoeftable
when calling getting the stderr ofcoefficients_versicolor[3]
.