pymc - pymc3 中转换的便捷方法

标签 pymc pymc3

在某些情况下,pymc3 自动执行变量转换(请参阅 What are the interval transforms in pymc3 for uniform distributions?what does the 'find_MAP' output mean in pymc3? )。

回答https://stackoverflow.com/a/42170938/5142797我发现应用了哪些转换。所以原则上我现在可以执行向后和向前转换。

但是有没有更方便的方法来对自动转换的变量执行这些前向和后向转换?那会非常方便,例如获取 find_MAP 结果。

最佳答案

以下作品:

test_model = pymc3.Model()

with test_model:
    u = pymc3.Uniform('u', 0, 1)

test_model.u_interval__.distribution.transform_used.backward(0.5).eval()

关于pymc - pymc3 中转换的便捷方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43803336/

相关文章:

python - pymc3导入开关不起作用

pymc - pymc3 中观察到的确定性

python - 与 PyMC3 的贝叶斯相关性

python-3.x - 错误的初始能量 : inf. pymc3 中的基本线性回归模型可能错误指定了模型

numpy - 为 pymc3 声明 theano 变量

bayesian-networks - 如何使用 PyMC 估计贝叶斯网络中的参数

pymc - Pyro VS Pymc?这些概率编程框架之间有什么区别?

pymc - 在 PyMC3 中从用户提供的目标密度中采样

python - pymc 对多个变量进行观察

python - 什么是 pm.Normal.dist.logp?