Пример #1
0
def theta(value=array([2.,5.])):
    """Slope and intercept parameters for a straight line.
    The likelihood corresponds to the prior probability of the parameters."""
    slope, intercept = value
    prob_intercept = pm.uniform_like(intercept, -10, 10)
    prob_slope = np.log(1./np.cos(slope)**2)
    return prob_intercept+prob_slope
Пример #2
0
def theta(value=array([2., 5.])):
    """Slope and intercept parameters for a straight line.
    The likelihood corresponds to the prior probability of the parameters."""
    slope, intercept = value
    prob_intercept = uniform_like(intercept, -10, 10)
    prob_slope = log(1. / cos(slope)**2)
    return prob_intercept + prob_slope
Пример #3
0
def K(value=5, min = K_min, max = K_max):
    """K ~ uniform(min, max)"""
    return uniform_like(value, min, max)
Пример #4
0
def K(value=5, min = K_min, max = K_max):
    """K ~ uniform(min, max)"""
    return uniform_like(value, min, max)
Пример #5
0
def test_builder():
    from numpy import random
    data = random.normal(3,.1,20)
    return builder(data, [pymc.Lognormal, pymc.Normal], lambda x: pymc.uniform_like(x, 0, 100), initial_params={'normal':np.array([50.,1.])})
def s(value=50, length=110):
    """Change time for rate stochastic."""
    return uniform_like(value, 0, length)
Пример #7
0
def test_builder():
    from numpy import random
    data = random.normal(3, .1, 20)
    return builder(data, [pymc.Lognormal, pymc.Normal],
                   lambda x: pymc.uniform_like(x, 0, 100),
                   initial_params={'normal': np.array([50., 1.])})
Пример #8
0
def s(value=50, length=110):
    """Change time for rate stochastic."""
    return uniform_like(value, 0, length)
Пример #9
0
def x(value=init_x):
    """Inferred true inputs."""
    return uniform_like(value, 0, 50)