Moment matching with iwmm package
まだ誰も着手していません。
評価
調査の方向性
まず loo::loo_moment_match と、リンクされた iwmm パッケージの汎用実装を確認します。これには matrix、stanfit、CmdStanFit のサポートも含まれます。Issue にある 3 つの相互運用性オプションを比較し、どの設計を採用すべきかを判断します。完了とは、サポートする入力を拡張するための方針がプロジェクトで決定されていることを意味します。
索引モデルが issue の本文から書いたものです。
説明
Currently loo_moment_match only works on stanfit objects (due to the reliance on the log_prob methods from rstan), but not CmdStanFit or just a matrix of draws (see e.g. #209). I was thinking about the best way to expand support of loo_moment_match to other objects, and am opening this issue mostly for discussion at this stage.
@topipa has created a generic implementation of moment matching (iwmm) which works on a matrix or stanfit object. Recently we have also added CmdStanFit support to this package (using the new model methods in cmdstanr which are currently not yet in a release).
iwmm is not (yet) on CRAN, so now might be a good time to discuss the best way to interoperate with loo.
After some discussion with @avehtari, I currently see three options (there may be others I haven't thought of):
- update functions in loo, no change to dependencies
Code from iwmm is copied into loo and adapted for use inloo::loo_moment_match(made specific for leave-one-out importance posteriors). iwmm would remain an independent package for generic importance sampling. - add iwmm dependency in loo
iwmm is submitted to CRAN andloo::loo_moment_matchis rewritten to useiwmm::moment_match. loo would then import and depend on iwmm. - move iwmm functions into loo
All iwmm functions are moved into loo, and kept generic (i.e. not specific for leave-one-out posteriors). Keeping the functions generic has some precedence as loo is the home ofloo::psiswhich is used in cases other than leave-one-out CV (e.g. in priorsense and adjustr).
@jgabry @avehtari @topipa @paul-buerkner , do you have any thoughts on this?
- 主要言語
- R
- スター
- 157
- フォーク
- 38
- 平均マージ
- 4日 16時間
- マージ済み PR(30日)
- 2
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stan-dev/loo のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
Clean up issuesオープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
似ている issue
-
難易度 2/5 半日 初心者へのやさしさ 78/100
ThinkR-open/datadiff#59 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
duckdb/duckdb-r#2773 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tidymodels/parsnip#1444 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100