我想知道LinearSVC
默认情况下是否支持多类分类,或者我们是否必须将其包装在OneVsRestClassifier
中,例如:
OneVsRestClassifier(LinearSVC())
最佳答案
根据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:
所以它默认支持多类分类。
关于machine-learning - Scikit 学习支持向量机的多类分类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29338872/