Open amit2103 opened 7 years ago
Elbow doesn't currently support conjugate coordinate-ascent updates, which are what is often meant by "variational Bayes". But it is possible to implement LDA, and even handle large datasets using inference networks and minibatch training. The latent topic-word and document-topic probabilities are just Dirichlet matrices, which are already supported, so you just need an observation model to multiply these matrices to get document-word probabilities defining a multinomial density for each document (collapsing out the topic indicators for each word).
I've actually implemented something like this for a paper I'm working on; see https://github.com/davmre/symmetrized_vi/blob/master/code/lda_core.py for some example code (the CollapsedLDA class defines the conditional distribution for an observation model). It's not really documented, and may still be broken in several ways, but I'm hoping to clean it up and add it as an Elbow example in the near future.
I am trying to implement LDA with Variational Bayes. Is it possible to do it using Elbow?