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

The low number of effective samples is usually an indication of strong autocorrelation in the chain. You can plot the trace autocorrelation or look at the trace plot directly.

Usually, this could be improved by using more efficient sampler like NUTS. However, in this case since you are mixing discrete random variable with continuous variables, sampling is likely going to be a bit difficult.

You can find more information about effective sample size from Gelman et al’s book Bayesian Data Analysis. The stan language manual has some detail information on how they are computed.

I think the warning threshold in PyMC3 is currently a bit too sensitive (for example, in Stan they only output warning when < .01%). But big thumbs up to you for actually read the warning and try to improve your model!!

4 Likes