Moment matching with iwmm package
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
Direzione di ricerca
Inizia esaminando loo::loo_moment_match e l’implementazione generica nel pacchetto iwmm collegato, incluso il supporto per matrix, stanfit e CmdStanFit. Confronta le tre opzioni di interoperabilità nell’issue e determina quale design debba essere adottato; il lavoro è completato quando il progetto ha deciso un approccio per ampliare gli input supportati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- R
- Stelle
- 157
- Fork
- 38
- Merge medio
- 4g 16h
- PR unite (30g)
- 2
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stan-dev/loo
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Extend loo_plot_differenceAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
Clean up issuesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Tutte le issue di stan-dev/loo
Issue simili
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 78/100
ThinkR-open/datadiff#59 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
duckdb/duckdb-r#2773 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tidymodels/parsnip#1444 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100