def test_simple(self):
     """We create a variable whose initial value creates a ZeroProbability error in
     its children, and check that robust_init can randomly sample the variable until
     it finds a suitable value.
     """
     lower = pymc.Uniform("lower", 0.0, 2.0, value=1.5, rseed=True)
     pymc.robust_init(pymc.Uniform, 100, "data", lower=lower, upper=5, value=[1, 2, 3, 4], observed=True)
Beispiel #2
0
 def test_simple(self):
     """We create a variable whose initial value creates a ZeroProbability error in
     its children, and check that robust_init can randomly sample the variable until
     it finds a suitable value.
     """
     lower = pymc.Uniform('lower', 0., 2., value=1.5, rseed=True)
     pymc.robust_init(pymc.Uniform, 100, 'data', lower=lower, upper=5, value=[1, 2, 3, 4], observed=True)