Did anybody replicate the ADVI examples in the "Automatic Variational Inference in Stan" paper?

Hello,

I was wondering if somebody already replicated the examples from the “Automatic Variational Inference in Stan” paper (https://arxiv.org/abs/1506.03431) in PyMC3?

I would appreciate a link to those examples.

Thanks a lot,
Christian

I dont think so. But it should be quite straight forward to implement.
Contribution welcome as doc!

Ok, I can do that. But I have already some problems with some basic constructs, e.g. “Figure 8: Stan code for Gamma Poisson non-negative matrix factorization model.” uses the Stan positive_ordered vector constraint, where all entries are constrained to be positive and ordered. How could I achieve similar effects in PyMC3?

I’ll start to work on the examples and will publish a link to them once they’re in good shape.

Since the theta in Figure 8 is generated from a Gamma distribution, it is already positive. In PyMC3 you just need to specify the right shape, and then tt.sort it along the right axis.

You can also try to use an order transformation (by @aseyboldt), it’s not in our code base yet so if it doesnt work ask @aseyboldt :wink:

1 Like