首页 > 解决方案 > gensim LDA 输出

问题描述

有人可以解释一下 gensim LDA 输出的每个元素的含义吗?例如,我有一个训练有素的 LDA,现在我想获得未见文档的主题分布。

other_texts = [['computer', 'time', 'graph'],
    ['survey', 'response', 'eps'],
    ['human', 'system', 'computer']]




id2word_unseen = corpora.Dictionary(other_texts) # словарь

corpus_word_freq_unseen = [id2word.doc2bow(text) for text in other_texts]


unseen_doc = corpus_word_freq_unseen[0]
vector = LDA[unseen_doc]  # get topic probability distribution for a document

向量变量由

([(0, 0.020873228),
  (1, 0.012368388),
  (2, 0.029045772),
  (3, 0.01218763),
  (4, 0.8807166),
  (5, 0.0141737955),
  (6, 0.010576158),
  (7, 0.020058472)],
 [(2118, [4]), (9354, [4])],
 [(2118, [(4, 0.99984014)]), (9354, [(4, 0.9996126)])])

第一个元素是分布,但我不明白其他元素的含义。谢谢!

标签: pythonnlplda

解决方案


推荐阅读