I am currently trying to classify 6 class of facial expression using SVM. I am using MATLAB and LIBSVM to do my classification.
The problem i face is the pred label below produces 0 and 1. It treats it as binary classifer. I am able to do multi-class svm but there is one more step that is voting or sum-pooling which i am not sure how to do it. Need some help in it.
u=unique(TrainLabel); N=length(u); if(N>2) itr=1; classes=0; while((classes~=1)&&(itr<=length(u))) c1=(TrainLabel==u(itr)); newClass=double(c1); tst = double((TestLabel == itr)); model = svmtrain(newClass, TrainVec, '-c 1 -g 0.00154'); [predict_label, accuracy, dec_values] = svmpredict(tst, TestVec, model); itr=itr+1; end itr=itr-1; end
Any help is appreciated