Browse code

new labels, some cleanup

git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@206 83ab2cfd-5345-466c-8aeb-2b2739fb922d

Christoph Budziszewski authored on07/08/2009 17:23:37
Showing1 changed files
... ...
@@ -1,5 +1,6 @@
1 1
 function decodePerformance = svm_class_performance(svmlabel,svmdata,svmopts)
2
-addpath(fullfile(getTbxPath,'libsvm-mat-2.88-1'));
2
+global NODALYZE_LIBSVM;
3
+addpath(fullfile(getTbxPath,NODALYZE_LIBSVM));
3 4
 
4 5
 svmmodel = svmtrain(svmlabel,svmdata,svmopts);
5 6
 classperformance = [];
Browse code

spm2 compatibility, start change study

git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@195 83ab2cfd-5345-466c-8aeb-2b2739fb922d

Christoph Budziszewski authored on22/05/2009 11:16:41
Showing1 changed files
... ...
@@ -1,5 +1,5 @@
1 1
 function decodePerformance = svm_class_performance(svmlabel,svmdata,svmopts)
2
-addpath 'libsvm-mat-2.88-1';
2
+addpath(fullfile(getTbxPath,'libsvm-mat-2.88-1'));
3 3
 
4 4
 svmmodel = svmtrain(svmlabel,svmdata,svmopts);
5 5
 classperformance = [];
Browse code

moved stuff, fixing plotDecode

git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@151 83ab2cfd-5345-466c-8aeb-2b2739fb922d

Christoph Budziszewski authored on16/03/2009 14:41:06
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,16 @@
1
+function decodePerformance = svm_class_performance(svmlabel,svmdata,svmopts)
2
+addpath 'libsvm-mat-2.88-1';
3
+
4
+svmmodel = svmtrain(svmlabel,svmdata,svmopts);
5
+classperformance = [];
6
+for class = unique(svmlabel)';
7
+
8
+    filterindex = find(class == svmlabel);
9
+    testing_label = svmlabel(filterindex);
10
+    testing_data  = svmdata(filterindex);
11
+    [plabel accuracy dvalue] = svmpredict(testing_label,testing_data,svmmodel,'');
12
+
13
+    classperformance = [classperformance accuracy(1)];
14
+end
15
+decodePerformance = [decodePerformance; classperformance];
16
+end
0 17
\ No newline at end of file