I have a super basic PYMC3 question: How do you sample from a transformed RV? I need this mostly for debugging purposes.
For example:
import pymc3 as pm
with pm.Model():
A = pm.Normal('A')
B = pm.Deterministic('B', A + 1)
# or
B = A + 1
I can generate samples from A using A.random()
, but that function is not defined for B
. + 1
is a trivial transform but in case it were more involved I would like to draw some samples from the deformed A
, i.e. B
, to ensure everything is healthy.