Scikit learn multi-class classification for support vector machines
Asked Answered
U

1

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())
Unearth answered 30/3, 2015 at 5:19 Comment(2)
Kindly Edit your Question...Polysyllabic
All classifiers in scikit-learn do: scikit-learn.org/dev/modules/multiclass.htmlLarina
A
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.

Anaplasty answered 30/3, 2015 at 9:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.