Topic Modelling in Python



Hi, I went across a site at analyticsvidhya,
It is about topic modelling in Python and it uses Gensim.

There is a particular line of code. Which i dont quite understand it.

ldamodel = Lda(doc_term_matrix, num_topics=3, id2word = dictionary, passes=50)

What is the ‘passes=50’ about? Please help!



Passes controls how often we train the model on the entire corpus. It controls how often we repeat a particular loop over each document. It is important to set the number of “passes” high enough. We just have to make sure that by the final passes, most of the documents have converged.

Hope this helps!!


Hi PulkitS,

Thanks for the explanation!!! it really helps!!