private/svm_class_performance.m
c73e97a6
 function decodePerformance = svm_class_performance(svmlabel,svmdata,svmopts)
48fb1827
 global NODALYZE_LIBSVM;
 addpath(fullfile(getTbxPath,NODALYZE_LIBSVM));
0e963b35
 
 svmmodel = svmtrain(svmlabel,svmdata,svmopts);
 classperformance = [];
 for class = unique(svmlabel)';
 
     filterindex = find(class == svmlabel);
     testing_label = svmlabel(filterindex);
     testing_data  = svmdata(filterindex);
     [plabel accuracy dvalue] = svmpredict(testing_label,testing_data,svmmodel,'');
 
     classperformance = [classperformance accuracy(1)];
 end
 decodePerformance = [decodePerformance; classperformance];
 end