stan
stan copied to clipboard
ADVI: Option to save family parameters to JSON
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