我正在尝试对我的数据进行线性回归。但是我有一个数据重塑的问题。我有个错误:
array=[1547977519 1547977513].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
这是我的代码:
^{pr2}$我试着添加。整形,但它不能正常工作。它给了我一个错误:
X = X.reshape(-1, 1)
AttributeError: 'list' object has no attribute 'reshape'
您要查找的是
numpy.array
,它的方法是reshape
相关问题 更多 >
编程相关推荐