2N+2 parameter inference: sampling all parameters as one?

If chains is not supplied then it is either 2 or equal to number of cores which ever is higher. When you set cores=1 and chain=None then that is just 2 chains, drawing a single sample for every parameter (after the tune step which discards 1000). I would not expect sensical result from a chain where draws=1. The default is 1000.

https://www.pymc.io/projects/docs/en/v4.4.0/api/generated/pymc.sample.html

If you are having speed problems, that could be due to many things, bad choice of priors, complicated model which is hard to sample, lots of parameters or lots of data points. You can always try to speed it up by trying numpyro

But if it is better to play around with your priors etc first to see if you can speed it up. For instance, I would suggest using chol for MvNormals instead of cov:

https://www.pymc.io/projects/docs/en/stable/api/distributions/generated/pymc.MvNormal.html

You can also try approximation techniques such as ADVI if your data size is the problem:

1 Like