advanced
Latent Dirichlet Allocation
Implement the collapsed Gibbs sampling for LDA topic modeling.
📝 プロンプトの内容
Implement Latent Dirichlet Allocation (LDA) in R using collapsed Gibbs sampling. Your function should accept a document-term matrix and the number of topics, then iterate to assign topics to words, eventually returning the topic-word distributions and document-topic distributions.