An SVM implementation that supports non-linear cores and multi-link labels in a one-against-rest mode

I am looking for an implementation of SVM with support for non-linear cores and a one-against-rest scenario to perform multi-label classification. Preferably written in Python, or that I can call from Python with wrappers.

I looked at sklearn, and there are two possibilities to use SVM for classification:

sklearn.svm.LinearSVC - supports multi - label classification with a one-against-rest scenario, but it is based on liblinear and therefore only supports linear kernels.

sklearn.svm.SVC - based on libsvm, supports non-linear kernels, but classification with several labels is performed with a single reduction, it trains the binary classifiers K (K - 1) / 2 for the multiclass K-way problem.

More details here: http://scikit-learn.org/stable/modules/multiclass.html

Does anyone know of any other SVM implementations that directly support multi-label classification and non-linear kernels?

One of the possible solutions could also be to adapt the code based on sklearn.svm.SVC to perform One-vs-Rest, has this already been taken before?

+4
source share
1 answer

"--" . SVM , scikit-multilearn. python, , train_y , (, [0,0,1,0,1,0])

from skmultilearn.problem_transform.br import BinaryRelevance
from sklearn.svm import SVC

# Non-linear kernel
svm = SVC(kernel='rbf')
cls = BinaryRelevance(classifier=svm)

cls.fit(train_x, train_y)
predictions = cls.predict(test_x)
+1

Source: https://habr.com/ru/post/1672806/


All Articles