
机器学习
he626shidizai
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
使用结巴分词时出现 'float' object has no attribute 'decode'
问题: word_neu = [] for c in comment_neu: #comment是一个pandas中的series word_neu.append(sent2word(c)) 运行代码出现问题:‘float’ object has no attribute ‘decode’ 很纳闷?怎么会出现float类型呢 然后百度找到一篇博客jieba分词出现如下错误:Attribu...原创 2019-01-11 22:32:04 · 2230 阅读 · 0 评论 -
Numpy:only integer scalar arrays can be converted to a scalar index
import numpy as np Y = np.concatenate(np.ones(10), np.zeros(10)) 今天运行这段代码的时候,报错: only integer scalar arrays can be converted to a scalar index 在网络上搜索之后发现,concatenate函数的原型为concatenate((a1, a2, …), axi...原创 2019-01-15 16:59:02 · 2868 阅读 · 1 评论 -
SVM TypeError: must be real number, not str
早上看sklearn的官网的svm部分,把代码复制粘贴到jupyter notebook中,但是执行代码 clf = SVC(gamma='scale') clf.fit(X, y)#在这里报错 却报错:TypeError: must be real number, not str 在网上找了半天没找到解决方法,我的sklearn版本为0.19.1 猜测是版本问题 然后我把参数改了之后就不会报错...原创 2019-01-21 14:47:02 · 7067 阅读 · 14 评论