Initial mass matrix

Hi,

I am new to PyMC3 and found that I cannot really find information on this topic. Maybe you can help.
Is it possible to pass a custom mass matrix to the sampler?
Is it possible to use a dense mass matrix?

Thanks in advance!

1 Like

Yes: see https://github.com/pymc-devs/pymc3/blob/a3fcc861ae0f160111afb95a574540272de644a3/pymc3/sampling.py#L1511-L1513
and https://github.com/pymc-devs/pymc3/blob/a3fcc861ae0f160111afb95a574540272de644a3/pymc3/sampling.py#L1518

Basically, you need to initialized NUTS by hand using step = pm.NUTS(...), and then pass step to pm.sample(...)

1 Like