如何获得两个模型的主题一致性得分,然后将其用于比较?

时间:2019-04-15 19:37:54

标签: lda topic-modeling

我想获得LDA模型的主题一致性。假设我有两个LDA模型,一个带有一袋单词,另一个带有一个短语。如何获得这两个模型的一致性,然后在一致性的基础上进行比较?

1 个答案:

答案 0 :(得分:0)

对于两个单独的模型,您可以分别检查一致性。您应该发布一些代码,但这是检查一致性的方法:

# Compute Coherence Score
coherence_model_ldamallet = CoherenceModel(model=ldamallet, texts=processed_docs, dictionary=dictionary, coherence='c_v')
coherence_ldamallet = coherence_model_ldamallet.get_coherence()
print('\nCoherence Score: ', coherence_ldamallet)

如果您想进行比较,请查看用于优化连贯性的肘法:17我希望这会有所帮助

相关问题