tfidf矢量化器和tfidf变压器有什么区别

问题描述 投票:0回答:1

我知道tfidf vectorizer的公式是

Count of word/Total count * log(Number of documents / no.of documents where word is present)

我看到scikit中有tfidf变换器学习,我只是想区分它们。我找不到任何有用的东西。

python scikit-learn nltk tf-idf tfidfvectorizer
1个回答
3
投票

TfidfVectorizer用于句子,而TfidfTransformer用于现有的计数矩阵,例如CountVectorizer返回的计数矩阵

© www.soinside.com 2019 - 2024. All rights reserved.