Christoph Budziszewski commited on 2009-03-09 15:42:39
Zeige 5 geänderte Dateien mit 32 Einfügungen und 16 Löschungen.
git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@147 83ab2cfd-5345-466c-8aeb-2b2739fb922d
... | ... |
@@ -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 |
|
... | ... |
@@ -49,6 +47,12 @@ switch task |
49 | 47 |
|
50 | 48 |
case 'ROI' |
51 | 49 |
disp('ROI'); |
50 |
+ out = struct; |
|
51 |
+ out.header = struct; |
|
52 |
+ out.header.type = 'ROI'; |
|
53 |
+ out.header.timeline = timeLine; |
|
54 |
+ out.header.classDef = classDef; |
|
55 |
+ |
|
52 | 56 |
roiargs = struct; |
53 | 57 |
roiargs.subjects = subjects; |
54 | 58 |
roiargs.timeline = timeLine; |
... | ... |
@@ -58,7 +62,9 @@ switch task |
58 | 62 |
roiargs.sessionList = 1:3; |
59 | 63 |
roiargs.eventList = classDef.eventMatrix; |
60 | 64 |
|
61 |
- runROIImageMaskMode(roiargs); |
|
65 |
+ out.subjectdata = runROIImageMaskMode(roiargs); |
|
66 |
+ |
|
67 |
+ assignin('base','preprocessedData',out); |
|
62 | 68 |
|
63 | 69 |
case 'FBS' |
64 | 70 |
disp('not implemented') |
... | ... |
@@ -72,8 +78,7 @@ switch task |
72 | 78 |
svmopts = getSvmArgs(model,1); |
73 | 79 |
preprocessedData = evalin('base','preprocessedData'); |
74 | 80 |
decode = calculateMultiSubjectDecodePerformance(preprocessedData.header,preprocessedData.subjectdata,svmopts); |
75 |
- |
|
76 |
- |
|
81 |
+ assignin('base','decode',decode); |
|
77 | 82 |
case 'X-SVM' |
78 | 83 |
disp('not implemented') |
79 | 84 |
|
... | ... |
@@ -1,13 +1,16 @@ |
1 | 1 |
function subjectData = runCoordTable(args) |
2 | 2 |
|
3 |
-global SVMCROSSVAL_SUBJECTSTRUCT_NAME; |
|
3 |
+% global SVMCROSSVAL_SUBJECTSTRUCT_NAME; |
|
4 | 4 |
|
5 | 5 |
disp('run coord table') |
6 | 6 |
|
7 | 7 |
subjects = args.subjects; |
8 |
- nSubjects = size(subjects); |
|
8 |
+ nSubjects = numel(subjects); |
|
9 | 9 |
sessionlist = args.sessionList; |
10 | 10 |
|
11 |
+ disp(sprintf('we have %g subjects. Press ANY-Key to continue.\n Use Retrun if your Keyboard lacks the ANY-Key.',nSubjects)); |
|
12 |
+ pause |
|
13 |
+ |
|
11 | 14 |
for s = 1:nSubjects |
12 | 15 |
subjectStruct{s}.dir = fullfile(args.basedir,cell2mat(subjects(s))); |
13 | 16 |
d = load(fullfile(subjectStruct{s}.dir,'results','SPM.mat')); |
... | ... |
@@ -37,7 +40,7 @@ global SVMCROSSVAL_SUBJECTSTRUCT_NAME; |
37 | 40 |
end |
38 | 41 |
subjectStruct{s}.pst{iVoxel} = calculatePST(args.timeline,pstopts,rawdata); |
39 | 42 |
end |
40 |
- disp(sprintf('done %g // %g',s,nSubjects)); |
|
43 |
+ disp(sprintf('done %g / %g',s,nSubjects)); |
|
41 | 44 |
end |
42 | 45 |
|
43 | 46 |
subjectData = subjectStruct; |
... | ... |
@@ -1,12 +1,14 @@ |
1 |
-function runROIImageMaskMode(args) |
|
1 |
+function subjectStruct = runROIImageMaskMode(args) |
|
2 | 2 |
|
3 |
-global SVMCROSSVAL_SUBJECTSTRUCT_NAME; |
|
3 |
+% global SVMCROSSVAL_SUBJECTSTRUCT_NAME; |
|
4 | 4 |
|
5 | 5 |
subjects = args.subjects; |
6 | 6 |
|
7 |
-nSubjects = size(subjects); |
|
7 |
+nSubjects = numel(subjects); |
|
8 | 8 |
sessionlist = args.sessionList; |
9 | 9 |
|
10 |
+disp(sprintf('we have %g subjects. Press ANY-Key to continue.\n Use Retrun if your Keyboard lacks the ANY-Key.',nSubjects)); |
|
11 |
+pause |
|
10 | 12 |
|
11 | 13 |
for s = 1:nSubjects |
12 | 14 |
subjectStruct{s}.dir = fullfile(args.basedir,cell2mat(subjects(s))); |
... | ... |
@@ -49,7 +51,7 @@ for s = 1:nSubjects |
49 | 51 |
disp('done'); |
50 | 52 |
end |
51 | 53 |
|
52 |
-assignin('base',SVMCROSSVAL_SUBJECTSTRUCT_NAME,subjectStruct); |
|
54 |
+% assignin('base',SVMCROSSVAL_SUBJECTSTRUCT_NAME,subjectStruct); |
|
53 | 55 |
|
54 | 56 |
end |
55 | 57 |
|
... | ... |
@@ -29,7 +29,7 @@ DEFAULT.wd = fullfile('d:','Analyze','Choice','24pilot'); |
29 | 29 |
% set(frame,'Color',get(0,'defaultUicontrolBackgroundColor')); |
30 | 30 |
set(frame,'Resize','on'); |
31 | 31 |
set(frame,'Units','normalized'); |
32 |
- set(frame,'Color','w'); |
|
32 |
+ set(frame,'Color','y'); |
|
33 | 33 |
|
34 | 34 |
model = struct; |
35 | 35 |
model.baseDir = DEFAULT.wd; |
... | ... |
@@ -38,7 +38,7 @@ DEFAULT.wd = fullfile('d:','Analyze','Choice','24pilot'); |
38 | 38 |
set(model.txtBaseDir,'BackgroundColor','w'); |
39 | 39 |
set(model.txtBaseDir,'ForegroundColor','b'); |
40 | 40 |
|
41 |
- pFirstStep = uipanel(frame,'Title','Preprocessing','Position',[0 0.25 1 0.720]); |
|
41 |
+ pFirstStep = uipanel(frame,'Title','Preprocessing','Position',[0 0.36 1 0.610]); |
|
42 | 42 |
set(pFirstStep,'BackgroundColor','w'); |
43 | 43 |
set(pFirstStep,'Units','normalized'); |
44 | 44 |
|
... | ... |
@@ -47,15 +47,15 @@ DEFAULT.wd = fullfile('d:','Analyze','Choice','24pilot'); |
47 | 47 |
|
48 | 48 |
%Classification Step |
49 | 49 |
secondStepBaseColor = 'w'; |
50 |
- pSecondStep = uipanel(frame,'Title','Classification','Position',[0 0 1 0.25]); |
|
50 |
+ pSecondStep = uipanel(frame,'Title','Classification','Position',[0 0.1 1 0.25]); |
|
51 | 51 |
set(pSecondStep,'BackgroundColor',secondStepBaseColor); |
52 | 52 |
|
53 | 53 |
|
54 | 54 |
model = createSecondStepPanel(model,pSecondStep,DEFAULT,secondStepBaseColor); |
55 | 55 |
|
56 | 56 |
savemenu = uimenu(frame,'Label','Save/Load'); |
57 |
- uimenu(savemenu,'Label','Save','Callback',{@mcb_save,model}); |
|
58 |
- uimenu(savemenu,'Label','Load','Callback',{@mcb_load,model}); |
|
57 |
+ uimenu(savemenu,'Label','Save Preprocessing Parameter','Callback',{@mcb_save,model}); |
|
58 |
+ uimenu(savemenu,'Label','Load Preprocessing Parameter','Callback',{@mcb_load,model}); |
|
59 | 59 |
|
60 | 60 |
uimenu(frame,'Label','change Study','Callback',{@mcb_cd,model},'Enable','off'); |
61 | 61 |
|
62 | 62 |