Tracing only a subset of state variables in mcmc.sample_chain

未关闭
#1,836 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞

调研方向

从 issue 中描述的入口点 mcmc.sample_chain 及其 trace_fn 行为开始。确定如何选择采样状态,并定义一种在不存储 z 的情况下保留 alpha 的方式;当 sample_chain 能够仅返回请求的状态变量,同时保留现有的 tracing 行为时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

I would like to sample from a posterior distribution which depends on two variables: z and alpha. alpha is a scalar and z is a large vector of hidden variables. I am only interested in the marginal posterior distribution of alpha. When I construct a sample with mcmc.sample_chain it always gives me the full state of the chain for each element of the sample. For large sample sizes and large vectors z this can lead to memory problems. Is there a way to tell sample_chain to only return samples for alpha, but not for z? I have experimented with the trace_fn option, but with that it seems I'm only able to output additional variables like acceptance flags.

主要语言
Jupyter Notebook
星标
4.4k
派生
1.1k
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tensorflow/probability 的其他 Issue

查看 tensorflow/probability 的全部 Issue

相似的 Issue

更多 Machine Learning Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。