accessing value of a random variable in PyMC3

2019-06-23 15:55发布

In PyMC2, there are methods random() and value() to generate a random value, and get the current value of random variables. Is there any way to do the same in PyMC3?

p = pm.Dirichlet('p', theta=np.array([1., 1., 1.]))
p.random()
p.value

1条回答
We Are One
2楼-- · 2019-06-23 16:47

Not quite yet, but there is an almost done PR here: https://github.com/pymc-devs/pymc3/pull/784

There is no real .value as we store state outside of the RVs now.

查看更多
登录 后发表回答