Add unnormalized PDF and log-likelihood functions#1978
Add unnormalized PDF and log-likelihood functions#1978sethaxen wants to merge 3 commits intoJuliaStats:masterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1978 +/- ##
==========================================
- Coverage 86.28% 86.25% -0.03%
==========================================
Files 146 146
Lines 8787 8790 +3
==========================================
Hits 7582 7582
- Misses 1205 1208 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I've intentionally left it so that I also think |
|
I'd prefer to get a 👍 feedback on the general approach from the maintainers before messing around with all of the testing functions. Maybe @devmotion ? |
|
Sorry, I've been swamped with tasks this week. I like the proposal a lot, I think this will resolve one of my main feature requests (apart from fixing
I'd suggest not adding it for now.
I don't like the current interface for non-univariate distributions, making
Yes, IMO that would be reasonable for distribution functions implemented in StatsFuns. |
As suggested in #153 (comment), this PR adds the following API functions:
logupdf: contains all terms inlogpdfthat depend on the argumentupdf: contains all terms inpdfthat depend on the argumentlogulikelihood: contains all terms inloglikelihoodthat depend on the parametersEach of these has a fallback to the full
logpdf,pdf, orloglikelihood, respectively. After surveying the repo, it seems the existing functions could in most cases be split into 1) calling one of these functions and 2) computing the normalization factor. This is left for future PRs.A few questions
_logupdf,_updf,logupdf!,updf!forArrayvariateanalogous to the existing non-uversions?TO-DO
logupdf(d, x1) - logupdf(d, x2) ≈ logpdf(d, x1) - logpdf(d, x2)) to the test suites for existing distributions