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
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
def K(value=5, min = K_min, max = K_max): """K ~ uniform(min, max)""" return uniform_like(value, min, max)
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)
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 x(value=init_x): """Inferred true inputs.""" return uniform_like(value, 0, 50)