腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
Python ():为什么我们必须将
CountVectorizer
()赋值给一个变量以使其工作?
、
、
、
、
以下是初始代码:corpus = ['This is the first document# WORKING: assigning a variable "vectorizer" for
CountVectorizer
()X =>>> ['and', 'document'
浏览 5
提问于2022-04-27
得票数 1
1
回答
get_feature_names
()不适用于使用sikit learn的
CountVectorizer
()生成的稀疏矩阵
、
、
、
我正在处理亚马逊精品食品评论数据集,在所有预处理之后,我尝试对我的数据(
在
熊猫数据框
中
)使用
CountVectorizer
()函数,我想知道稀疏矩阵的列的名称,但当我使用
get_feature_names
()函数时,它给出一个错误消息:"AttributeError:
get_feature_names
not found“。下面是代码 from sklearn.feature_extraction.text import
CountVectorizer
count_vec =
浏览 246
提问于2021-09-06
得票数 0
1
回答
在
countvectorizer
()
中
找不到
get_feature_names
、
、
、
我想在我的语料库
中
识别停用的单词(比如“python”)。我想要获得我的特征名称,这样我就可以识别出词频最高的单词。pytorch_doc += row[3] + ' ' vectorizer =
CountVectorizer
sparse/base.py", line 686, in __getattr__ raise AttributeError(attr + " not found")
浏览 1027
提问于2019-04-05
得票数 1
回答已采纳
3
回答
从sklearn特征联合
中
获取特征
、
我认为我需要在自定义transformer -
中
定义一个'
get_feature_names
‘函数。('pipeline_1', Pipeline([ ('vectorise',
CountVectorizer
('pipeline_2', Pipeline([ ('selector
浏览 13
提问于2017-12-28
得票数 1
回答已采纳
1
回答
为什么文本的特征提取不返回所有可能的特征名?
、
、
、
、
以下是书中的代码片段from sklearn.feature_extraction.text import
CountVectorizer
one_hot_vectorizer =
CountVectorizer
()vocab的值: vocab = ['an', 'arro
浏览 0
提问于2019-03-04
得票数 2
回答已采纳
3
回答
AttributeError: getfeature_names未找到;使用scikit-学习
、
、
from sklearn.feature_extraction.text import
CountVectorizer
vectorizerThe num of words = ",len(voc_words)getattr<e
浏览 5
提问于2015-07-26
得票数 4
1
回答
如何使用python的sklearn
在
文本文件
中
查找关键字
、
、
、
、
为了做到这一点,我正在努力寻找工作列表中使用的关键字,我可以将这些关键字添加到我的简历
中
,使其
在
通过ATS运行时脱颖而出。目前,我正在使用以下代码来查找与我的简历匹配的百分比是多少。我如何使用这种比较,并找到如何通过职位列表
中
的特定关键字来改进我的简历?from sklearn.feature_extraction.text import
CountVectorizer
from sklearn.metrics.pairwise import cosine_similarityreference = open("
浏览 0
提问于2020-10-14
得票数 0
1
回答
在
创建
CountVectorizer
对象的上下文中,对象是什么意思?
、
、
示例:创建
CountVectorizer
对象意味着什么?第三行做什么,最后
在
第四行,为什么我不能使用print((X.get_feature_names()))来查看特性名称?from sklearn.feature_extraction.text import
CountVectorizer
cv =
CountVectorizer
(stop_words=my_list) #create a
countvectorizer
object
浏览 18
提问于2020-04-02
得票数 0
回答已采纳
1
回答
统计文档
中
的ngram频率
、
、
、
、
我想数一数我的语料库
中
每一份文件的数量,以便删除那些在所有文件中最常见的文件(例如,出现在10多个不同文件
中
的文件)。
浏览 3
提问于2021-04-19
得票数 0
回答已采纳
1
回答
Sklearn学习如何从每个主题获取10个单词
、
、
我想从每个主题中获得前10个单词的频率,
在
我使用TfidfTransformer之后,我得到:并且类型是scipy.sparse.csr.csr_matrix 但我不知道如何从每个列表
中
获得前十个,在数据
中
浏览 1
提问于2018-11-08
得票数 0
1
回答
scikit -learn管道的特性重要性
、
、
Book_contents= Pipeline([('selector', ItemSelector(key='Book')), ('tfidf',
浏览 0
提问于2018-09-10
得票数 2
2
回答
如何在python中使用HashingVectorizer获取特性名称?
、
使用
CountVectorizer
后,我会收到内存错误。那么,还有其他方法(比如迷你批次)来做这件事吗? 如果我使用HashingVectorizer,那么如何获得feature_names?,因为
get_feature_names
()方法
在
HashingVectorizer
中
不可用。
浏览 1
提问于2014-04-04
得票数 5
1
回答
使用
countVectorizer
计算我自己
在
python
中
的词汇量
、
我尝试使用
countVectorizer
,如下所示:doc_set = [Doc15619) 1(0, 5012) 1(0, 996) 1其中,第一列是文档ID,第二列是词汇表
中
的单词ID,第三列是该单词
在
该文档
中
的出现次数。我知道
在
一天结束的时候,我可以写一段代码
浏览 51
提问于2018-04-03
得票数 4
回答已采纳
2
回答
为什么这个
CountVectorizer
输出与我的字数不同?
、
、
、
我尝试使用以下代码这样做:vectorizer.fit(film['Phrase']) print(vectorizer.vocabulary我是否误解了
CountVectorizer
对象在做什么?
浏览 1
提问于2019-03-27
得票数 0
回答已采纳
2
回答
从Scikit
中
的管道
中
检索中间特性(Python)
、
、
我使用的管道非常类似于给定的:...但是,我希望使用
get_feature_names
()方法从
CountVectorizer
()获得培训集的列名。如果不在管道之外实现
CountVectorizer
(),这是可能的吗?
浏览 1
提问于2015-10-12
得票数 7
回答已采纳
1
回答
Sklearn TFIDF向量器线程安全吗?
、
、
tfidf = TfidfVectorizer(tokenizer=ner_tokenizer, stop_words='english')我现在想在多线程
中
执行
浏览 9
提问于2018-01-24
得票数 0
回答已采纳
2
回答
如何从Sklearn管道中提取特征重要性
、
、
、
、
我已经
在
Scikit-Learn
中
构建了一个管道,包括两个步骤:一个是构建功能,第二个是RandomForestClassifier。虽然我可以保存该管道,但可以查看各个步骤和步骤
中
设置的各种参数,我希望能够检查结果模型
中
的特征重要性。 这有可能吗?
浏览 0
提问于2016-08-05
得票数 17
3
回答
用特征名可视化决策树
、
我的问题是:我想在输出
中
获得特征名,而不是X2599、X4等索引。我知道可以通过vect.get_feature_names()作为export_graphviz的输入,vect是
CountVectorizer
()的对象,因为我已经使用h堆栈合并了这个矢量化数据。现在如何在这个决策树
中
获得特征名?
浏览 0
提问于2019-03-23
得票数 1
1
回答
CountVectorizer
的词条化不移除词组
、
、
、
、
我正试图从短剧-学习
中
向
CountVectorizer
添加Lematization,如下所示from pattern.es import lemmafrom nltk.corpus import stopwords return [lemma(t) for t in wo
浏览 1
提问于2018-05-03
得票数 5
回答已采纳
1
回答
AttributeError:“管道”对象没有属性“
get_feature_names
”
、
、
、
Pipeline(steps=[('CV',我正在尝试获取特征名:features_df 但是
浏览 9
提问于2021-05-17
得票数 0
回答已采纳
点击加载更多
相关
资讯
Shopee在越南,几乎找不到对手
中怎么找不到“确认签名”的按钮?
CAD中找不到点怎么办?
在安康找不到车位?它能帮你找!
和平精英:在纷乱的枪声中找不到北?学会这些小技巧,轻松上皇冠
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
智聆口语评测
活动推荐
运营活动
广告
关闭
领券