Latent Dirichlet Allocation via Gibbs sampling
Latent Dirichlet Allocation (LDA) is a classic model for topic modelling, which often appears in natural language processing. The model can also be extended to analyse, for example, transcriptomics data. Below is an implementation via a Gibbs sampler, tested on a corpus of short articles. This Markov chain Monte Carlo (MCMC) approach was proposed by Thomas L. Griffiths and Mark Steyvers in their paper “Finding scientific topics”. HTML