pymc-devs/pymc

Implement DiffTransform for RandomWalk distributions

Open

#6,098 创建于 2022年9月4日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Python (1,902 fork)batch import
enhancementshelp wantedpytensor

仓库指标

Star
 (7,926 star)
PR 合并指标
 (平均合并 11天) (30 天内合并 7 个 PR)

描述

My guess is that unobserved [Gaussian/MvNormal/MvStudentT]RandomWalk would sample much better if NUTS could propose innovation values instead of the "absolute" timeseries values. This is what is done when one manually creates a random walk model by

x_raw = pm.Normal("x_raw")
x = pm.Deterministic("x", x_raw.cumsum())

If we just added the transform, there would some redundancies in the logp, because the proposed diffed values would be cumsumed (in the back-transform) and then differentiated again in the randomwalk logprob, but we can probably teach Aesara to optimize those away.

Once we have that, the user won't be worse off when creating unobserved random walks via the specialized PyMC distribution classes.

贡献者指南