[R] Non-reproducible LDA results across machines

Jeanne Moreau more@uje@nne02 @end|ng |rom gm@||@com
Fri Oct 3 11:57:46 CEST 2025


Good Morning,

I am working with LDA models in R (using both topicmodels::LDA and
quanteda::textmodel_lda) and noticed that the results differ slightly
across different machines, even when I use set.seed(1234) and the same
dataset.

So, I have a few questions:
Is this expected due to BLAS/LAPACK or low-level random number generation
differences?
Is there a recommended way to enforce bit-for-bit reproducibility of LDA
results across machines in R?
Would you recommend always saving fitted models with saveRDS() to ensure
reproducible outputs instead of re-fitting?

Thanks a lot for your guidance.

Best regards,

Jeanne Moreau

	[[alternative HTML version deleted]]



More information about the R-help mailing list