tfidf矢量化器和tfidf变压器有什么区别 [英] what is the difference between tfidf vectorizer and tfidf transformer

查看:117
本文介绍了tfidf矢量化器和tfidf变压器有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道tfidf vectorizer的公式是

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

我看到scikit中有一个tfidf转换器学习,我只是想区别一下它们.我找不到任何有用的东西.

I saw there's tfidf transformer in the scikit learn and I just wanted to difference between them. I could't find anything that's helpful.

推荐答案

TfidfVectorizer 用于句子,而 在现有的计数矩阵上使用 TfidfTransformer ,例如 CountVectorizer

TfidfVectorizer is used on sentences, while TfidfTransformer is used on an existing count matrix, such as one returned by CountVectorizer

这篇关于tfidf矢量化器和tfidf变压器有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆