将pyLDAvis与自定义模型一起使用

时间:2019-04-13 08:25:11

标签: python nlp data-visualization lda

我有一个训练有素的自定义LDA模型(希伯来语),并且我想使用pyLDAvis对其进行可视化。

我指的是文档和以下资源:

但是我仍然不明白prepare方法的输入是什么样子。

topic_term_dists:array-like, shape (n_topics, n_terms)
Matrix of topic-term probabilities. Where n_terms is len(vocab).

doc_topic_dists :array-like, shape (n_docs, n_topics)
Matrix of document-topic probabilities.

doc_lengths :array-like, shape n_docs
The length of each document, i.e. the number of words in each document. The order of the numbers should be consistent with the ordering of the docs in doc_topic_dists.

vocab :array-like, shape n_terms
List of all the words in the corpus used to train the model.

term_frequency :array-like, shape n_terms
The count of each particular term over the entire corpus. The ordering of these counts should correspond with vocab and topic_term_dists.

有人为这些输入提供示例吗?谢谢

0 个答案:

没有答案