-
-
Notifications
You must be signed in to change notification settings - Fork 272
Update notebook Dirichlet mixture of multinomials to PyMC 5 #581
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
Update notebook Dirichlet mixture of multinomials to PyMC 5 #581
Conversation
Also remove unused import
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
View / edit / reply to this conversation on ReviewNB ricardoV94 commented on 2023-10-05T10:56:08Z We should pass rng to erik-werner commented on 2023-10-05T11:15:08Z Yep, I had actually just fixed this when I saw your comment :)
I'm working on some more updates, so it might be good to hold off on reviewing the rest of the notebook for now. |
Yep, I had actually just fixed this when I saw your comment :)
I'm working on some more updates, so it might be good to hold off on reviewing the rest of the notebook for now. View entire conversation on ReviewNB |
Since the simulated data has changed, the numerical issues we faced are slightly different. The notebook has been modified to reflect this. - No need to do metropolis sampling for the multinomial model - Worse numerical issues for the explicit DM model. Addressed by increasing target_accept and modify the discussion about poor rhat values - Minor changes to match new data - Also refer to species by name instead of index.
This gets rid of most divergences, and gives much better r_hat statistics
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.
pre-commit is failing.
But the errors are unrelated to my changes:
Shall I fix them as part of this pull request anyway? It's easily done. Or do you want me to open a new pull request where I fix these errors? |
@erik-werner Ah, in that case you can:
Which do you prefer? |
@twiecki I'll fix it here then! |
Thanks @erik-werner, this is a great contribution! |
Issue #100
📚 Documentation preview 📚: https://pymc-examples--581.org.readthedocs.build/en/581/