I’ve tried this integrateOut op but it doesn’t really work in my case, although it seems to be helpful in many other cases.
For the example in this integrateOut op:
intZ = integrateOut(z,t,0,1)(x,y)
functionZ = theano.function([x,y],intZ)
I can’t treated intZ, a theano.op, as a pymc3 RV(I’m not sure about this, please tell me if there is some way to do it) and define a new RV like:
M=pm.Normal('M',mu=intZ,sd=intZ*0.1,observed=0.25)
If I want to calculate the logp manually, I still need to know the value of x and y(in order to use the functionZ), which are RVs in my case.