Thank you for your valuable advice @chartl.
Another question I have is that the use of theano.Shared .
while if it’s a
theano.Sharedobject, it represents observations.
I have searched a lot for understanding the meaning of theano.Shared variable but couldn’t understand it in the context of pyMC3 model definition.
That is, how pyMC3 recognize theano.Shared variable as observations when I use pm.DensityDist.
Moreover, even though I didn’t write the likelihood function without theano.Shared, the sampling itself works perfectly and the results are the same. For example:
# without using theano.Shared
likelihood1 = pm.DensityDist('cWeibull', logp=custom_weibull, observed={'a': a_pr, 'b': b_pr, 'l': l_pr, 'x': obs_data})
# using theano.Shared
likelihood2 = pm.DensityDist('cWeibull', logp=custom_weibull, observed={'a': a_pr, 'b': b_pr, 'l': l_pr, 'x': theano.Shared(obs_data)})
Even if I used the likelihood1, I got the same posteriors.
I really want to know how come I obtained the same results.
Where can I find some document to fully understand theano.Shared in the context of pyMC3 model definition?
Thank you in advance.