LDA主题一致性指标为什么每次跑出来的结果不一样?
if __name__ == '__main__':
dictionary = corpora.Dictionary(cut_word_list)
doc_term_matrix = [dictionary.doc2bow(rev) for rev in cut_word_list]
modellist,coherence_values = compute_coherence_values(dictionary=dictionary, corpus=doc_term_matrix, texts=cut_word_list, start=3, limit=15, step=1)
limit=15; start=3; step=1;
x = range(start, limit, step)
plt.plot(x, coherence_values)
plt.xlabel("主题数")
plt.ylabel("主题得分")
plt.legend(("coherence_values"), loc='best')
plt.show()