stan-dev / rstan

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

Converter from optimizing list to stanfit #697

Open jgabry opened 5 years ago

jgabry commented 5 years ago

Until v3 when we can finally standardize fitted model objects across algorithms (this has been a problem for years, see eg #41), I think we should provide a function in rstan to convert the list returned by optimizing() into a proper stanfit object consistent with vb() and sampling(). This would make a lot of people happy, or at least a bit less frustrated.

bob-carpenter commented 5 years ago

+1 to unifying output across sampling, optimization and variational inference. Even better if we can include the log density for both the approximate and true models so that we could do something like importance sampling to compute expectations (I think that's already in the ADVI output).