aa0fb379218f6b86818442412779930261a7d51a
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m   1) function plotDecodePerformance(type,decode,subjectData)
Christoph Budziszewski using global variables now....

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m           2) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m   3) header = decode.header;
Christoph Budziszewski single subject -> svm class...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m   4) timeline = header.timeline;
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m   5) frameshift = header.frameShift;
Christoph Budziszewski single subject -> svm class...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m   6) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m   7) psthStart         = timeline.psthStart;
private/plotDecodePerformance.m   8) psthEnd           = timeline.psthEnd;
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m   9) frameStart        = frameshift.frameShiftStart;
private/plotDecodePerformance.m  10) frameEnd          = frameshift.frameShiftEnd;
Christoph Budziszewski multi-subject support

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          11) 
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  12) nClasses          = numel(header.classDef.labelCells);
private/plotDecodePerformance.m  13) decodePerformance = decode.decodePerformance;
private/plotDecodePerformance.m  14) psth              = decode.rawTimeCourse;
private/plotDecodePerformance.m  15) SubjectID         = subjectData;
Christoph Budziszewski single subject -> svm class...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  16) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  17) nSubjects         = size(SubjectID,2);
Christoph Budziszewski multi-subject support

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          18) 
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          19) 
plotDecodePerformance.m          20)     f = figure;
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  21)   
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          22)     hold on;
plotDecodePerformance.m          23)     chanceLevel = 100/nClasses;
plotDecodePerformance.m          24)     goodPredictionLevel = chanceLevel*1.5;
Christoph Budziszewski starting som prediction fin...

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          25)     plot([psthStart psthEnd],[chanceLevel chanceLevel],'k:');
plotDecodePerformance.m          26)     plot([psthStart psthEnd],[goodPredictionLevel goodPredictionLevel],'k:');
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          27)     axis([psthStart psthEnd 0 100])
Axel Lindner labels for axis

Axel Lindner authored 15 years ago

plotDecodePerformance.m          28)     xlabel('time [sec]');
plotDecodePerformance.m          29)     ylabel('decode performance [%]');
Christoph Budziszewski starting som prediction fin...

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          30) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  31)     switch type
Christoph Budziszewski extracted psth-plot to extr...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  32)         case 'psth'
private/plotDecodePerformance.m  33)             plotPSTH(psth,psthStart,psthEnd);  
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  34)         case 'simple'
private/plotDecodePerformance.m  35)             plotDecodePerformanceWithSE(frameStart,frameEnd,decodePerformance)
private/plotDecodePerformance.m  36)         case 'class performance'
private/plotDecodePerformance.m  37)             plotClassPerformance(frameStart,frameEnd,decodePerformance,nClasses)
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  38)         case 'x-subject-val'
private/plotDecodePerformance.m  39)             for c = 1:nSubjects
private/plotDecodePerformance.m  40)                 plot(frameStart:frameEnd, decodePerformance(:,c) ,[colorChooser(mod(c,nSubjects)+3) '-']);
private/plotDecodePerformance.m  41)             end
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  42)             plotDecodePerformanceWithSE(frameStart,frameEnd,decodePerformance)
Christoph Budziszewski starting som prediction fin...

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          43)     end
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          44)     hold off;
Christoph Budziszewski transport changes

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          45)     
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  46) %     setTitle(f,header,decode,subjectData);
private/plotDecodePerformance.m  47)     
private/plotDecodePerformance.m  48) end
private/plotDecodePerformance.m  49) 
private/plotDecodePerformance.m  50) function plotClassPerformance(frameStart,frameEnd,decodePerformance,nClasses)
private/plotDecodePerformance.m  51) for c = 1:size(decodePerformance,2)
private/plotDecodePerformance.m  52)     plot(frameStart:frameEnd, decodePerformance(:,c) ,[colorChooser(mod(c,nClasses)+3) '-']);
private/plotDecodePerformance.m  53) end
private/plotDecodePerformance.m  54) plot(frameStart:frameEnd, mean(decodePerformance,2) ,'b','LineWidth',2);
private/plotDecodePerformance.m  55) end
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          56) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  57) function plotDecodePerformanceWithSE(frameStart,frameEnd,decodePerformance)
private/plotDecodePerformance.m  58) plot(frameStart:frameEnd, mean(decodePerformance,2) ,'b','LineWidth',2);
private/plotDecodePerformance.m  59) 
private/plotDecodePerformance.m  60) se = myStdErr(decodePerformance,2);
private/plotDecodePerformance.m  61) plot(frameStart:frameEnd, mean(decodePerformance,2)+se ,'b:');
private/plotDecodePerformance.m  62) plot(frameStart:frameEnd, mean(decodePerformance,2)-se ,'b:');
private/plotDecodePerformance.m  63) end
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          64) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  65) 
private/plotDecodePerformance.m  66) function plotPSTH(psth,psthStart,psthEnd)
private/plotDecodePerformance.m  67) 
private/plotDecodePerformance.m  68) PSTH_AXIS_MIN = -2;
private/plotDecodePerformance.m  69) PSTH_AXIS_MAX = 2;
private/plotDecodePerformance.m  70) 
private/plotDecodePerformance.m  71)     hold on;
private/plotDecodePerformance.m  72)     if (size(psth) > 0)
private/plotDecodePerformance.m  73)       for voxel = 1:size(psth,2)
private/plotDecodePerformance.m  74)           for label = 1:size(psth{voxel},2)
private/plotDecodePerformance.m  75)               psthData = [];
private/plotDecodePerformance.m  76)               for timepoint = 1:size(psth{voxel}{label},2)
private/plotDecodePerformance.m  77)                   psthData = nanmean(psth{voxel}{label});
private/plotDecodePerformance.m  78)               end
private/plotDecodePerformance.m  79)               plot(psthStart:psthEnd,psthData,[colorChooser(voxel), lineStyleChooser(label)]);
private/plotDecodePerformance.m  80)           end
private/plotDecodePerformance.m  81)       end
private/plotDecodePerformance.m  82)     end
private/plotDecodePerformance.m  83)     axis([psthStart psthEnd PSTH_AXIS_MIN PSTH_AXIS_MAX])
private/plotDecodePerformance.m  84)     xlabel('time [sec]');
private/plotDecodePerformance.m  85)     ylabel('fMRI-signal change [%]');
private/plotDecodePerformance.m  86)     hold off
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          87) end
plotDecodePerformance.m          88) 
Christoph Budziszewski multi-subject support

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          89) 
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          90) function color = colorChooser(n)
plotDecodePerformance.m          91)     switch (mod(n,8))
plotDecodePerformance.m          92)     case 0
plotDecodePerformance.m          93)         color = 'r';
Christoph Budziszewski starting som prediction fin...

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          94)     case 1
plotDecodePerformance.m          95)         color = 'g';
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          96)     case 2
plotDecodePerformance.m          97)         color = 'b';
plotDecodePerformance.m          98)     case 3
Christoph Budziszewski starting som prediction fin...

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          99)         color = 'c';
plotDecodePerformance.m         100)     case 4
plotDecodePerformance.m         101)         color = 'm';
plotDecodePerformance.m         102)     case 5
plotDecodePerformance.m         103)         color = 'y';
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m         104)     otherwise
plotDecodePerformance.m         105)         color = 'k';
plotDecodePerformance.m         106)     end
plotDecodePerformance.m         107) end
plotDecodePerformance.m         108) 
plotDecodePerformance.m         109) function style = lineStyleChooser(n)
plotDecodePerformance.m         110) switch(mod(n,4))
plotDecodePerformance.m         111)     case 0
plotDecodePerformance.m         112)       style = '--';
plotDecodePerformance.m         113)     case 1
plotDecodePerformance.m         114)         style = '-';
plotDecodePerformance.m         115)     case 2 
plotDecodePerformance.m         116)         style = ':';
plotDecodePerformance.m         117)     case 3
Christoph Budziszewski killed unnecessary assignin...

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m         118)         style = '-.';