0

I am using the lda package in R to perform Latent Dirichlet Allocation modelling. However, each time I run the program I get a different output.

Using set.seed() doesn't seem to help like with the topicmodels package.

Assuming an identical input, is there a way to ensure that identical topics are found on subsequent executions of the code?

I execute the function as follows:

set.seed(11)
fit1 <- lda.collapsed.gibbs.sampler(documents = documents, K = topics, vocab = vocab,
                               num.iterations = iterations, alpha = alpha,
                               eta = eta, initial = NULL, burnin = 500,
                               compute.log.likelihood = TRUE)
Community
  • 1
  • 1
Apex14
  • 15
  • 3

0 Answers0