-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add icdf for LogitNormal
#7916
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?
Add icdf for LogitNormal
#7916
Conversation
|
|
b5dabcb to
f9cb757
Compare
|
@jnetzel1 I pushed some changes to automatically derive icdf (and logp/logcdf) for this simple distribution. There's no longer a native LogitNormal but a CustomDist |
f9cb757 to
f1dbc3e
Compare
|
|
||
| @_mean.register(LogitNormalRV) | ||
| def logitnormal_mean(op, rv, rng, size, mu, sigma): | ||
| raise UndefinedMomentException("The mean of the LogitNormal distribution is undefined") |
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.
Small note: It isn't really undefined, just doesn't have a closed form solution
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7916 +/- ##
==========================================
- Coverage 91.47% 86.85% -4.63%
==========================================
Files 116 116
Lines 18947 18929 -18
==========================================
- Hits 17332 16441 -891
- Misses 1615 2488 +873
🚀 New features to boost your workflow:
|
Co-authored-by: Ricardo Vieira <[email protected]>
f1dbc3e to
68d255e
Compare
|
I moved this approach to #7956 |

What is this PR about?
Adds ICDF functions to Logit Normal Distribution
Issue #6612
References:
Logit Normal:
https://en.wikipedia.org/wiki/Logit-normal_distribution
SciPy Implementations:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.expit.html
https://github.com/scipy/scipy/blob/d604a5462dadf799f8af2c177179a01875b40796/scipy/stats/_continuous_distns.py#L380
Checklist
Type of change
📚 Documentation preview 📚: https://pymc--7916.org.readthedocs.build/en/7916/