git.schokokeks.org
Repositories
Help
Report an Issue
SVMCrossVal.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
d0eb71f
Branches
Tags
master
SVMCrossVal.git
private
main.m
single subject -> svm classification -> plotDecodePerformance working!
Christoph Budziszewski
commited
d0eb71f
at 2009-03-06 13:17:25
main.m
Blame
History
Raw
function main(model,task,subtask) disp('RUN'); switch task case 'pre' preprocess(model,subtask); case 'decode' decode(model,subtask); end end % disp('all warnings OFF') % warn = warning('off','all'); function preprocess(model,task) % parse the GUI and pass parameters as structure timeLine = getTimeLineParams(model); subjects = getSubjectCellList(model); classDef = parseClassDef(model); mask = ['^' cell2mat(getImageFileMask(model)) '.*\.img$']; % images % normalization switch task case 'COORD' disp('COORD'); out = struct; out.header = struct; out.header.type = 'COORD'; out.header.timeline = timeLine; out.header.classDef = classDef; coordargs = struct; coordargs.subjects = subjects; coordargs.timeline = timeLine; coordargs.basedir = model.baseDir; coordargs.sessionList = 1:3; coordargs.eventList = classDef.eventMatrix; coordargs.coords = parseCoordinateTextField(model); coordargs.mask = mask; out.subjectdata = runCoordTable(coordargs); assignin('base','preprocessedData',out); case 'ROI' disp('ROI'); roiargs = struct; roiargs.subjects = subjects; roiargs.timeline = timeLine; roiargs.classes = classDef; roiargs.mask = mask; roiargs.basedir = model.baseDir; roiargs.sessionList = 1:3; roiargs.eventList = classDef.eventMatrix; runROIImageMaskMode(roiargs); case 'FBS' disp('not implemented') end end function decode(model,task) switch task case 'SVM' disp('SVM'); svmopts = getSvmArgs(model,1); preprocessedData = evalin('base','preprocessedData'); decode = calculateMultiSubjectDecodePerformance(preprocessedData.header,preprocessedData.subjectdata,svmopts); case 'X-SVM' disp('not implemented') case 'SOM' disp('not implemented') case 'X-SOM' disp('not implemented') end % disp('warings restored'); % warning('on',warn); end