You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
m = pm.MCMC([y,x])
m.sample(100,0)
m.sample(100,0)
m.sample(100,0)
pm.diagnostics.gelman_rubin(m)
I ran this code and got different values for y and for x[2].
for instance,
{'x': [0.96274904628327884,
1.0617412110342699,
0.94988095858687061,
0.94650618423398925,
1.0581700972182297],
'y': 1.0180891431696331}
The text was updated successfully, but these errors were encountered:
Its not clear to me what the bug is here. The G-R statistics should be approximately one if convergence is reached. They are based on a stochastic sample, so you should not expect them to be identical each time you run the code. If I am missing something, please clarify.
y is a deterministic node and it's equal to x[2], so the trace of y and the trace of x[2] is identical,
which means that GR of x[2] should be equal to the GR of y.
In the result above you can see that x[2] has GR of 0.949880...
while the GR of y is 1.01808
x = pm.Normal('x',0,1,size=5)
@pm.deterministic
def y(x=x):
return x[2]
m = pm.MCMC([y,x])
m.sample(100,0)
m.sample(100,0)
m.sample(100,0)
pm.diagnostics.gelman_rubin(m)
I ran this code and got different values for y and for x[2].
for instance,
{'x': [0.96274904628327884,
1.0617412110342699,
0.94988095858687061,
0.94650618423398925,
1.0581700972182297],
'y': 1.0180891431696331}
The text was updated successfully, but these errors were encountered: