CDF and inverse-CDFs for (log-)priors#1033
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1033 +/- ##
=======================================
Coverage 100% 100%
=======================================
Files 64 64
Lines 6577 6756 +179
=======================================
+ Hits 6577 6756 +179
Continue to review full report at Codecov.
|
need to adapt example notebook; also need to see what people think we should name the cdf methods here (since they're not really cdfs!)
|
@martinjrobins Could you have a look at this? My main issue concerns the multivariate normal -- in this case inverse cdfs are not available, so I created a pseudo-inverse-cdf function that can be used to convert samples uniformly distributed within the unit cube to those in the same space as the prior (this is necessary for multinest). Given that the cdf and icdf functions I use for this distribution are not actually what they say, I'm wondering about endowing each prior with functions "convert_to_unit_cube" and "convert_from_unit_cube". For all distributions but the mv-normal, the convert_to_unit_cube function would call the cdf and convert_from_unit_cube would call icdf. Do you think this sounds reasonable? This would avoid the mv-normal having functions that don't correspond to what they're named, at least. |
|
Actually, have gone ahead and think this is ready for review. |
martinjrobins
left a comment
There was a problem hiding this comment.
looks great @ben18785 . I'm happy with the "convert_from..." functions. Just one comment below about whether we can support multiple samples at once, and in either case I think the docstrings should be updated to make it clear what the dimensions of u or x can be.
martinjrobins
left a comment
There was a problem hiding this comment.
great, thanks @ben18785!
|
@martinjrobins -- prod, if happy, can you merge please? |
To do #282, it is necessary to have cumulative distribution functions and their inverses for the priors.