Topic Modelling in Python

machine_learning
python
gensim

#1

Hi, I went across a site at analyticsvidhya,
https://www.analyticsvidhya.com/blog/2016/08/beginners-guide-to-topic-modeling-in-python/
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!


#2

Hi,

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!!


#3

Hi PulkitS,

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