mad*_*aks 1 python machine-learning topic-modeling nmf
这是我将使用的数据集的一部分:
u'tff prep normalized clean water permability ncwp result outside operating range',
u'technician inadvertently omitted documenting initial room \u201c cleaned sanitized field form',
u'sunflower seed observed floor room 1',
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的代码:
tfidf_model = vectorizer.fit_transform(input_document_lower)
tfidf_feature_names = vectorizer.get_feature_names()
nmf = NMF(n_components=no_topics, random_state=1, alpha=.1, l1_ratio=.5, init='nndsvd').fit(tfidf_model)
Run Code Online (Sandbox Code Playgroud)
就像标题所述,我收到以下错误:
IndexError: index 4 is out of bounds for axis 1 with size 4
Run Code Online (Sandbox Code Playgroud)
老实说,我不确定如何开始调试。我使用相同的数据集构建了一个 LDA,没有任何问题。任何帮助将非常感激
| 归档时间: |
|
| 查看次数: |
276 次 |
| 最近记录: |