-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
n and p parametrization on Zero Inflated Negative Binomial #5212
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
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.
Just did a quick skim. Looks great so far
@@ -1502,6 +1502,40 @@ def seeded_zero_inflated_negbinomial_rng_fn(self): | |||
] | |||
|
|||
|
|||
class TestZeroInflatedNegativeBinomial(BaseTestDistribution): |
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 test can be much smaller. Check other tests for alternative parametrizations in this module. Like NormalTau
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.
After a quick glance on NormalTau
, we only need to test on check_pymc_params_match_rv_op
?
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.
Yes
Codecov Report
@@ Coverage Diff @@
## main #5212 +/- ##
==========================================
+ Coverage 77.98% 78.94% +0.96%
==========================================
Files 88 88
Lines 14215 14248 +33
==========================================
+ Hits 11085 11248 +163
+ Misses 3130 3000 -130
|
Some of the tests seen to be failing. |
This line is failing:
Did I misspecify the |
From the trace it seems the distribution is not respecting the invalid negative |
Which is strange because it passes with the mu/alpha parametrization |
Seems like we have a small bug in the logcdf. We have to add a pymc/pymc/distributions/discrete.py Line 1710 in dc92865
The case |
I am wondering, so in order to test the |
We are not computing |
Thanks @farhanreynaldo! |
Ah right. |
This PR added alternative parametrization (
n
andp
) on Zero Inflated Negative Binomial based on this issue #5196.