I recently had a discussion about machine learning. They said that they had problems with "accuracy" of the classifier, as far as I understood they used SVM. To solve the problem, they then switched the class label. The classifier has two classes, class A was labeled with 0 while class B was labeled with 1, so after the switch class A would be 1 and class B 0. But they would not change the definition, that samples with label 1 are "positive" and label 0 corresponds to a "negative" result.

They stated, that this switch alone increased the "accuracy" of the classifier. I write "accuracy", as I'm not sure if they actually meant the metric.

I do not see a reason why switching the class label should have any influence on the classifier. All you should see is, that the confusion matrix flips around, as you changed somehow the definition of "positive" and "negative" classes. Hence, also the metrices like precision and recall change, but the accuracy should stay the same.

But maybe I'm missing something here. Are there any classifiers which will have different results depending on the labeling of the classes?


It should have zero influence.

If your classifier (or its results) depend on whether you label your instances "0" and "1" versus "TRUE" and "FALSE" versus "vanilla" versus "chocolate", then something is very wrong. It may be that they inadvertently included the label as a feature, which defeats the purpose.

| cite | improve this answer | |
  • $\begingroup$ Thanks for the clarification. no, I really hope that they did not use the label as a feature.. $\endgroup$ – reox Jul 11 '19 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.