diff --git a/text/collection.txt b/text/collection.txt index d96f829..64381f3 100644 --- a/text/collection.txt +++ b/text/collection.txt @@ -13,5 +13,5 @@ Bewegungen EMG: 77.7352% bzw. 55.8440% wenn 0.5s vorher einbezogen EMG bei 1s Pause vor Bewegungsbeginn 70.4908% allSubjectsAllDays: -EMG: 56.11%, EEG: 42.2% (pburgOrder 50, EMGwindow 0.2, 1s Pause, c=1 fest) +EMG: 56.11%, EEG: 42.2% (pburgOrder 50, EMGwindow 0.2, 1s Pause, c=1 fest, minFreq=0, maxFreq=200) diff --git a/usedMcode/callAll.m b/usedMcode/callAll.m index 5e100be..3d40917 100644 --- a/usedMcode/callAll.m +++ b/usedMcode/callAll.m @@ -2,6 +2,9 @@ pathToFile='/nfs/wsi/ti/messor/hohlochj/origData/'; %pathToFile='/home/jph/Uni/masterarbeit/Block1_ReachingMovements/'; +maxFile=5; +threshold=7500; %EMG is classified as movement + windowEMG=0.2; %try 1s windowEEG=1; shift=0.2; @@ -35,7 +38,7 @@ subject=subjects{i}; for number=numbers{i} % fprintf('%s%i\n',subject,number); - readEEG(pathToFile,subject,number,windowEMG,windowEEG,shift,5,7500,pburgOrder,minEEGFreq,maxEEGFreq); + readEEG(pathToFile,subject,number,windowEMG,windowEEG,shift,maxFile,threshold,pburgOrder,minEEGFreq,maxEEGFreq); [meanAccurancysEMG(j),maxCEMG(j,:),cmScaledEMG(j,:,:)]=svmEciton(pathToFile,subject,number,false,k,maxExpC,maxPerClass); [meanAccurancysEEG(j),maxCEEG(j,:),cmScaledEEG(j,:,:)]=svmEciton(pathToFile,subject,number,EEG,k,maxExpC,maxPerClass); j=j+1; diff --git a/usedMcode/generateTrainingData.m b/usedMcode/generateTrainingData.m index 8462ce9..2e480b8 100644 --- a/usedMcode/generateTrainingData.m +++ b/usedMcode/generateTrainingData.m @@ -29,6 +29,6 @@ % disp(offset) %add dummy timestamp at the end to fill kinematics kin=[kin;kin(end,:)]; - kin(end,1)=size(trainingDataEEG,1)*1000*windowEEG; + kin(end,1)=size(trainingDataEEG,1)*1000*shift+(windowEEG-shift)*1000; kinPerSec=shiftingKin(kin,windowEEG,shift); end diff --git a/usedMcode/shiftingKin.m b/usedMcode/shiftingKin.m index a7a7cd4..2b6475e 100644 --- a/usedMcode/shiftingKin.m +++ b/usedMcode/shiftingKin.m @@ -1,6 +1,6 @@ -function [kinPerSec]=shiftingKin(kin, window, shift) - kinPerSec=zeros(fix((max(kin(:,1))-window*1000)/(shift*1000)),4); - for j=1:fix((max(kin(:,1))-window*1000)/(shift*1000)) - kinPerSec(j,:)=sum(diff(kin(kin(:,1)>(j-1)*shift*1000 & kin(:,1)<=(j-1)*shift*1000+window*1000,:))); +function [kinPerSec]=shiftingKin(kin, windowEEG, shift) + kinPerSec=zeros(fix((max(kin(:,1))-windowEEG*1000)/(shift*1000)),3); + for j=1:size(kinPerSec,1) + kinPerSec(j,:)=sum(diff(kin(kin(:,1)>(j-1)*shift*1000 & kin(:,1)<=(j-1)*shift*1000+windowEEG*1000,2:4))); end end \ No newline at end of file