Gensim LDA - Default Iteration Count

I want to know the default iteration number in Lada (Latent Dirichlet Allocation) algorithm in gensim . I don't think the documentation says it. (The number of iterations is indicated by the iteration parameter when the LdaModel is initialized ). Thank!

+3


source to share


3 answers


Check the module files in the python / Lib / site-packages directory. The constructor looks something like this:

def __init__(self, corpus=None, num_topics=100, id2word=None,
                 distributed=False, chunksize=2000, passes=1, update_every=1,
                 alpha='symmetric', eta=None, decay=0.5, offset=1.0,
                 eval_every=10, iterations=50, gamma_threshold=0.001)

      



Thus, the default number of iterations is 50.

+2


source


If you are using:

import logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', 
    level=logging.INFO)

      



He will tell you

running batch LDA training, 17 topics, 10 passes over the supplied corpus of 1130 documents, updating model once every 1130 documents, evaluating perplexity every 1130 documents, iterating 50x with a convergence threshold of 0.001000

      

+1


source


Default iteration count = 50

0


source







All Articles