Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

accessing value of a random variable in PyMC3

Tags:

python

pymc

pymc3

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
like image 885
ahmethungari Avatar asked Nov 10 '22 09:11

ahmethungari


1 Answers

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.

like image 187
twiecki Avatar answered Nov 14 '22 22:11

twiecki