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
The following code seems problematic: it turns x_data into 3D array and thus cv.split_train_test reports error:
x_data = numpy.array([data[i:i+max_len,:] for i in xrange(len(data)-max_len)])
y_data = numpy.array([data[i][0] for i in xrange(max_len , len(data))])
y_data, test_size=0.3, random_state=0)
File "/usr/lib/python2.7/dist-packages/sklearn/cross_validation.py", line 1556, in train_test_split
arrays = check_arrays(_arrays, *_options)
File "/usr/lib/python2.7/dist-packages/sklearn/utils/validation.py", line 287, in check_arrays
array.ndim)
ValueError: Found array with dim 3. Expected <= 2
The text was updated successfully, but these errors were encountered:
The following code seems problematic: it turns x_data into 3D array and thus cv.split_train_test reports error:
x_data = numpy.array([data[i:i+max_len,:] for i in xrange(len(data)-max_len)])
y_data = numpy.array([data[i][0] for i in xrange(max_len , len(data))])
File "/usr/lib/python2.7/dist-packages/sklearn/cross_validation.py", line 1556, in train_test_split
arrays = check_arrays(_arrays, *_options)
File "/usr/lib/python2.7/dist-packages/sklearn/utils/validation.py", line 287, in check_arrays
array.ndim)
ValueError: Found array with dim 3. Expected <= 2
The text was updated successfully, but these errors were encountered: