ef027ada42934717f314a7a3efdc12b756b3c76f
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 preliminary confidence inte...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  19) nTrials           = getNTrials(psth);
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m          23)     hold on;
plotDecodePerformance.m          24)     chanceLevel = 100/nClasses;
Christoph Budziszewski preliminary confidence inte...

Christoph Budziszewski authored 14 years ago

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

Christoph Budziszewski authored 15 years ago

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

Axel Lindner authored 15 years ago

plotDecodePerformance.m          27)     xlabel('time [sec]');
plotDecodePerformance.m          28)     ylabel('decode performance [%]');
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  29) plottime= tic;
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  31)         case 'psth'
private/plotDecodePerformance.m  32)             plotPSTH(psth,psthStart,psthEnd);  
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  33) 
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)
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  36) 
private/plotDecodePerformance.m  37)             plot([psthStart psthEnd],[chanceLevel chanceLevel],'k:');
private/plotDecodePerformance.m  38)             plotBinConfidenceIntervall(psthStart,psthEnd,nTrials,0.05,chanceLevel/100,'--');
private/plotDecodePerformance.m  39)             plotBinConfidenceIntervall(psthStart,psthEnd,nTrials,0.01,chanceLevel/100,'-.');
private/plotDecodePerformance.m  40)             plotBinConfidenceIntervall(psthStart,psthEnd,nTrials,0.001,chanceLevel/100,':');
private/plotDecodePerformance.m  41) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  42)         case 'class performance'
private/plotDecodePerformance.m  43)             plotClassPerformance(frameStart,frameEnd,decodePerformance,nClasses)
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  44) 
private/plotDecodePerformance.m  45)             plot([psthStart psthEnd],[chanceLevel chanceLevel],'k:');
private/plotDecodePerformance.m  46)             plotBinConfidenceIntervall(psthStart,psthEnd,nTrials,0.05,chanceLevel/100,'--');
private/plotDecodePerformance.m  47)             plotBinConfidenceIntervall(psthStart,psthEnd,nTrials,0.01,chanceLevel/100,'-.');
private/plotDecodePerformance.m  48)             plotBinConfidenceIntervall(psthStart,psthEnd,nTrials,0.001,chanceLevel/100,':');
Christoph Budziszewski moved stuff, fixing plotDecode

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  53)             plotDecodePerformanceWithSE(frameStart,frameEnd,decodePerformance)
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  54)             
private/plotDecodePerformance.m  55)             plot([psthStart psthEnd],[chanceLevel chanceLevel],'k:');
private/plotDecodePerformance.m  56)             plotBinConfidenceIntervall(psthStart,psthEnd,nTrials,0.05,chanceLevel/100,'--');
private/plotDecodePerformance.m  57)             plotBinConfidenceIntervall(psthStart,psthEnd,nTrials,0.01,chanceLevel/100,'-.');
private/plotDecodePerformance.m  58)             plotBinConfidenceIntervall(psthStart,psthEnd,nTrials,0.001,chanceLevel/100,':');
Christoph Budziszewski preliminary confidence inte...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  59) 
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  60)     end
private/plotDecodePerformance.m  61) toc(plottime);    
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  64) end
private/plotDecodePerformance.m  65) 
Christoph Budziszewski preliminary confidence inte...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  66) function plotBinConfidenceIntervall(pStart,pEnd,nTrials,alpha,limit,color)
private/plotDecodePerformance.m  67)     [pLevel Z] = rev_ki_bin(nTrials,alpha,limit);
private/plotDecodePerformance.m  68)     [lower upper proz] = ki_bin(Z,nTrials,alpha);
private/plotDecodePerformance.m  69) 
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  70)     plot([pStart pEnd],[pLevel*100 pLevel*100],[color 'k']);
private/plotDecodePerformance.m  71) %     plot([pStart pEnd],[lower*100 lower*100],[color 'k']);
private/plotDecodePerformance.m  72) %     plot([pStart pEnd],[upper*100 upper*100],[color 'k']);
Christoph Budziszewski preliminary confidence inte...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  73) end
private/plotDecodePerformance.m  74) 
private/plotDecodePerformance.m  75) function n = getNTrials(psth)
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  76) nOverallConditions = size(psth,2);
Christoph Budziszewski preliminary confidence inte...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  77) 
private/plotDecodePerformance.m  78) n = 0;
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  79) for ns = 1:nOverallConditions
Christoph Budziszewski preliminary confidence inte...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  80)     nClasses = size(psth{ns},2);
private/plotDecodePerformance.m  81)     for nc = 1:nClasses
private/plotDecodePerformance.m  82)         n = n + size(psth{ns}{nc},1);
private/plotDecodePerformance.m  83)     end
private/plotDecodePerformance.m  84) end
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  85) n=n/(nOverallConditions/nClasses);
private/plotDecodePerformance.m  86) 
Christoph Budziszewski preliminary confidence inte...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m  87) end
private/plotDecodePerformance.m  88) 
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  89) function plotClassPerformance(frameStart,frameEnd,decodePerformance,nClasses)
private/plotDecodePerformance.m  90) for c = 1:size(decodePerformance,2)
private/plotDecodePerformance.m  91)     plot(frameStart:frameEnd, decodePerformance(:,c) ,[colorChooser(mod(c,nClasses)+3) '-']);
private/plotDecodePerformance.m  92) end
private/plotDecodePerformance.m  93) plot(frameStart:frameEnd, mean(decodePerformance,2) ,'b','LineWidth',2);
private/plotDecodePerformance.m  94) end
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m  96) function plotDecodePerformanceWithSE(frameStart,frameEnd,decodePerformance)
private/plotDecodePerformance.m  97) plot(frameStart:frameEnd, mean(decodePerformance,2) ,'b','LineWidth',2);
private/plotDecodePerformance.m  98) 
private/plotDecodePerformance.m  99) se = myStdErr(decodePerformance,2);
private/plotDecodePerformance.m 100) plot(frameStart:frameEnd, mean(decodePerformance,2)+se ,'b:');
private/plotDecodePerformance.m 101) plot(frameStart:frameEnd, mean(decodePerformance,2)-se ,'b:');
private/plotDecodePerformance.m 102) end
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m 104) 
private/plotDecodePerformance.m 105) function plotPSTH(psth,psthStart,psthEnd)
private/plotDecodePerformance.m 106) 
private/plotDecodePerformance.m 107) PSTH_AXIS_MIN = -2;
private/plotDecodePerformance.m 108) PSTH_AXIS_MAX = 2;
private/plotDecodePerformance.m 109) 
private/plotDecodePerformance.m 110)     hold on;
private/plotDecodePerformance.m 111)     if (size(psth) > 0)
private/plotDecodePerformance.m 112)       for voxel = 1:size(psth,2)
private/plotDecodePerformance.m 113)           for label = 1:size(psth{voxel},2)
private/plotDecodePerformance.m 114)               psthData = [];
private/plotDecodePerformance.m 115)               for timepoint = 1:size(psth{voxel}{label},2)
private/plotDecodePerformance.m 116)                   psthData = nanmean(psth{voxel}{label});
private/plotDecodePerformance.m 117)               end
Christoph Budziszewski preliminary confidence inte...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m 118)               PSTH_AXIS_MAX = max(PSTH_AXIS_MAX,nanmax(psthData));
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m 119)               PSTH_AXIS_MIN = min(PSTH_AXIS_MIN,nanmin(psthData));
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m 120)               plot(psthStart:psthEnd,psthData,[colorChooser(voxel), lineStyleChooser(label)]);
Christoph Budziszewski fixed FBS basedir fixed con...

Christoph Budziszewski authored 14 years ago

private/plotDecodePerformance.m 121) %               plot(psthStart:psthEnd,psthData,[lineStyleChooser(voxel), colorChooser(label)]);
Christoph Budziszewski all enabled features workin...

Christoph Budziszewski authored 15 years ago

private/plotDecodePerformance.m 122)           end
private/plotDecodePerformance.m 123)       end
private/plotDecodePerformance.m 124)     end
private/plotDecodePerformance.m 125)     axis([psthStart psthEnd PSTH_AXIS_MIN PSTH_AXIS_MAX])
private/plotDecodePerformance.m 126)     xlabel('time [sec]');
private/plotDecodePerformance.m 127)     ylabel('fMRI-signal change [%]');
private/plotDecodePerformance.m 128)     hold off
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m         129) end
plotDecodePerformance.m         130) 
Christoph Budziszewski multi-subject support

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m         131) 
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m         132) function color = colorChooser(n)
plotDecodePerformance.m         133)     switch (mod(n,8))
plotDecodePerformance.m         134)     case 0
plotDecodePerformance.m         135)         color = 'r';
Christoph Budziszewski starting som prediction fin...

Christoph Budziszewski authored 15 years ago

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

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m         138)     case 2
plotDecodePerformance.m         139)         color = 'b';
plotDecodePerformance.m         140)     case 3
Christoph Budziszewski starting som prediction fin...

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m         141)         color = 'c';
plotDecodePerformance.m         142)     case 4
plotDecodePerformance.m         143)         color = 'm';
plotDecodePerformance.m         144)     case 5
plotDecodePerformance.m         145)         color = 'y';
Christoph Budziszewski SVMCrossVal toolbox init

Christoph Budziszewski authored 15 years ago

plotDecodePerformance.m         146)     otherwise
plotDecodePerformance.m         147)         color = 'k';
plotDecodePerformance.m         148)     end
plotDecodePerformance.m         149) end
plotDecodePerformance.m         150) 
plotDecodePerformance.m         151) function style = lineStyleChooser(n)
plotDecodePerformance.m         152) switch(mod(n,4))
plotDecodePerformance.m         153)     case 0
plotDecodePerformance.m         154)       style = '--';
plotDecodePerformance.m         155)     case 1
plotDecodePerformance.m         156)         style = '-';
plotDecodePerformance.m         157)     case 2 
plotDecodePerformance.m         158)         style = ':';
plotDecodePerformance.m         159)     case 3
Christoph Budziszewski killed unnecessary assignin...

Christoph Budziszewski authored 15 years ago

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