loo_subsampling for rstanarm
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 401
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
Summary:
Implement loo subsampling (and loo approximate posterior) for rstanarm
Description:
I got a question on how to use loo subsampling with rstanarm (see here:
https://discourse.mc-stan.org/t/extract-log-likelihood-function-from-rstanarm-model/14668/3).
I then realized I should implement this for rstanarm users in addition to brms users. The question is more or less how to do this in the optimal way. I see two ways:
- Expose the
ll_fun()(or a wrapper aslog_lik_function()) as a part of the API. Then the users can plug it in in the loo subsample themselves. - Implement a
loo_subsampling.stanregfunction.
I do not think 1 and 2 are mutually exclusive. Maybe start with exposing a log_lik_function() function? This is probably quite quick to do (I can fix). Then I can implement 2 for the models where loo currently uses the ll_fun function.
Since I'm not very familiar with the rstanarm framework and I'm not sure about all parts so it would be great to get some feedback on how to connect loo subsampling to rstanarm in the best way.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing rstanarm integration around ll_fun() and how loo currently uses it. Compare exposing log_lik_function() with adding loo_subsampling.stanreg, then define tests that confirm rstanarm models support loo subsampling and approximate posterior workflows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- analytics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100