-
Notifications
You must be signed in to change notification settings - Fork 220
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
base: master
Are you sure you want to change the base?
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2471 +/- ##
=======================================
Coverage 85.01% 85.02%
=======================================
Files 21 21
Lines 1582 1583 +1
=======================================
+ Hits 1345 1346 +1
Misses 237 237 ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 12867285375Details
💛 - 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. |
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]
.