Definitely not. Because the classifier won't bother with how you name your classes, but how are they encoded.
Basically, if you can have only one class per input value, you can use one-hot encoding, that is for each input value you will have a target converted from the string "Cat", for example, to [0, 1]
given that you have two classes, where the other one is "Dog", which will become [1, 0]
.
Of course, this is by no means limited to 2 classes. You could have any N classes, be it in the order of tens or even hundreds, but the idea still applies, one 1
and N-1 0
s.
You could also convert your classes to integers, some algorithms can work with that too.
Now, if you can have multiple classes per input value, you could for example encode them as 1
for each class position in the target vector and 0
s for the rest.
Let's say you have the following classes: Has fur, Is carnivorous, Feeds alone. Then a lion would have the target value encoded as [1, 1, 0]
, and a sheep will correspond to [1, 0, 0]
.
Hope this answers your question.