Query using Support vector machines

2 views (last 30 days)
Ampi
Ampi on 3 Dec 2012
Hello, I am attaching a code below for training using SVM for Faces. But i am not getting any plot & also the recognition rate is only 50%. Can you solve the problem? I am attaching the basic code below:-
In training matrix i have taken 2 rows each row has 2 samples of a individual. Now i have fixed the target matrix at:-
target(1:2,:)=1
target(3:4,:)=2
Now i am training the data as follows:-
svmModel = svmtrain(arr1', labelData, ...
'Autoscale',true, 'Showplot',true, 'Method','QP', ...
'BoxConstraint',2e-1, 'Kernel_Function','rbf', 'RBF_Sigma',1);
classes = svmclassify(svmModel,finaltest,'showplot','true')
cp = classperf(cp, classes, finaltest')
1) I am getting the error:-
Error using classperf (line 373)
Index vector has invalid values.
Error in Svmtrain2 (line 205)
cp = classperf(cp, classes, finaltest')
2) Please tell me how ti increase the recognition rate?
3) Please tell me how to view the classification plot of SVM ?
Thanks in advance
Ampi.

Answers (0)

Community Treasure Hunt

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

Start Hunting!