-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
NegativeBinomial distribution sample generator wrapper #3866
NegativeBinomial distribution sample generator wrapper #3866
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3866 +/- ##
==========================================
- Coverage 90.73% 90.68% -0.06%
==========================================
Files 135 135
Lines 21190 21190
==========================================
- Hits 19227 19216 -11
- Misses 1963 1974 +11
|
Thanks! Why wasn't this caught by a test? Can we add one that would have caught it? |
Posterior predictive tests are not at all comprehensive. Adding a test would be nice if @fearghuskeeble has time. |
Please test on both |
* Dropped nuts init method * Dropped nuts init method from tests * Refined doc string and added release note
I'm not clear as to the relevance of posterior predictive sampling here. In terms of the prior sampling, the testing is unfortunately a little opaque to me but I will have a look... |
@twiecki, it wasn't caught because there are no tests that try to sample from the prior when one of the distribution parameters is a scalar and the other is a vector. @fearghuskeeble, take a look at test_distributions_random.py. The tests there are structured in a relatively obscure way, so I recommend you just look at how we added a single extra test for the categorical distribution and follow that pattern to add test in the negative binomial's test class. |
…keeble/pymc3 into negativebinomial-random-wrapper Merging upstream changes to branch.
@lucianopaz I looked back at #3509 and added a test to your nested sampling class. |
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.
Great work! I can't merge this from my phone but I'll do it once I get a chance to log into my computer
Thanks @fearghuskeeble! |
Per #3864 I added a wrapper for the generating samples in NegativeBinomial. This is already used in ZeroInflatedNegativeBinomial and other distributions which require operations on the scipy arguments.
Also fixed an error typo in sampling.