The number of effective samples is smaller than 25% for some parameters

Thanks junpenglao. Your comments were really helpful. Now I have 2 more books to read :slight_smile:
I modeled it again without assigning ‘step’, so PyMC3 can automatically assign an appropriate sampler:

with model:
    trace = pm.sample(10000, tune=5000) 

As a result, pymc3 used two samplers:

NUTS: [lambda_2_log__, lambda_1_log__]
Metropolis: [tau]

I still got the same warning of effective sample < 25%. I’m assuming this is due to the Metropolis sampler as opposed to the NUTS. So i continued reading…
This post (correlation - What is causing autocorrelation in MCMC sampler? - Cross Validated) mentions: “when using MH algorithms, to some extent you can reduce or increase your autocorrelations by adjusting the step size of proposal distribution”.

I looked at the pymc3 documentation but couldn’t find ways to reduce step size for Metropolis (https://docs.pymc.io/api/inference.html#module-pymc3.step_methods.metropolis). How can I do that? Do you think that would help?

2 Likes