def gaussian_prior(params):
    beta = params[-1:].item()
    rational_beta = fractions.Fraction(beta)
    theta = params[:-1]
    idx = hash(tuple(theta)) % rational_beta.denominator
    prior = GaussianPrior(mdl1.mu[:-1], mdl1.sigma[:-1])(theta)
    return numpy.append(prior, beta)
Ejemplo n.º 2
0
 def prior(hypercube):
     prior = []
     for h, pr in zip(hypercube, self.params.p_free_priors):
         if pr[1] == 'Gaussian':
             prior.append(
                 GaussianPrior(float(pr[2][0]), float(pr[2][1]))(h))
         else:
             prior.append(
                 UniformPrior(float(pr[2][0]), float(pr[2][2]))(h))
     return prior
def mixture_model_prior(params):
    beta = params[-1:].item()
    rational_beta = fractions.Fraction(beta)
    theta = params[:-1]
    idx = hash(tuple(theta)) % rational_beta.denominator
    if idx > rational_beta.numerator:
        prior = UniformPrior(mdl1.a, mdl1.b)(theta)
    else:
        prior = GaussianPrior(mdl1.mu[:-1], mdl1.sigma[:-1])(theta)
    return numpy.append(prior, beta)
def rev_offset_gaussian_prior(params):
    return numpy.append(
        GaussianPrior(mdl1.mu[:-1] - 0.3, mdl1.sigma[:-1])(params[:-1]),
        params[-1:].item())
def bloated_gaussian_prior(params):
    return numpy.append(
        GaussianPrior(mdl1.mu[:-1], 3 * mdl1.sigma[:-1])(params[:-1]),
        params[-1:].item())
Ejemplo n.º 6
0
def gaussian_prior(hypercube):
    return GaussianPrior(mu, sigma)(hypercube)
Ejemplo n.º 7
0
def bloated_gaussian_prior(hypercube):
    return GaussianPrior(mu, sigmaLL)(hypercube)