-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Test multinomial distribution with probability vector containing zeros #4487
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
Comments
Hi! I think I understand what needs to be done. If it's okay with you and no one else is working on it, I would like to work on it :) |
@Devanshu24 Sure, go ahead. The test should go into test_distributions.py. Look for the other Multinomial distribution tests, as maybe it's enough to tweak one of the existing tests. Feel free to ask any questions if you need. |
Just to give an update. |
No problem! |
Closed via #4758 |
A previous bug in the logp of the Multinomial made it return nan when the probability vector contained zeros. This was behind this issue #3069, and was fixed by #3059
The minimal example of issues #3069 is shown below. It had to do with with the last row of the
state_label_tran
which includes a zero-probability for the first class.But it's enough to check the Multinomial directly:
None of our current Multinomial tests check for a probability vector that includes zeros (except for
test_batch_dirichlet_multinomial
which sometimes does so randomly). We should add one.Originally posted by @ricardoV94 in #3069 (comment)
The text was updated successfully, but these errors were encountered: