In LDA model generates different topics everytime i train on the same corpus , by setting the np.random.seed(0)
, the LDA model will always be initialized and tr
As per the docs of Gensim, for executing a fully deterministically-reproducible run, you must also limit the model to a single worker thread, to eliminate ordering jitter from OS thread scheduling.
A simple parameter edit to your code should do the trick.
model = Word2Vec(sentences, size=10, window=5, min_count=5, workers=1)