Search code examples
gensimldatopic-modeling

How can you pass a pretrainend LDA Model to ldaseq in Gensim for DTM?


I have a tuned and pretrainend LDA Model that I want to pass on to the ldaseq model in gensim, but don't understand how to do it. I've tried lda_model and sstats but it doesn'T seem to work, I still get this from the logging:

running online (multi-pass) LDA training, 10 topics, 10 passes over the supplied corpus of 1699 documents, updating model once every 1699 documents, evaluating perplexity every 1699 documents, iterating 50x with a convergence threshold of 0.001000


Solution

  • In case anyone ever wonders this: initialize='own' you need to supply sstats of the previously trained model in the shape (vocab_len, num_topics), and initialize='lda_model' you need to supply the previously trained lda model.

    I found the answer here