【问题标题】:Negative Values: Evaluate Gensim LDA with Topic Coherence负值:使用主题连贯性评估 Gensim LDA
【发布时间】:2018-05-30 14:34:49
【问题描述】:

我目前正在尝试使用 gensim topiccoherencemodel 评估我的主题模型:

from gensim.models.coherencemodel import CoherenceModel
cm_u_mass = CoherenceModel(model = model1, corpus = corpus1, coherence = 'u_mass')
coherence_u_mass = cm_u_mass.get_coherence()

print('\nCoherence Score: ', coherence_u_mass)

输出只是负值。它是否正确?任何人都可以提供一个公式或 u_mass 的工作原理吗?

【问题讨论】:

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


    【解决方案1】:

    快速查看original article,您会发现 UMass 相干性是根据概率对数计算得出的,因此它是负数。

    关于你问的公式,可以找到公式4in the same article

    我了解,随着 UMass 连贯性的值接近 0,主题连贯性会变得更好。

    希望这会有所帮助。

    【讨论】:

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