本文整理汇总了Python中pyll.scope.adaptive_parzen_normal函数的典型用法代码示例。如果您正苦于以下问题:Python adaptive_parzen_normal函数的具体用法?Python adaptive_parzen_normal怎么用?Python adaptive_parzen_normal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了adaptive_parzen_normal函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: ap_quniform_sampler
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)
开发者ID:gabekron,项目名称:hyperopt,代码行数:7,代码来源:tpe.py
示例2: ap_qloguniform_sampler
def ap_qloguniform_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(
scope.log(
# -- map observations that were quantized to be below exp(low)
# (particularly 0) back up to exp(low) where they will
# interact in a reasonable way with the AdaptiveParzen
# thing.
scope.maximum(obs, scope.maximum(EPS, scope.exp(low))) # -- protect against exp(low) underflow
),
prior_weight,
prior_mu,
prior_sigma,
)
return scope.LGMM1(weights, mus, sigmas, low, high, q=q, size=size, rng=rng)
开发者ID:npinto,项目名称:hyperopt,代码行数:16,代码来源:tpe.py
示例3: ap_qlognormal_sampler
def ap_qlognormal_sampler(obs, prior_weight, mu, sigma, q, size=(), rng=None):
log_obs = scope.log(scope.maximum(obs, EPS))
weights, mus, sigmas = scope.adaptive_parzen_normal(
log_obs, prior_weight, mu, sigma)
rval = scope.LGMM1(weights, mus, sigmas, q=q, size=size, rng=rng)
return rval
开发者ID:gabekron,项目名称:hyperopt,代码行数:6,代码来源:tpe.py
示例4: ap_loglognormal_sampler
def ap_loglognormal_sampler(obs, prior_weight, mu, sigma, size=(), rng=None):
weights, mus, sigmas = scope.adaptive_parzen_normal(
scope.log(obs), prior_weight, mu, sigma)
rval = scope.LGMM1(weights, mus, sigmas, size=size, rng=rng)
return rval
开发者ID:gabekron,项目名称:hyperopt,代码行数:5,代码来源:tpe.py
示例5: ap_qnormal_sampler
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)
开发者ID:gabekron,项目名称:hyperopt,代码行数:4,代码来源:tpe.py
注:本文中的pyll.scope.adaptive_parzen_normal函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论