Allow specification of inverse mass matrix (Feature Request)
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Summary:
@mitzimorris recently added the specification of the initial inverse matrix (https://github.com/stan-dev/stan/pull/2260). It would be nice to have this feature in rstan.
Description:
It could be added by adding an additional argument (init_inv_metric) to the sampling command. When metric is "diag_e" then init_inv_metric is a vector, or list of vectors, one for each chain, with length equal to the number of unconstrained params. When metric is "dense_e" then init_inv_metric is a semi-positive definite matrix of the appropriate size. When metric is "unit_e" and init_inv_metric is specified, then an error is thrown.
Alternatively, for "diag_e" the inverse metric could be specified on a per parameter basis, similar to how "inits" is used to set initial values.
I could take a stab at implementing this if the proposal seems reasonable, and no one else is already working on it.
Current Version:
v2.16.2
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 with the rstan sampling entry point and the handling of existing metric and init arguments, then compare Stan PR #2260. Define tests for diag_e, dense_e, and unit_e behavior; done means sampling accepts the specified inverse metric forms and rejects it for unit_e.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100