sbi
sbi copied to clipboard
Add interface to PyMC MCMC samplers
Is your feature request related to a problem? Please describe.
For MCMC sampling we provide our own slice_np_vectorized MCMC samplers, and an interface to Pyro HMC and NUTS samplers. The interface to Pyro is enabled by specifying a potential_fn, i.e., a Callable that returns the potential energy given a set of parameters. We defined a wrapper for that here.
Describe the solution you'd like
I would be great to do something analog to enable access to PyMC MCMC samplers. I am not sure how the potential_fn can be used in this context. It seems PyMC handles things differently. The approach for this feature request would be:
- find out how
PyMCMCMC can be accessed: https://www.pymc.io/projects/docs/en/stable/_modules/pymc/sampling/mcmc.html - implement a wrapper from
sbipotential functions toPyMCMCMC samplers - add new sampler options to
MCMCPosterior, e.g.,hmc_pymc,nuts_pymcetc.
Related to #908