Effacer les filtres
Effacer les filtres

libSVM for multiclass classification in Matlab

4 vues (au cours des 30 derniers jours)
Sepp
Sepp le 18 Juin 2015
Hello
I want to use libSVM with Matlab for a classification problem with 4 classes.
1. I think libSVM does not support one-vs-all natively. I found two approaches to do one-vs-all:
Which one is better to use and which one works with non-linear SVM (rbf kernel)?
2. There is another way for doing one-vs-all, namely using the weight vectors w. That means I train a SVM for all classes (one-vs-all), in the end I have 4 SVMs (4 classes) and 4 weight vectors: w1, w2, w3, w4. For the test data x I calculate now just w1'*x, w2'*x, w3'*x and w4'*x and pick the class with the highest value, e.g. if w1'*x gives the highest value I will pick class 1.
Would this also work for non-linear SVM?

Réponses (1)

med djo
med djo le 17 Jan 2017
if you will be able to do this, it will give you the answer Sir .... Assuming that you have three different classes (1,2,3). The first class contains two samples, the second contain one, the third contain one. From each class, you will extract two values (Average and median) of the color (for example). It will give you that: classe 1: (15, 20) classe 1: (16, 21) classe 2: ( 18, 22) classe 3: (22, 24) . On matlab, we make a matrix (Matrix for learning), which contains two columns, four lines and which contain (15, 20; 16, 21;18, 22; 22, 24). And we made a matrix composed of a single column (label matrix), this matrix (1, 1, 2, 3). We execute learning SVM with SVMtrain from libSVM. The parameters I have given you as an example correspond to the RBF kernel. The gamma value, c (varies between 10 and 100,000). Can you execute this scenario in Matlab using LibSVM??

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by