【发布时间】:2017-09-01 18:33:05
【问题描述】:
我需要处理 LDA 输出中的主题 (lda.show_topics(num_topics=-1, num_words=100...),然后将我所做的与 pyLDAvis 图进行比较,但主题编号的编号不同。有吗我可以匹配它们的方法吗?
【问题讨论】:
标签: python-3.x gensim lda topic-modeling
我需要处理 LDA 输出中的主题 (lda.show_topics(num_topics=-1, num_words=100...),然后将我所做的与 pyLDAvis 图进行比较,但主题编号的编号不同。有吗我可以匹配它们的方法吗?
【问题讨论】:
标签: python-3.x gensim lda topic-modeling
如果它仍然相关,请查看文档http://pyldavis.readthedocs.io/en/latest/modules/API.html
您可能希望将sort_topics 设置为False。这样在 gensim 和 pyLDAvis 中的主题顺序将是相同的。
同时gensim的indexing从0开始,而pyLDAvis显示topic从1开始。 不确定是否有直接的方法来解决这个问题。
【讨论】: