How to make SVM with three group or multiple class

i want make classification SVM with 3 group. but i know classification SVM only match for 2 group or class. There is a way that can make SVM classification with 3 group or class? This is my code :
GLCM2 = graycomatrix(I3,'Offset',[4 4]);
stats = graycoprops(GLCM2,{'contrast','homogeneity','energy','Correlation'})
a = stats.Contrast;
b = stats.Correlation;
c = stats.Energy;
d = stats.Homogeneity;
set(handles.edit1, 'String',a);
set(handles.edit2, 'String',b);
set(handles.edit3, 'String',c);
set(handles.edit4, 'String',d);
load class_uji2.txt;// document text class or group with three class {0,1,2}
load data_uji2.txt;// document text data glcm result
uji1=data_uji2(:,1:2:3:4);
massa = svmtrain(uji1,class_uji2)
uji = svmclassify(massa, [a b c d])
if uji == 0
hasil = 'Normal'
else if uji == 1
hasil = 'Biasa'
else
hasil = 'kanker'
end
end
set(handles.edit5, 'String',hasil);

 採用された回答

Walter Roberson
Walter Roberson 2016 年 8 月 16 日
編集済み: Walter Roberson 2016 年 8 月 18 日

0 投票

1 件のコメント

Abdul Latif
Abdul Latif 2016 年 8 月 18 日
can you help me to give me the solution source code above? because I am confused with the existing instance.Thank you Walter

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeAI for Signals についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by