Browse code

added randomize datapoints option

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

Christoph Budziszewski authored on16/03/2009 20:09:44
Showing1 changed files
... ...
@@ -6,8 +6,7 @@ decode.decodePerformance = [];
6 6
 decode.rawTimeCourse     = [];
7 7
 
8 8
 nSubjects = numel(subjectdata);
9
-% disp(sprintf('we have %g subjects. Press ANY-Key to continue.\n Use Retrun if your Keyboard lacks the ANY-Key.',numel(subjectdata)));
10
-% pause
9
+
11 10
 disp(sprintf('batch processing %g subjects',nSubjects));
12 11
 
13 12
 for subjectDataID = 1:nSubjects
Browse code

first plot button. not working. Idea: 3 tasks = 3 models.

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

Christoph Budziszewski authored on16/03/2009 17:07:44
Showing1 changed files
... ...
@@ -1,32 +1,31 @@
1 1
 %% subject loop
2 2
 function decode = calculateMultiSubjectDecodePerformance(header,subjectdata,svmopts)
3 3
 
4
-
5
-
6 4
 decode = struct;
7 5
 decode.decodePerformance = [];
8 6
 decode.rawTimeCourse     = [];
9 7
 
8
+nSubjects = numel(subjectdata);
9
+% disp(sprintf('we have %g subjects. Press ANY-Key to continue.\n Use Retrun if your Keyboard lacks the ANY-Key.',numel(subjectdata)));
10
+% pause
11
+disp(sprintf('batch processing %g subjects',nSubjects));
10 12
 
11
-disp(sprintf('we have %g subjects. Press ANY-Key to continue.\n Use Retrun if your Keyboard lacks the ANY-Key.',numel(subjectdata)));
12
-pause
13
-
14
-for subjectDataID = 1:numel(subjectdata)
13
+for subjectDataID = 1:nSubjects
15 14
 %     SubjectID = cell2mat(subjectCell);
16 15
     currentSubject = subjectdata{subjectDataID};
17 16
 
18 17
     namehelper = strcat('s',currentSubject.name); %Vars can not start with numbers.
19 18
 
20 19
     display(sprintf('calculating cross-validation performance time-shift for Subject %s. Please Wait. ...',currentSubject.name));
21
-    display('switching off all warnings');
22
-    warning_state               = warning('off','all');
20
+%     display('switching off all warnings');
21
+%     warning_state               = warning('off','all');
23 22
     display('calculating ...');
24 23
     
25 24
         decode.(namehelper)         = calculateDecodePerformance(header,currentSubject,svmopts);
26 25
 
27 26
     display('... done');
28
-    display('restoring warnings');
29
-    warning(warning_state);
27
+%     display('restoring warnings');
28
+%     warning(warning_state);
30 29
 
31 30
     decode.decodePerformance    = [decode.decodePerformance decode.(namehelper).decodePerformance];
32 31
     decode.rawTimeCourse        = [decode.rawTimeCourse decode.(namehelper).rawTimeCourse];
Browse code

working: SingleSubject, CoordTable, SVM, VISUAL SingleSubject, ROI-Image, SVM, VISUAL MultiSubject, CoordTable, SVM, VISUAL MultiSubject, ROI-Image, SVM, VISUAL

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

Christoph Budziszewski authored on09/03/2009 15:42:39
Showing1 changed files
... ...
@@ -7,7 +7,11 @@ decode = struct;
7 7
 decode.decodePerformance = [];
8 8
 decode.rawTimeCourse     = [];
9 9
 
10
-for subjectDataID = 1:size(subjectdata)
10
+
11
+disp(sprintf('we have %g subjects. Press ANY-Key to continue.\n Use Retrun if your Keyboard lacks the ANY-Key.',numel(subjectdata)));
12
+pause
13
+
14
+for subjectDataID = 1:numel(subjectdata)
11 15
 %     SubjectID = cell2mat(subjectCell);
12 16
     currentSubject = subjectdata{subjectDataID};
13 17
 
Browse code

single subject -> svm classification -> plotDecodePerformance working!

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

Christoph Budziszewski authored on06/03/2009 13:17:25
Showing1 changed files
... ...
@@ -18,7 +18,7 @@ for subjectDataID = 1:size(subjectdata)
18 18
     warning_state               = warning('off','all');
19 19
     display('calculating ...');
20 20
     
21
-        decode.(namehelper)         = calculateDecodePerformance(header.timeline,currentSubject,svmopts);
21
+        decode.(namehelper)         = calculateDecodePerformance(header,currentSubject,svmopts);
22 22
 
23 23
     display('... done');
24 24
     display('restoring warnings');
Browse code

enabled svm classification. labelmap not working

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

Christoph Budziszewski authored on05/03/2009 16:47:04
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,33 @@
1
+%% subject loop
2
+function decode = calculateMultiSubjectDecodePerformance(header,subjectdata,svmopts)
3
+
4
+
5
+
6
+decode = struct;
7
+decode.decodePerformance = [];
8
+decode.rawTimeCourse     = [];
9
+
10
+for subjectDataID = 1:size(subjectdata)
11
+%     SubjectID = cell2mat(subjectCell);
12
+    currentSubject = subjectdata{subjectDataID};
13
+
14
+    namehelper = strcat('s',currentSubject.name); %Vars can not start with numbers.
15
+
16
+    display(sprintf('calculating cross-validation performance time-shift for Subject %s. Please Wait. ...',currentSubject.name));
17
+    display('switching off all warnings');
18
+    warning_state               = warning('off','all');
19
+    display('calculating ...');
20
+    
21
+        decode.(namehelper)         = calculateDecodePerformance(header.timeline,currentSubject,svmopts);
22
+
23
+    display('... done');
24
+    display('restoring warnings');
25
+    warning(warning_state);
26
+
27
+    decode.decodePerformance    = [decode.decodePerformance decode.(namehelper).decodePerformance];
28
+    decode.rawTimeCourse        = [decode.rawTimeCourse decode.(namehelper).rawTimeCourse];
29
+
30
+    assignin('base','decode',decode);
31
+end
32
+
33
+end