I’ve been working with cmdstanr
to fit a model using variational inference. After the fitting process, I’m interested in extracting the ELBO samples, but I’ve been running into some challenges.
Here’s a brief overview of what I’ve tried:
-
I used the
variational
method on my model to perform the fit. -
I attempted to access the ELBO directly using various methods, such as
fit$elbo()
,fit$output()
, and looking into themetadata
field, but haven’t had any luck.
I’ve also tried capturing the printed output of the fit object and parsing the ELBO value from there, but it seems that there should be a more direct or cleaner way to access the ELBO samples.
Could anyone provide guidance on how to extract the ELBO samples from a variational fit when using cmdstanr
? Any help or pointers would be greatly appreciated.
Thank you in advance!