ADVI: Option to save family parameters to JSON
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.8k
- Forks
- 388
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 15
Description
Summary:
Currently the mean is saved in the CSV output above the samples, but there is no way to get the estimated (co-)variance out, short of approximating it through the samples.
We could save it to JSON, similar to issues #3181 #3260
Description:
Option to save the non-mean parameters of the family for ADVI. For meanfield this is
https://github.com/stan-dev/stan/blob/9de06d41d0de9201a78c6c3e1de18fbc98496f1d/src/stan/variational/families/normal_meanfield.hpp#L28-L30
For fullrank this is
https://github.com/stan-dev/stan/blob/9de06d41d0de9201a78c6c3e1de18fbc98496f1d/src/stan/variational/families/normal_fullrank.hpp#L28-L31
These could be used to e.g. draw further samples from the approximation from outside the algorithmic run.
Additional Information:
Originally requested on the forums here: https://discourse.mc-stan.org/t/cmdstanpy-variational-how-to-get-density-parameters/37280/
Current Version:
v2.35.0
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 with src/stan/variational/families/normal_meanfield.hpp and normal_fullrank.hpp at the linked parameter definitions, then trace how ADVI currently writes its CSV output and compare issues #3181 and #3260. Done means providing an option that writes the relevant non-mean family parameters to JSON for both meanfield and fullrank ADVI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100