I'm using LIBSVM toolbox for Matlab. My problem is a binary classification problem with labels of 1 (True) and 0 (False). When I train my system with this function :
svmstruct = svmtrain(TrainTargets, TrainInputs,['-t 2 ' '-g ' SIGMA ' -c ' P ' -q' ' -b 1']);
and test my test accuracy with this function :
[TestOutputs, ~, ~] = svmpredict(TestTargets, TestInputs, svmstruct,'-b 1 -q');
Now I want use desined SVM model for out sample data. So I use this function :
[OUT, ~, Prob_Out] = svmpredict(zeros(size(Outsample_DATA,1),1), Outsample_DATA, svmstruct,'-q -b 1');
For my first trained model (I have trained SVM model with different parameters) I have this Output (Out sample data set is same in both cases) : [Prob_Out OUT]
0.8807 0.1193 0
0.8717 0.1283 0
0.0860 0.9140 1.0000
0.7846 0.2154 0
0.7685 0.2315 0
0.7916 0.2084 0
0.0326 0.9674 1.0000
0.7315 0.2685 0
0.3550 0.6450 1.0000
for second one I have this :
0.4240 0.5760 0
0.4090 0.5910 0
0.7601 0.2399 1.0000
0.5000 0.5000 1.0000
0.4646 0.5354 0
0.4589 0.5411 0
Suppose that I want find class 1 with these probabilities. In first group of data when column 2 is larger than column 1 this sample belongs to class 1 but in second group when column 1 is larger than column 2 the sample belongs to class 1.
The structure of these two out sample data is same. What is the problem?
Thanks.
PS. When I check SVMstruct parameters after training the model in on of these models Label is [0;1] and in another label is [1;0] !