Reputation: 101
I want to know whether LinearSVC
supports multi-class classification by default or do we have to wrap it in OneVsRestClassifier
like:
OneVsRestClassifier(LinearSVC())
Upvotes: 1
Views: 2745
Reputation: 43477
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.
Upvotes: 5