multiclass - type_of_target returning 'multiclass-output" despite size being 1? #19629
Unanswered
rollerman111
asked this question in
Q&A
Replies: 1 comment
-
It's still a 2D array, meaning a numpy with 2 axis: >>> y = np.array([[1,2,3]])
>>> y.ndim
2
>>> y.shape
(1, 3) The first axis has size 1 and is expected to represent the number of samples. The second axis has size 3 and is expected to represent number of targets. If you want to do traditional (single target) multiclass, please just pass the column you want directly as a 1D array. For instance |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
From the doc
but
Isn't this a 1 x 3 array. Both their dimension do not satisfy size > 1 (column does row doesn't)
What am I not understanding?
Beta Was this translation helpful? Give feedback.
All reactions