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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With