Sampling from custom target densities in PyMC3
1 answer
It's a little awkward. You will need to create a new Theano Op
. Here are some examples: https://github.com/Theano/Theano/blob/master/theano/tensor/slinalg.py#L32
Then you need to create a distribution class that evaluates the logp through your new one Op
, for example: https://github.com/pymc-devs/pymc3/blob/master/pymc3/distributions/continuous.py#L70
+3
source to share