You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
这是什么问题呢???
Traceback (most recent call last):
File "xgb.py", line 58, in
dataset3_preds.label = MinMaxScaler().fit_transform(dataset3_preds.label)#区间缩放到[0,1]
File "/home/cxy/anaconda3/lib/python3.6/site-packages/sklearn/base.py", line 518, in fit_transform
return self.fit(X, **fit_params).transform(X)
File "/home/cxy/anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/data.py", line 308, in fit
return self.partial_fit(X, y)
File "/home/cxy/anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/data.py", line 334, in partial_fit
estimator=self, dtype=FLOAT_DTYPES)
File "/home/cxy/anaconda3/lib/python3.6/site-packages/sklearn/utils/validation.py", line 410, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[-0.21156955 0.33369869 -0.30134243 ..., 0.08833629 -0.15614033
0.31751922].
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.
The text was updated successfully, but these errors were encountered:
这是什么问题呢???
Traceback (most recent call last):
File "xgb.py", line 58, in
dataset3_preds.label = MinMaxScaler().fit_transform(dataset3_preds.label)#区间缩放到[0,1]
File "/home/cxy/anaconda3/lib/python3.6/site-packages/sklearn/base.py", line 518, in fit_transform
return self.fit(X, **fit_params).transform(X)
File "/home/cxy/anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/data.py", line 308, in fit
return self.partial_fit(X, y)
File "/home/cxy/anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/data.py", line 334, in partial_fit
estimator=self, dtype=FLOAT_DTYPES)
File "/home/cxy/anaconda3/lib/python3.6/site-packages/sklearn/utils/validation.py", line 410, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[-0.21156955 0.33369869 -0.30134243 ..., 0.08833629 -0.15614033
0.31751922].
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.
The text was updated successfully, but these errors were encountered: