Control Variates
まだ誰も着手していません。
評価
調査の方向性
まず既存の posterior object と summarise_draws の実装を読み、その後、引用されている Python ControlVariates と R ZVCV の実装と比較します。勾配の保存方法、control-variate の要約指標の公開方法、勾配が利用できない場合の推定のフォールバック方法を定義します。新しい要約が勾配が格納されている場合に機能し、それ以外の場合は既存の動作を維持すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
It would be really great if posterior had a capacity to have reduced the standard errors associated with the expectations it can produce (eg mean, var and sd). Recent work [1] has shown that, if we use the score function as a control variate, we can reduce such standard errors and do so in a way that is effective in the context of constrained variables (as often considered in applications of interest in the context of, for example, estimating volatility or a frequency).
Based on initial discussion, we think the approach to adopt is to augment posterior with the capacity to accept, alongside the samples, the gradient of the log posterior of mapped parameters with respect to those mapped parameters (these mapped parameters are unconstrained but are nonlinear functions of the constrained variables). The implementation then decomposes into three components:
* Storage: we will need to use protected variables (called something like .grad_log_p_unconstrained) within the posterior object itself to pass the samples and gradients around the code such that anything we contribute is compatible with existing functionality.
* Interface: We would sensibly subtly augment the functionality of summarise_draws such that it has additional measures such that the user can use (eg summarise_draws(x, "mean_control_variates",”sd_control_variates”), where "mean_control_variates" calculates the mean using control variates and “sd_control_variates” does the same for the standard deviation).
* Estimation: writing the functions to calculate the estimates themselves in such a way that, for example, mean__control_variates fails gracefully (eg by calling mean, without control variates) when .grad_log_p_unconstrained is not populated. These functions are likely to be based heavily on a combination of the code written (in Python here: https://github.com/zhouyifan233/ControlVariates) for [1] and a pre-existing R repo (here: https://github.com/LeahPrice/ZVCV).
We would welcome advice on how to progress towards a pull-request associated with this issue.
[1] S Maskell, Y Zhou and A Mira. Control Variates for Constrained Parameters. IEEE Signal Processing Letters. Vol 29, pp. 2333-2337. 2022
- 主要言語
- R
- スター
- 172
- フォーク
- 27
- 平均マージ
- 5日 12時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stan-dev/posterior のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
Use testthat 3e対応中かも @mcol が 7 日前に担当しました。 オープンgood first issue test
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
stan-dev/posterior の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
cran-task-views/Spatial#127 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Add two cautions to the `simulate_dyad_responses()` help対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンdocumentation priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Pascal-Kueng/dyadMLM#179 ·
メンテナーはふだん 1 日以内に返信
-
Consider changesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
OHDSI/OmopSketch#618 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
GSK-Biostatistics/tfrmt#854 ·