如何知道我的潜在狄利克雷分配课程?

时间:2019-05-29 13:38:02

标签: python scikit-learn lda unsupervised-learning

我正在使用sklearn,这是到目前为止的代码:

from sklearn.decomposition import LatentDirichletAllocation
lda_model = LatentDirichletAllocation(n_components=5, learning_method='online', max_iter=2

X_topics = lda_model.fit_transform(X)
topic_word = lda_model.components_ 

#vectorizer is from countVectorizer
y=vectorizerN.transform(["some text here"])

lda_model.transform(y)

array([[0.05000144, 0.05000128, 0.05000162, 0.05000113, 0.79999453]])

现在,它仅向我显示这5个概率,但是我怎么知道我的课程是什么?

0 个答案:

没有答案