@@ -53,7 +53,7 @@ def test_bart_vi(response):
53
53
mu = pmb .BART ("mu" , X , Y , m = 10 , response = response )
54
54
sigma = pm .HalfNormal ("sigma" , 1 )
55
55
y = pm .Normal ("y" , mu , sigma , observed = Y )
56
- idata = pm .sample (random_seed = 3415 )
56
+ idata = pm .sample (tune = 200 , draws = 200 , random_seed = 3415 )
57
57
var_imp = (
58
58
idata .sample_stats ["variable_inclusion" ]
59
59
.stack (samples = ("chain" , "draw" ))
@@ -77,8 +77,8 @@ def test_missing_data(response):
77
77
with pm .Model () as model :
78
78
mu = pmb .BART ("mu" , X , Y , m = 10 , response = response )
79
79
sigma = pm .HalfNormal ("sigma" , 1 )
80
- y = pm .Normal ("y" , mu , sigma , observed = Y )
81
- idata = pm .sample (tune = 100 , draws = 100 , chains = 1 , random_seed = 3415 )
80
+ pm .Normal ("y" , mu , sigma , observed = Y )
81
+ pm .sample (tune = 100 , draws = 100 , chains = 1 , random_seed = 3415 )
82
82
83
83
84
84
@pytest .mark .parametrize (
@@ -116,7 +116,7 @@ def test_shape(response):
116
116
with pm .Model () as model :
117
117
w = pmb .BART ("w" , X , Y , m = 2 , response = response , shape = (2 , 250 ))
118
118
y = pm .Normal ("y" , w [0 ], pm .math .abs (w [1 ]), observed = Y )
119
- idata = pm .sample (random_seed = 3415 )
119
+ idata = pm .sample (tune = 50 , draws = 10 , random_seed = 3415 )
120
120
121
121
assert model .initial_point ()["w" ].shape == (2 , 250 )
122
122
assert idata .posterior .coords ["w_dim_0" ].data .size == 2
@@ -133,7 +133,7 @@ class TestUtils:
133
133
mu = pmb .BART ("mu" , X , Y , m = 10 )
134
134
sigma = pm .HalfNormal ("sigma" , 1 )
135
135
y = pm .Normal ("y" , mu , sigma , observed = Y )
136
- idata = pm .sample (random_seed = 3415 )
136
+ idata = pm .sample (tune = 200 , draws = 200 , random_seed = 3415 )
137
137
138
138
def test_sample_posterior (self ):
139
139
all_trees = self .mu .owner .op .all_trees
0 commit comments