Applying a function to each chain
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 171
- Forks
- 26
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 3
Description
Are there simple ways (can be internal functions) to apply a function to each chain of a draws or rvar object?
For a draws object, I can do:
example_draws() |>
extract_variable_matrix("mu") |>
apply(MARGIN = 2, FUN = ess_bulk)
But the equivalent for an rvar is not immediately clear to me.
This is related to the automatic thinning via ess, which uses this method but if rvars become the default for summarise draws (#184 ), will need to be updated.
Contributor guide
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 tracing the existing automatic thinning via ess and the operations used for draws and rvar objects. Compare the example using extract_variable_matrix(), apply(), and ess_bulk() with the rvar workflow, then check the relationship to summarise draws in issue #184. Done means the intended per-chain function application is defined and its interaction with automatic thinning is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100