Skip to main content
. 2022 Dec 9;7(12):425. doi: 10.3390/tropicalmed7120425
Algorithm 1 Latent Dirichlet Allocation Generative Process
1. For each document w in a corpus D:
1.1 Choose N ~ Poissonξ
1.2 Choose θ ~ Dirichletα
1.3 For each of the N words wn:
1.3.1 Choose a topic zn ~ Multinomialθ
1.3.2 Choose a word wn from p(wn|zn, β), a multinomial probability related to the topic zn