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?
It is not in PyStan 2.9.0, but we're working on integrating it.
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'])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With