Multiclass predictions #27048
Unanswered
muriloasouza
asked this question in
Q&A
Replies: 1 comment
-
This might be a bug. If you can still reproduce with a minimal example, you can open an issue. |
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
-
I have a multiclass problem, that contains twelve classes (Class
0
,1
,2
, ...,11
). Myx_train
has shape(31187, 36)
andy_train
has shape(31187,)
.Here is an example of my
y_train
array which contain the classes of each sample of my train dataset:I have used
LabelBinarizer()
as follows to encode my output into a one-hot-encode format:And got this output from it:
I then proceed to train my classifier:
Here is my question. When using the
predict
method, why some samples does not comes in theLabelBinarizer
format (one-hot-encoded)?For example, to following sample (sample
8
) of myx_test
dataset, yields this:But, according to the encode I have done, I was expecting to get this array instead?
If I check which class that is, using the
inverse_transform
method, I get class0
as output:This does not happens all the time, some samples (for example, sample
42
), does actually return what I expect:Which is the class
0
:What could be the cause of this? What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions