git.schokokeks.org
Repositories
Help
Report an Issue
SVMCrossVal.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
0e963b3
Branches
Tags
master
SVMCrossVal.git
private
svm_crossval.m
snapshot, classification
Christoph Budziszewski
commited
0e963b3
at 2009-03-02 18:28:41
svm_crossval.m
Blame
History
Raw
function decodePerformance = svm_crossval(svmlabel,svmdata,svmopts) addpath 'libsvm-mat-2.88-1'; 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