【问题标题】:Is there any way to match Gensim LDA output with topics in pyLDAvis graph?有什么方法可以将 Gensim LDA 输出与 pyLDAvis 图中的主题相匹配?
【发布时间】:2017-09-01 18:33:05
【问题描述】:

我需要处理 LDA 输出中的主题 (lda.show_topics(num_topics=-1, num_words=100...),然后将我所做的与 pyLDAvis 图进行比较,但主题编号的编号不同。有吗我可以匹配它们的方法吗?

【问题讨论】:

    标签: python-3.x gensim lda topic-modeling


    【解决方案1】:

    如果它仍然相关,请查看文档http://pyldavis.readthedocs.io/en/latest/modules/API.html

    您可能希望将sort_topics 设置为False。这样在 gensim 和 pyLDAvis 中的主题顺序将是相同的。

    同时gensim的indexing从0开始,而pyLDAvis显示topic从1开始。 不确定是否有直接的方法来解决这个问题。

    【讨论】:

      猜你喜欢
      • 2017-02-19
      • 1970-01-01
      • 2021-12-03
      • 2020-12-25
      • 2017-03-24
      • 1970-01-01
      • 2013-06-23
      • 2015-11-25
      • 2017-03-07
      相关资源
      最近更新 更多