SO中文参考
首页
(current)
程序语言
c
java
python
c++
go
javascript
swift
c#
操作系统
linux
ubuntu
centos
unix
数据库
oracle
mysql
mongodb
postgresql
框架
node.js
angular
react-native
avalon
django
twisted
hadoop
.net
移动开发
android
ios
搜索
为什么会给我“预期的2D数组,取而代之的是1D数组”的错误,
问题描述
投票:0
回答:1
我使用了regressor.fit([X_train],[Y_train]),它确实起作用,但是当我运行下面的代码时,它给了我以下错误“ ValueError:形状(1,9)和(21, 21)未对齐:9(暗淡1)!= 21(暗淡0)“
请帮助
machine-learning
scikit-learn
linear-regression
1个回答
0
投票
问题在于选择的索引和尺寸。将x更改为
X = dataset.iloc[:, :-1].values
最新问题
列表理解仅输出 1 行,而不是按三角形数字序列输出多行
JAVA中如何从日期时间格式获取星期几?
阻止用户访问“表单发送确认页面”,除非他们通过表单到达那里
如何在 Laravel 中验证数组
为什么C的pow()比cpow()更精确?
DelegatingHandler 中的私有变量混合来自其他请求的值
在 Windows (emacs) 中使用 org-screenshot.el
如何获取vim中光标下高亮的组名?
使图像最小的一面用滚动条覆盖浏览器窗口
S3 策略创建帐户所有者可以读取的公共只写存储桶
更新信号后组件未更新
discord.py 赠品机器人问题
为什么我只能在 AVD / Xamarin 模拟器上选择 Webcam0?
即使在使用 os.getenv 后也无法从 env 打印 api 密钥
查找 pandas 数据框中剩余的行
汇编8086程序,使用16位算术将两个64位数字相加,然后显示结果
React Native 中没有重载与此调用错误匹配
为什么我的时间折叠优化没有正确执行硬约束?
在QTextEdit中使用对齐方式时如何消除阿拉伯字母之间的间隙
如何分析不同运行时间的算法的时间复杂度
© www.soinside.com 2019 - 2024. All rights reserved.