5
5
from numpy .testing import assert_almost_equal , assert_array_equal
6
6
7
7
import pymc as pm
8
- import pymcx as pmx
8
+ import pymc_experimental as pmx
9
9
10
10
from pymc .tests .test_distributions_moments import assert_moment_is_expected
11
11
@@ -37,7 +37,7 @@ def test_bart_vi():
37
37
X [:, 0 ] = np .random .normal (Y , 0.1 )
38
38
39
39
with pm .Model () as model :
40
- mu = pmx .bart ("mu" , X , Y , m = 10 )
40
+ mu = pmx .BART ("mu" , X , Y , m = 10 )
41
41
sigma = pm .HalfNormal ("sigma" , 1 )
42
42
y = pm .Normal ("y" , mu , sigma , observed = Y )
43
43
idata = pm .sample (random_seed = 3415 )
@@ -57,7 +57,7 @@ def test_missing_data():
57
57
X [10 :20 , 0 ] = np .nan
58
58
59
59
with pm .Model () as model :
60
- mu = pmx .bart ("mu" , X , Y , m = 10 )
60
+ mu = pmx .BART ("mu" , X , Y , m = 10 )
61
61
sigma = pm .HalfNormal ("sigma" , 1 )
62
62
y = pm .Normal ("y" , mu , sigma , observed = Y )
63
63
idata = pm .sample (tune = 10 , draws = 10 , chains = 1 , random_seed = 3415 )
@@ -70,7 +70,7 @@ class TestUtils:
70
70
Y = np .random .normal (0 , 1 , size = 50 )
71
71
72
72
with pm .Model () as model :
73
- mu = pmx .bart ("mu" , X , Y , m = 10 )
73
+ mu = pmx .BART ("mu" , X , Y , m = 10 )
74
74
sigma = pm .HalfNormal ("sigma" , 1 )
75
75
y = pm .Normal ("y" , mu , sigma , observed = Y )
76
76
idata = pm .sample (random_seed = 3415 )
@@ -137,5 +137,5 @@ def test_bart_moment(size, expected):
137
137
X = np .zeros ((50 , 2 ))
138
138
Y = np .zeros (50 )
139
139
with pm .Model () as model :
140
- pmx .bart ("x" , X = X , Y = Y , size = size )
140
+ pmx .BART ("x" , X = X , Y = Y , size = size )
141
141
assert_moment_is_expected (model , expected )
0 commit comments