minaskar / zeus

⚡️ zeus: Lightning Fast MCMC ⚡️
https://zeus-mcmc.readthedocs.io/
GNU General Public License v3.0
225 stars 34 forks source link

zeus and emcee #13

Closed minaskar closed 3 years ago

minaskar commented 3 years ago

@minaskar Dear Minas, I just test zeus with my MCMC problem. It runs very well. But I have a question: it seems that zeus is very similar with another MCMC programmer 'emcee', including its function format, some basic usage... So what's the zeus's advantage over emcee?

Originally posted by @yuanzunli in https://github.com/minaskar/zeus/issues/7#issuecomment-807875702

minaskar commented 3 years ago

Hi @yuanzunli,

indeed both methods utilise an ensemble of parallel walkers to sample from the target distribution. The main difference between emcee and zeus lies in the way that walkers update their position in each iteration. emcee uses Metropolis-Hastings-type updates whereas zeus uses Slice Sampling updates. Slice Sampling is generally more robust, scales better with the number of parameters and can handle non-linear correlations and multimodal distributions.

If the problem that you're trying to solve has only a few parameters (n<10) and/or the distribution is approximate gaussian/normal then you probably won't notice a difference between the two samplers. If you want to know more about how zeus works there is some extra information here.

In terms of their similar Python APIs, that was intentional so people can easily switch from one sampler to the other.