Tag Archives: pymc

MCMC in Python: sampling in parallel with PyMC

Question and answer on Stack Overflow.

Comments Off

Filed under software engineering

MCMC in Python: Estimating failure rates from observed data

A question and answer on CrossValidated, which make me reflect on the danger of knowing enough statistics to be dangerous.

Comments Off

Filed under statistics

MCMC in Python: How to make a custom sampler in PyMC

The PyMC documentation is a little slim on the topic of defining a custom sampler, and I had to figure it out for some DisMod work over the years. Here is a minimal example of how I did it, in answer to a CrossValidated question.

Comments Off

Filed under MCMC

MCMC in Python: How to set a custom prior with joint distribution on two parameters in PyMC

Question and answer on Stackoverflow. Motivated by question and answer on CrossValidated about modeling incidence rates.

Comments Off

Filed under Uncategorized

MCMC in Python: random effects logistic regression in PyMC3

It has been a while since I visited my pymc-examples repository, but I got a request there a few weeks ago about the feasibility of upgrading the Seeds Example of a random effects logistic regression model for PyMC3. It turns out that this was not very time consuming, which must mean I’m starting to understand the changes between PyMC2 and PyMC3.

See them side-by-side here (PyMC2) and here (PyMC3).

pymc3

Comments Off

Filed under statistics

Sequential Monte Carlo in PyMC?

I’ve been reading about Sequential Monte Carlo recently, and I think it will fit well into the PyMC3 framework. I will give it a try when I have a free minute, but maybe someone else will be inspired to try it first. This paper includes some pseudocode.

smc

Comments Off

Filed under MCMC

PyMC3 coming along

I have been watching the development of PyMC3 from a distance for some time now, and finally have had a chance to play around with it myself. It is coming along quite nicely! Here is a notebook Kyle posted to the mailing list recently which has a clean demonstration of using Normal and Laplace likelihoods in linear regression: http://nbviewer.ipython.org/c212194ecbd2ee050192/variable_selection.ipynb

Comments Off

Filed under statistics