Skip to content

Commit 9ea259a

Browse files
committed
revert test
1 parent c1c3a0b commit 9ea259a

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

Diff for: pymc3/tests/test_bart.py

-25
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,6 @@ def test_leaf_node():
2424
assert leaf_node.get_idx_right_child() == 12
2525

2626

27-
def test_model():
28-
X = np.linspace(7, 15, 100)
29-
Y = np.sin(np.random.normal(X, 0.2)) + 3
30-
X = X[:, None]
31-
32-
with pm.Model() as model:
33-
sigma = pm.HalfNormal("sigma", 1)
34-
mu = pm.BART("mu", X, Y, m=50)
35-
y = pm.Normal("y", mu, sigma, observed=Y)
36-
idata = pm.sample(chains=4)
37-
mean = idata.posterior["mu"].stack(samples=("chain", "draw")).mean("samples")
38-
39-
np.testing.assert_allclose(mean, Y, 0.5)
40-
41-
Y = np.repeat([0, 1], 50)
42-
with pm.Model() as model:
43-
mu_ = pm.BART("mu_", X, Y, m=50)
44-
mu = pm.Deterministic("mu", pm.math.invlogit(mu_))
45-
y = pm.Bernoulli("y", mu, observed=Y)
46-
idata = pm.sample(chains=4)
47-
mean = idata.posterior["mu"].stack(samples=("chain", "draw")).mean("samples")
48-
49-
np.testing.assert_allclose(mean, Y, atol=0.5)
50-
51-
5227
def test_bart_vi():
5328
X = np.random.normal(0, 1, size=(3, 250)).T
5429
Y = np.random.normal(0, 1, size=250)

0 commit comments

Comments
 (0)