コード例 #1
0
 def model():
     sd = yield pm.Exponential("sd", 1)
     x = yield pm.Normal("x", 0, 1, observed=observed_kwargs["model/x"])
     y = yield pm.HalfNormal("y", 1, observed=observed_kwargs["model/y"])
     d = yield pm.Deterministic("d", x + y)
     z = yield pm.Normal("z", d, sd, observed=observed_kwargs["model/z"])
     u = yield pm.Exponential("u", z)
     return u
コード例 #2
0
 def outer_model():
     cond = yield pm.HalfNormal("cond", 1)
     dcond = yield pm.Deterministic("dcond", cond * 2)
     dx = yield nested_model(dcond)
     ddx = yield pm.Deterministic("ddx", dx)
     return ddx
コード例 #3
0
 def nested_model(cond):
     x = yield pm.Normal("x", cond, 1)
     dx = yield pm.Deterministic("dx", x + 1)
     return dx
コード例 #4
0
 def unvectorized_model():
     norm = yield pm.Normal("norm", 0, 1, batch_stack=norm_shape)
     determ = yield pm.Deterministic("determ", tf.reduce_max(norm))
     output = yield pm.Normal("output", determ, 1, observed=observed)
コード例 #5
0
 def simple_model_with_deterministic():
     norm = yield simple_model()
     determ = yield pm.Deterministic("determ", norm * 2)
     return determ
コード例 #6
0
ファイル: test_executor.py プロジェクト: mrzjrbn/pymc4
 def model():
     x = yield pm.Normal("x", 0, 1)
     det = yield pm.Deterministic("det", x)
     y = yield pm.Normal("det", det, 1)
     return y
コード例 #7
0
ファイル: test_executor.py プロジェクト: mrzjrbn/pymc4
 def model():
     x = yield pm.Normal("x", 0, 1)
     det = yield pm.Deterministic("x", x)
     return det
コード例 #8
0
ファイル: test_executor.py プロジェクト: mrzjrbn/pymc4
 def model():
     x = yield pm.Normal("x", 0, 1)
     yield pm.Deterministic(None, x)
コード例 #9
0
 def model():
     sd = yield pm.HalfNormal("sd", 1.0)
     mu = yield pm.Deterministic("mu", tf.convert_to_tensor(1.0))
     x = yield pm.Normal("x", mu, sd, observed=observed)
     y = yield pm.Normal("y", x, 1e-9)
     dy = yield pm.Deterministic("dy", 2 * y)
コード例 #10
0
 def outer_model():
     cond = yield pm.HalfNormal("cond", 1, conditionally_independent=True)
     dcond = yield pm.Deterministic("dcond", cond * 2)
     dx = yield nested_model(dcond)
     ddx = yield pm.Deterministic("ddx", dx)
     return ddx