Reputation: 398
I can't find any mentioning of variational inference in PyStan documentation, even though it has been added in Stan itself. Am I missing something, or is the Python API just not implementing it yet?
Upvotes: 3
Views: 1254
Reputation: 13406
Currently (PyStan 2.14), it's available under the StanModel.vb() call.
>>> from pystan import StanModel
>>> m = StanModel(model_code='parameters {real y;} model {y ~ normal(0,1);}')
>>> results = m.vb()
>>> # results saved on disk in format inspired by CSV
>>> print(results['args']['sample_file'])
Upvotes: 1
Reputation: 3753
It is not in PyStan 2.9.0, but we're working on integrating it.
Upvotes: 3