I want to know whether LinearSVC
supports multi-class classification by default or do we have to wrap it in OneVsRestClassifier
like:
OneVsRestClassifier(LinearSVC())
I want to know whether LinearSVC
supports multi-class classification by default or do we have to wrap it in OneVsRestClassifier
like:
OneVsRestClassifier(LinearSVC())
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.
© 2022 - 2024 — McMap. All rights reserved.