跳转到主要内容

在Aesara上使用Blackjax进行抽样

项目描述

AeX

以下功能目前可用

import aesara.tensor as at
import aex

srng = at.random.RandomStream(0)

sigma_rv = srng.normal(1.)
mu_rv = srng.normal(0, 1)
Y_rv = srng.normal(mu_rv, sigma_rv)

sampler = aex.prior_sampler(Y_rv, mu_rv)
sampler(rng_key, 1_000_000)

即将推出

使用Blackjax的NUTS采样器从后验分布中进行抽样

sampler = aex.mcmc({Y_rv: 1.}, aex.NUTS())
samples, info = sampler(rng_key, 1000, 1000)

通过任意组合Blackjax步骤函数从后验分布中进行抽样

sampler = aex.mcmc({Y_rv: 1.}, {[mu_rv, sigma_rv]: aex.NUTS(), Y_rv: aex.RMH()})
samples, info = sampler(rng_key, 1000)

从后验预测分布中进行抽样

sampler = aex.posterior_predictive(trace, Y_rv)
sampler(rng_key, 1000)

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码分发

aex-0.0.2.tar.gz (6.1 kB 查看哈希值)

上传于 源代码

构建分发

aex-0.0.2-py3-none-any.whl (2.5 kB 查看哈希值)

上传于 Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面