aloctavodia / BAP

Bayesian Analysis with Python (Second Edition)
https://www.amazon.com/dp/B07HHBCR9G
MIT License
646 stars 250 forks source link

NB extending multinomial regression with prior/post predictive checks #49

Closed AlexAndorra closed 4 years ago

AlexAndorra commented 4 years ago

As discussed, here is a NB extending the multinomial regression example of chapter 4. The goal is to show how to do prior and posterior predictive checks with these not-so-simple types of models. I tried to explicit the whole modeling workflow, hoping that would be helpful to people 😉

Of course, don't hesitate to correct any mistake or add any useful aspect - most notably with ArviZ, as you've got a better view than me on the API.

Live long & PyMCheers 🖖

PS: I generated the last cell with the watermark package, so it won't run with the current environment on the repo. As it's not critical, I didn't add it to the yml file, but I can do it if you want

aloctavodia commented 4 years ago

This is great! Thanks a lot! A few minor comments

AlexAndorra commented 4 years ago

Glad you like it ;) My answers:

aloctavodia commented 4 years ago

You can try with the kind argument. Valid values are "density" (default), "cumulative", or "scatter"

AlexAndorra commented 4 years ago

Ah yeah, I tried that but found the plot with KDE was clearer. All updates are now done and pushed ;)

aloctavodia commented 4 years ago

Thanks @AlexAndorra!