libSVM for multiclass classification in Matlab

1 回表示 (過去 30 日間)
Sepp
Sepp 2015 年 6 月 18 日
回答済み: med djo 2017 年 1 月 17 日
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?

回答 (1 件)

med djo
med djo 2017 年 1 月 17 日
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??

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by