1- from checks import *
2- from models import simple_model , mv_simple
1+ from . checks import *
2+ from . models import simple_model , mv_simple
33from theano .tensor import constant
44from scipy .stats .mstats import moment
55
@@ -11,26 +11,23 @@ def check_stat(name, trace, var, stat, value, bound):
1111def test_step_continuous ():
1212 start , model , (mu , C ) = mv_simple ()
1313
14- hmc = pm .HamiltonianMC (model .vars , C , is_cov = True , model = model )
15- mh = pm .Metropolis (model .vars , C , is_cov = True , scaling = 2 , model = model )
14+ hmc = pm .HamiltonianMC (model .vars , C , is_cov = True , model = model )
15+ mh = pm .Metropolis (model .vars , model = model )
16+ slicer = pm .Slice (model .vars , model = model )
1617 compound = pm .CompoundStep ([hmc , mh ])
1718
18- steps = [mh , hmc , compound ]
19+ steps = [mh , hmc , compound , slicer ]
20+
1921
2022 unc = np .diag (C )** .5
2123 check = [('x' , np .mean , mu , unc / 10. ),
2224 ('x' , np .std , unc , unc / 10. )]
2325
2426 for st in steps :
2527 np .random .seed (1 )
26- h = sample (8000 , st , start , track_progress = False , model = model )
28+ h = sample (8000 , st , start , model = model )
2729 for (var , stat , val , bound ) in check :
2830 np .random .seed (1 )
29- h = sample (8000 , st , start , track_progess = False , model = model )
30-
31- yield check_stat ,repr (st ), h , var , stat , val , bound
32-
33-
34-
35-
31+ h = sample (8000 , st , start , model = model )
3632
33+ yield check_stat ,repr (st ), h , var , stat , val , bound
0 commit comments