Using MCMC based model in closed loop

@lucianopaz

A Sequential Monte Carlo is a particle filter, in fact AFAIK it originated as a method to solve that kind problems. But I am not really familiar with particle filters I have always used SMC in the context of approximating a static distribution.

The SMC sampler use an ensemble of particles, that’s right. But also use annealing, the version implemented in PyMC3 performs annealing by increasing beta (the inverse temperature). You start from the prior distribution (beta=0) and move through a series of intermediate distributions (stages) until you reach the posterior (beta=1). You can also anneal the data (in fact I have being thinking about implementing this, I guess it should be faster). In principle you can initialize a SMC sampler from any distribution you want. It happens the prior is a very convenient one. One of the selling-points of SMC is it ability to sample from multimodal distributions. Starting from the prior make it easier to avoid getting trap in local minima (local modes). Also starting from the prior makes it possible to estimate the marginal likelihood (for example to compute Bayes factors).

Each particle at a particular stage is perturbed using a kernel method, generally the kernel is a MCMC method and generally this is Metropolis, but other kernels are allowed, including HMC or NUTS (we have discussed in the past about having HMC/NUTS as an option). I think the last changes in SMC code, make it easier to add other kernel methods.

1 Like