libSVM for multiclass classification in Matlab

조회 수: 3 (최근 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 CenterFile Exchange에서 Statistics 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