I know that LIBSVM only allows one-vs-one classification when it comes to multi-class SVM. However, I would like to tweak it a bit to perform one-against-all classification.
From the code I can see you are trying to first turn the labels into "some class" vs "not this class", and then invoke LibSVM to do training and testing. Some questions and suggestions:
TrainingLabel
for training? In my opinion, should it be model = svmtrain(newClass, TrainVec, '-c 1 -g 0.00154');
?-b
switch in LibSVM to enable probability output will also improve the accuracy.