Hacker News new | past | comments | ask | show | jobs | submit login
How to be a Bayesian in Python (jakevdp.github.io)
142 points by mathattack on June 19, 2014 | hide | past | favorite | 4 comments



Stan is definitely the project you'll want to follow if you're going to be doing this sort of thing a lot. It's built by Andrew Gelman out of Columbia who is an expert in hierarchical Bayesian methods and has done lots of big models for social sciences (and I believe was responsible for the original NYT 538 model).

Stan uses the really clever No-U-Turn sampler algorithm which will help a lot in highly correlated models (where sampling tends to take much, much longer to converge).

Edit: Also, if anyone is interested in learning more about MCMC samplers then reading up on NUTS is a good idea. The basic material there does a great job both getting ideas about Hamiltonian MCMC out in the air and also talking about how to do some tricky optimizations to the algorithm while retaining its probabilistic properties.


For lower-level use of Bayes I have a library that can be helpful: https://github.com/boppreh/bayesian , or "pip install bayesian". It has simple belief updates and even some classification methods.


Is that prior ever used in practice? How does it generalize to several predictors and interaction terms?


another great post from jakevdp. thanks jake!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: