У меня есть фрейм данных (x_test
) формы (1672, 9376)
, и его объект:
<1672x9376 sparse matrix of type '<class 'numpy.float64'>'
with 14108 stored elements in Compressed Sparse Row format>
Я пытаюсь передать эти данные в метод score()
Склеарна против маркировки данных, например, так:
classifier.score(x_test, y_test)
Но я получаю эту ошибку:
ValueError: could not broadcast input array from shape (0) into shape (1672)
Мой y_test
имеет форму (1672,)
x_test
содержание
(Pdb) self.x_test[1,1]
0.0
(Pdb) self.x_test[1,2]
0.0
(Pdb) self.x_test[1,:]
<1x9376 sparse matrix of type '<class 'numpy.float64'>'
with 1 stored elements in Compressed Sparse Row format>