Request: ADVI delta_ELBO_mean delta_ELBO_med to diagnostic_writer
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.8k
- Forks
- 388
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 15
Description
Summary:
Feature request: Add convergence metrics delta_ELBO_mean, delta_ELBO_med to ADVI diagnostic writer
Description:
My first issue here. Searched but found no issues specifically related to this.
I am fitting models to large nested data and I'm using ADVI. Meanfield algorithm is giving me good results when it converges. The problem I'm having is I need to automate the fitting, and sometimes the meanfield algorithm does not converge in the amount of iterations and wall time I set as the maximum.
It would be nice if the convergence conditions delta_ELBO_mean and delta_ELBO_med would be included in the output by the diagnostic writer here https://github.com/stan-dev/stan/blob/master/src/stan/variational/advi.hpp#L491 . Then it would allow for automatically checking that the convergence conditions have been met. Right now I have no choice but to re-create the convergence checks myself (in Python in this case). Another solution might be to redirect stdout (haven't tried) but that is also overly complicated in comparison to the feature request.
Possibly related (?) https://github.com/stan-dev/stan/issues/2474 .
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 in src/stan/variational/advi.hpp around line 491, where the ADVI diagnostic writer is referenced, and review how delta_ELBO_mean and delta_ELBO_med are currently used as convergence conditions. Check the related discussion in issue 2474. Done means the diagnostic writer exposes both metrics so callers can inspect convergence without recreating the checks or parsing stdout.
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
- Clearly specified
- Newbie friendliness
- 38/100