Python Implementation of Collapsed Gibbs Sampling for Latent Dirichlet Allocation (LDA)
- Language: Python3
- Prerequisite libraries: Scipy, Numpy, matplotlib
DocumentID \t WordID \t Count \n
>>> import GibbsLDA
>>> sampler = GibbsLDA.Sampler("/home2/TwitterData.dat", 100)
>>> likelihood = sampler.run(500, 300, 2)
- 100: # of topics
- 500: # of Gibbs samples
- 300: burn-in point
- 2: sampling interval