【发布时间】:2017-08-18 13:45:36
【问题描述】:
我正在使用 gensim LdaMulticore 提取主题。它在 Jupyter/Ipython 笔记本上运行良好,但是当我从命令提示符运行时,循环无限期地运行。 一旦执行到达 LdaMulticore 函数,执行从 first 开始。 请帮助我,因为我是新手
if __name__ == '__main__':
model = models.LdaMulticore(corpus=corpus_train, id2word=dictionary, num_topics=20, chunksize=4000, passes=30, alpha=0.5, eta=0.05, decay=0.5, eval_every=10, workers=3, minimum_probability=0)
**RESULTS:-**
Moving to Topics Extraction Script---------------------------------
2017-08-18 18:59:36,448 : INFO : using serial LDA version on this node
2017-08-18 18:59:37,183 : INFO : running online LDA training, 20 topics, 1 passes over the supplied corpus of 400 documents, updating every 12000 documents, evaluating every ~400 documents, iterating 50x with a convergence threshold of 0.001000
2017-08-18 18:59:37,183 : WARNING : too few updates, training might not converge; consider increasing the number of passes or iterations to improve accuracy
2017-08-18 18:59:37,183 : INFO : training LDA model using 3 processes
2017-08-18 18:59:37,214 : INFO : PROGRESS: pass 0, dispatched chunk #0 = documents up to #400/400, outstanding queue size 1
Importing required Packages
【问题讨论】:
-
我只是想说我有同样的问题,但反过来。我可以在终端上运行 Ldamulticore,但如果我在 Jupyter 笔记本上运行,循环会无限运行。
标签: python nlp multicore gensim lda