-
Notifications
You must be signed in to change notification settings - Fork 16
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
Dead points and Truncation #354
Conversation
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 a useful addition (I and @zixiao-h have certainly used this functionality)
Copying inline comments here:
@yallup: Currently tests are failing due to the second check here, is this defined correctly (should the logL_birth check be inclusive)?
@williamjameshandley: I think that the convention is consistent i.e. this version of the strictness ensures that the 'live points at iteration i' corresponds to 'live points at loglikelihood logL' in a sensible way.
I think the real issue is that samples.live_points() (i.e. the None functionality) is not returning the right thing. This should return 'the last set of live points', and at the moment returns the penultimate set.
I've pushed a new function 'contour' that aims to achieve this. Could you tidy up the docstrings with a new users eye?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #354 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 34 34
Lines 2973 2984 +11
=========================================
+ Hits 2973 2984 +11 ☔ View full report in Codecov by Sentry. |
Ah that makes sense and is consistent with what I was seeing, I added a small change to cater for if a float (implicitly a logL val) is passed but it happens to form a valid index (i.e 10.0). Docstrings seem sensible to me now, added a bit there an an explict contour test |
anesthetic/samples.py
Outdated
except KeyError: | ||
pass | ||
return logL | ||
|
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 not covered by the tests -- I agree that your additional float check is safer than what was there before. Can we think of anything which the try except covers (given that it is now never hit by the tests?) if not, remove the extra code, and just move to straight return statements from the if elif else block.
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.
Please squash and merge!
Description
Feature request for an additional convenience alias for
dead_points
matching thelive_points
style, and atruncate
method that gives the consistent union of the two allowing recalculation of mid run statisticsChecklist:
flake8 anesthetic tests
)pydocstyle --convention=numpy anesthetic
)python -m pytest
)