在 pymc3 中进行转换的便捷方式

Convinient way for transformations in pymc3

在某些情况下 pymc3 会自动执行变量转换(参见 What are the interval transforms in pymc3 for uniform distributions?, )。

在回答 中,我发现应用了哪些转换。所以原则上我现在可以执行向后和向前的转换。

但是有没有更方便的方法来对自动转换的变量执行这些正向和反向转换呢?那将非常方便,例如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()