Pyro vs Pymc? What are the difference between these Probabilistic Programming frameworks?

MinKi Jo picture MinKi Jo · Jan 19, 2018 · Viewed 7.8k times · Source

I used 'Anglican' which is based on Clojure, and I think that is not good for me. Bad documents and a too small community to find help. Also, I still can't get familiar with the Scheme-based languages. So I want to change the language to something based on Python.

Maybe Pyro or PyMC could be the case, but I totally have no idea about both of those.

  • What are the difference between the two frameworks?
  • Can they be used for the same problems?
  • Are there examples, where one shines in comparison?

Answer

stuart picture stuart · Feb 5, 2020

Just want to update previous answers for 2020 since they're now two years old, and this page is the first result on Google.

Pyro is built on PyTorch. It has full MCMC, HMC and NUTS support. It has excellent documentation.

PyMC3 is built on Theano which is a completely dead framework. PyMC4 has been discontinued, as per ZAR's comment to this response (Edited for 2021).

The third option is Tensorflow Probability, which has in large part basically subsumed PyMC, complete with the ease-of-use and excellent documentation we've all come to expect from Tensorflow. (Yes that is a joke).

They're all pretty much the same thing, so try them all, try whatever the guy next to you uses, or just flip a coin. The best library is the one you actually use to make working code. As for which one is more popular, probabilistic programming itself is very specialized so you're not going to find a lot of support with anything.