Skip to content

ADVI: Option to save family parameters to JSON #3315

@WardBrian

Description

@WardBrian

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

* Log standard deviation (log scale) vector.
*/
Eigen::VectorXd omega_;

For fullrank this is

* Cholesky factor of covariance:
* Sigma = L_chol * L_chol.transpose()
*/
Eigen::MatrixXd L_chol_;

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions