diff --git a/text/TODO.txt b/text/TODO.txt index 0cde0b7..3756d86 100644 --- a/text/TODO.txt +++ b/text/TODO.txt @@ -124,4 +124,5 @@ * ridgeCV - * max per class - +* 2 und 4 Synergien +* vergleich EMG Synergie diff --git a/text/thesis/03Results.tex b/text/thesis/03Results.tex index bdd589c..85ddadb 100644 --- a/text/thesis/03Results.tex +++ b/text/thesis/03Results.tex @@ -151,3 +151,5 @@ \caption{Autoencoder data predicted from Low Frequencies} \label{fig:lfToAutoencPause} \end{figure} +%EEG -> EMG +%Autoenc kin/pos diff --git a/text/thesis/pictures/results/classEEGemgLF.png b/text/thesis/pictures/results/classEEGemgLF.png index 31a9450..3f26da8 100644 --- a/text/thesis/pictures/results/classEEGemgLF.png +++ b/text/thesis/pictures/results/classEEGemgLF.png Binary files differ diff --git a/text/thesis/pictures/results/corrEEGemgLF.png b/text/thesis/pictures/results/corrEEGemgLF.png index 04cc81d..e5b4671 100644 --- a/text/thesis/pictures/results/corrEEGemgLF.png +++ b/text/thesis/pictures/results/corrEEGemgLF.png Binary files differ diff --git a/text/thesis/pictures/results/corrEEGemgLFpos.png b/text/thesis/pictures/results/corrEEGemgLFpos.png index 9ae3e86..49bb2cb 100644 --- a/text/thesis/pictures/results/corrEEGemgLFpos.png +++ b/text/thesis/pictures/results/corrEEGemgLFpos.png Binary files differ diff --git a/usedMcode/evaluationAccuracys.m b/usedMcode/evaluationAccuracys.m index 307df58..812956c 100644 --- a/usedMcode/evaluationAccuracys.m +++ b/usedMcode/evaluationAccuracys.m @@ -4,9 +4,14 @@ eegAcc=struct2array(accuracys.EEG); emgAcc=struct2array(accuracys.EMG); LFAcc=struct2array(accuracys.LF); +EEG=cell(size(eegAcc(:,1:end-1),2),1); +EEG(:)={'EEG'}; +EMG=cell(size(emgAcc(:,1:end-1),2),1); +EMG(:)={'EMG'}; +LF=cell(size(LFAcc(:,1:end-1),2),1); +LF(:)={'LF'}; -anova1([eegAcc(1:5),emgAcc(1:5),LFAcc(1:5)],[0,0,0,0,0,1,1,1,1,1,2,2,2,2,2]) -xlabel('EEG - EMG - LF') +anova1(cat(2,eegAcc(:,1:end-1),emgAcc(:,1:end-1),LFAcc(:,1:end-1)),cat(1,EEG,EMG,LF)) ylabel('% classified correctly') title('ANOVA for EEG, EMG and LF') diff --git a/usedMcode/evaluationCorrelations.m b/usedMcode/evaluationCorrelations.m index df3c7a8..39da23e 100644 --- a/usedMcode/evaluationCorrelations.m +++ b/usedMcode/evaluationCorrelations.m @@ -2,30 +2,41 @@ %% compare methods of recording % velocities -eegCorrKin=struct2array(correlations.EEG.kin); -emgCorrKin=struct2array(correlations.EMG.kin); -LFCorrKin=struct2array(correlations.LF.kin); +eegCorrKin=pickFromStruct(correlations.EEG.kin,1:3); +emgCorrKin=correlations.EMG.kin.Default; +LFCorrKin=pickFromStruct(correlations.LF.kin,1:3); +EEG=cell(3*size(eegCorrKin,1),1); +EEG(:)={'EEG'}; +EMG=cell(3,1); +EMG(:)={'EMG'}; +LF=cell(3*size(LFCorrKin,1),1); +LF(:)={'LF'}; -anova1([eegCorrKin,emgCorrKin,LFCorrKin],cat(1,zeros([15,1]),ones([6,1]),2*ones([15,1]))) -xlabel('EEG - EMG - LF') +anova1(cell2mat(cat(1,eegCorrKin,emgCorrKin,LFCorrKin)'),cat(1,EEG,EMG,LF)) + ylabel('correlation recorded - predicted') title('ANOVA for EEG, EMG and LF') -anova1([eegCorrKin,emgCorrKin],cat(1,zeros([15,1]),ones([6,1]))) -anova1([eegCorrKin,LFCorrKin],cat(1,zeros([15,1]),2*ones([15,1]))) -anova1([emgCorrKin,LFCorrKin],cat(1,ones([6,1]),2*ones([15,1]))) +anova1(cell2mat(cat(1,eegCorrKin,emgCorrKin)'),cat(1,EEG,EMG)) +anova1(cell2mat(cat(1,eegCorrKin,LFCorrKin)'),cat(1,EEG,LF)) +anova1(cell2mat(cat(1,emgCorrKin,LFCorrKin)'),cat(1,EMG,LF)) % positions -eegCorrPos=struct2array(correlations.EEG.pos); -emgCorrPos=struct2array(correlations.EMG.pos); -LFCorrPos=struct2array(correlations.LF.pos); +eegCorrPos=pickFromStruct(correlations.EEG.pos,1:3); +emgCorrPos=correlations.EMG.pos.Default; +LFCorrPos=pickFromStruct(correlations.LF.pos,1:3); +EEG=cell(3*size(eegCorrPos,1),1); +EEG(:)={'EEG'}; +EMG=cell(3,1); +EMG(:)={'EMG'}; +LF=cell(3*size(LFCorrPos,1),1); +LF(:)={'LF'}; -anova1([eegCorrPos,emgCorrPos,LFCorrPos],cat(1,zeros([9,1]),ones([3,1]),2*ones([9,1]))) -xlabel('EEG - EMG - LF') +anova1(cell2mat(cat(1,eegCorrPos,emgCorrPos,LFCorrPos)'),cat(1,EEG,EMG,LF)) ylabel('correlation recorded - predicted') title('ANOVA for EEG, EMG and LF') -anova1([eegCorrPos,emgCorrPos],cat(1,zeros([9,1]),ones([3,1]))) -anova1([eegCorrPos,LFCorrPos],cat(1,zeros([9,1]),2*ones([9,1]))) -anova1([emgCorrPos,LFCorrPos],cat(1,ones([3,1]),2*ones([9,1]))) +anova1(cell2mat(cat(1,eegCorrPos,emgCorrPos)'),cat(1,EEG,EMG)) +anova1(cell2mat(cat(1,eegCorrPos,LFCorrPos)'),cat(1,EEG,LF)) +anova1(cell2mat(cat(1,emgCorrPos,LFCorrPos)'),cat(1,EMG,LF)) %% compare direct and via %kin @@ -72,8 +83,10 @@ subplot(sizeY,ceil(noOfPlots/sizeY),i) boxplot(input.(sprintf('%s',names{i}))) title(names{i}) + ylabel('correlation recorded - predicted') ylim(limits_y) end anova1(cat(2,input.Default(:),input.Offset1(:),input.Offset2(:)),[0,1,2]) +ylabel('Offset') anova1(cat(2,input.Default(:),input.Offset1(:),input.Pause1(:),input.Pause1Offset1(:)),{'0.5s Pause','0.5s Pause', '1s Pause', '1s Pause'}) diff --git a/usedMcode/pickFromStruct.m b/usedMcode/pickFromStruct.m new file mode 100644 index 0000000..e268217 --- /dev/null +++ b/usedMcode/pickFromStruct.m @@ -0,0 +1,10 @@ +function [ output ] = pickFromStruct( struct,indices ) +%pickFromStruct picks ith entry of a struct + names=fieldnames(struct); + pick=names(indices); + output=cell([size(pick,1),1]); + for i=1:size(pick,1) + output{i}=struct.(sprintf('%s',pick{i})); + end +end +