Skip to content

Commit d852ba5

Browse files
author
Junpeng Lao
authored
Change init for test_linear() in timeseries (#2494)
This is a quick patch to fix the travis fail after the change of the default init.
1 parent d5a011f commit d852ba5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pymc3/tests/test_distributions_timeseries.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ def test_linear():
5656
dt = 1e-1
5757
sde = lambda x, lam: (lam * x, sig2)
5858
x = floatX(_gen_sde_path(sde, (lam,), dt, N, 5.0))
59-
z = x + np.random.randn(x.size) * 5e-3
59+
z = x + np.random.randn(x.size) * sig2
6060
# build model
6161
with Model() as model:
6262
lamh = Flat('lamh')
6363
xh = EulerMaruyama('xh', dt, sde, (lamh,), shape=N + 1, testval=x)
64-
Normal('zh', mu=xh, sd=5e-3, observed=z)
64+
Normal('zh', mu=xh, sd=sig2, observed=z)
6565
# invert
6666
with model:
67-
trace = sample()
67+
trace = sample(init='advi+adapt_diag')
6868

6969
ppc = sample_ppc(trace, model=model)
7070
# test

0 commit comments

Comments
 (0)