def ap_quniform_sampler(obs, prior_weight, low, high, q, size=(), rng=None): prior_mu = 0.5 * (high + low) prior_sigma = 1.0 * (high - low) weights, mus, sigmas = scope.adaptive_parzen_normal(obs, prior_weight, prior_mu, prior_sigma) return scope.GMM1(weights, mus, sigmas, low=low, high=high, q=q, size=size, rng=rng)
def ap_qnormal_sampler(obs, prior_weight, mu, sigma, q, size=(), rng=None): weights, mus, sigmas = scope.adaptive_parzen_normal( obs, prior_weight, mu, sigma) return scope.GMM1(weights, mus, sigmas, q=q, size=size, rng=rng)