This is the implementation of LDA using Variational Inference.
lda-tutorial-reed.pdf: tutorial of Variational Inference for LDA. It is written by Colorado Reed
data: folder contains a formatted corpus of 2246 documents from the Associated Press -- acquired from Dave Blei: http://www.cs.princeton.edu/~blei/lda-c/index.html
There are several Matlab implementations. Below are some that I could find from Internet
- Implementation from Jonathan Huang
- Implementation from Daichi Mochihashi
- Fast LDA from Hanhuai Shan
To run the code, change directory to folder Julia_code
and open Julia REPL by running julia
julia> include("learning.jl")
julia> doingEM(5, "../data/testvocab.txt", "../data/test.dat")
12
5
iter:1 LLH:-41.44370338941365
iter:2 LLH:-16.766421150082397
iter:3 LLH:-9.853526813601954
iter:4 LLH:-7.092066633456787
iter:5 LLH:-5.532452444424346
iter:6 LLH:-4.529245859657811
iter:7 LLH:-3.831243026218271
iter:8 LLH:-3.318196693930216
iter:9 LLH:-2.925494112902746
iter:10 LLH:-2.6153937569107333
It will print out the log-likelihood of each iteration.