1

I want to know whether LinearSVC supports multi-class classification by default or do we have to wrap it in OneVsRestClassifier like:

 OneVsRestClassifier(LinearSVC())
e1s
  • 335
  • 4
  • 22
Smith Patterson
  • 101
  • 2
  • 3

1 Answers1

5

According to this part of the documentation:

SVC, NuSVC and LinearSVC are classes capable of performing multi-class classification on a dataset.

[...]

On the other hand, LinearSVC implements “one-vs-the-rest” multi-class strategy, thus training n_class models. If there are only two classes, only one model is trained:

So it supports multiclass classification by default.

Community
  • 1
  • 1
IVlad
  • 43,099
  • 13
  • 111
  • 179