Skip to content

tndoan/SimpleLDA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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.

About

Implement LDA using Julia

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages