Quadratic Approximatation of posterior distribution

Hi

I am new to both probabilistic programming and PYMC :slight_smile:

I am reading Statistical Rethinking and trying to re-create the R code from the book in R. I looked around for a Python version of the quad method for quadratic approximation without finding anything. I found a couple of older blogs talking about this w.r.t PYMC3.

I have created a Python package quad5 quad5 · PyPI that implements a custom step using Quadratic Approximation such that it can be used in the PYMC sample method.

PYMC is an impressive library but also a bit difficult to use for newbies :slight_smile: so feedback on my attempt with quad5 is more than welcome.

Thanks,
Carsten

3 Likes

This is super great! I was thinking this feature would be a welcome addition for a while. I will play with it and let you know how it goes. You could also consider a PR into pymc-experimental?

Thanks Jesse,
I did not know pymc-experimental but I will take a look

There’s already an open issue for adding a Laplace approximation IIRC

I just saw that, My work is partly based on Adds quadratic approximation by rasmusbergpalm · Pull Request #4847 · pymc-devs/pymc · GitHub and updated to PYMC5.

2 Likes