stan-dev / rstan

RStan, the R interface to Stan
https://mc-stan.org
1.04k stars 265 forks source link

ADVI: access ELBO trajectory (enhancement) #272

Open JohnReid opened 8 years ago

JohnReid commented 8 years ago

Summary:

Expose ADVI ELBO via rstan interface

Description:

I don't believe there is any way to access the ELBO values at each iteration through the rstan interface. These would be useful for comparing runs of ADVI from distinct initialisations.

RStan Version:

2.9.0-3

R Version:

3.2.3

Operating System:

Ubuntu 15.10

bgoodri commented 8 years ago

The problem here is that ADVI doesn't really "return" anything; it just has the side effect of writing a CSV file with the draws (in the constrained space). Even if we unconstrained the optimal mean parameters, we do not know the optimal value of the variance-covariance matrix in the variational approximation. Maybe @akucukelbir or @dustinvtran can say more.

akucukelbir commented 8 years ago

as i mentioned in the stan-users convo, cmdStan (optionally) writes out the full ELBO trajectory into a csv file. all we'd need is to read that in somehow.

willtownes commented 7 years ago

I would really like to see this feature as well. I'm currently extracting the ELBOs from multiple runs via regular expression parsing of the text output of ADVI, which is fragile.