Python 3.x 负值:使用主题连贯性评估Gensim LDA

Python 3.x 负值:使用主题连贯性评估Gensim LDA,python-3.x,gensim,evaluation,topic-modeling,Python 3.x,Gensim,Evaluation,Topic Modeling,我目前正在尝试使用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 S

我目前正在尝试使用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是如何工作的吗?

快速查看一下,您可以看到,UMass相干度是通过概率对数计算出来的,因此它是负数

关于你问的公式,可以用方程4来表示

我理解,随着麻省理工学院连贯性的价值接近0,主题连贯性会变得更好


希望这有帮助

实际上,这篇原始文章是由David Mimno等人撰写的。