尝试打印tfidf_vectorizer的功能时出现问题

时间:2018-06-09 12:06:25

标签: scikit-learn tf-idf tfidfvectorizer

print("stopwords are:")
print(tfidf_vectorizer.get_stop_words())
print("Features are:")
print(tfidf_vectorizer.get_feature_names())

此处停用词正在打印但在打印功能时出现此错误:

文件" C:\ Users \ HP \ Anaconda3 \ lib \ site-packages \ sklearn \ utils \ validation.py",第768行,在check_is_fitted中     引发NotFittedError(msg%{' name':type(estimator)。 name })

NotFittedError: TfidfVectorizer - Vocabulary wasn't fitted. 

0 个答案:

没有答案
相关问题