-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Automatically derive icdf for negative power transforms #7956
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Ricardo Vieira <28983449+ricardov94@users.noreply.github.com>
Co-authored-by: lucaseckes
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7956 +/- ##
==========================================
- Coverage 91.47% 86.85% -4.63%
==========================================
Files 116 116
Lines 18947 18931 -16
==========================================
- Hits 17332 16442 -890
- Misses 1615 2489 +874
🚀 New features to boost your workflow:
|
|
Tests are failing because you can't pass rng to the new signatures |
larryshamalama
left a comment
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.
Hi @ricardoV94 , great work as always :) I haven't followed much of recent codebase progress, as per @jessegrabowski 's comment other changes seem necessary w.r.t. test failures. I just added minor questions that came to mind as per usual as I read this PR
| msg="alpha > 0, beta > 0", | ||
| ) | ||
|
|
||
| def icdf(value, alpha, beta): |
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.
I don't visualize the math on top of my head. I presume this is what test_inverse_gamma_icdf below checks?
| lambda value, alpha, beta: st.invgamma.logcdf(value, alpha, scale=beta), | ||
| ) | ||
|
|
||
| def test_inverse_gamma_icdf(self): |
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.
Some distributions have all functionality tests (logp, logcdf, icdf) under a single method (test_half_cauchy), whereas other distributions have one method per functionality. Is there any particular reason for this?
(* non even powers)
This way we get icdf easily for InverseGamma and LogitNormal. I removed the latter in favor of a CustomDist. I didn't do it for InverseGamma because that's a pretty popular distribution and don't want to risk messing with precision
closes #7619
closes #7917
closes #7916