diff --git a/bashscripts/runOnEciton.bash b/bashscripts/runOnEciton.bash index 5966ef3..0ff9df6 100755 --- a/bashscripts/runOnEciton.bash +++ b/bashscripts/runOnEciton.bash @@ -7,4 +7,4 @@ #sed 's,\./,,g' -i dirs.txt #sed '/^[[:blank:]]*$/d' -i dirs.txt -matlab < /home/hohlochj/masterarbeit/usedMcode/callAll.m > /nfs/wsi/ti/messor/hohlochj/log/$(date +%y-%m-%d--%T)-allDefault3Syn.log +matlab < /home/hohlochj/masterarbeit/usedMcode/callAll.m > /nfs/wsi/ti/messor/hohlochj/log/$(date +%y-%m-%d--%T)-EEGtoEMGandAutoencToKin.log diff --git a/usedMcode/callAll.m b/usedMcode/callAll.m index 704cb24..3a761c6 100644 --- a/usedMcode/callAll.m +++ b/usedMcode/callAll.m @@ -6,8 +6,8 @@ EMGChannels={'AbdPolLo','Biceps','Triceps','FrontDelt','MidDelt','BackDelt'}; noSynergies=3; -allSubjects=false; %run all subjects and days or only one random day for one random subject -name='EEGtoEMG'; %suffix for the output, has to be valid name for file (no space, /, ...) +allSubjects=true; %run all subjects and days or only one random day for one random subject +name='EEGtoEMGandAutoencToKin'; %suffix for the output, has to be valid name for file (no space, /, ...) windowEMG=0.2; windowEEG=1; shiftEMG=0.05; diff --git a/usedMcode/callAllPos.m b/usedMcode/callAllPos.m index 6cf43e6..c41e1ba 100644 --- a/usedMcode/callAllPos.m +++ b/usedMcode/callAllPos.m @@ -7,12 +7,12 @@ noSynergies=3; allSubjects=false; %run all subjects and days or only one random day for one random subject -name='defaultPos'; %suffix for the output, has to be valid name for file (no space, /, ...) +name='defaultPosOff1'; %suffix for the output, has to be valid name for file (no space, /, ...) windowEMG=0.2; windowEEG=1; shiftEMG=0.05; shiftEEG=0.2; -eegOffset=0; %predict actions x*shiftEEG after EEG measurement +eegOffset=1; %predict actions x*shiftEEG after EEG measurement pburgOrder=250; minEEGFreq=2; maxEEGFreq=49; @@ -22,7 +22,7 @@ k=10; maxExpC=0; maxPerClass=250; -poolObj=parpool(3); +poolObj=parpool(32); [subjects,numbers]=namesAndNumbers(pathToFile); numbersMat=cell2mat(numbers); diff --git a/usedMcode/ridgeCV.m b/usedMcode/ridgeCV.m index 7311cd3..6115e9f 100644 --- a/usedMcode/ridgeCV.m +++ b/usedMcode/ridgeCV.m @@ -10,7 +10,7 @@ elseif strcmp(data,'LF') eeg=true; trainingData=trainingDataEEGlf(eegOffset+1:end,:); - elseif strcmp(goal,'Autoenc') + elseif strcmp(data,'Autoenc') trainingData=synergiesAutoenc; else error('only EEG, EMG and LF are valid inputs for data'); @@ -18,9 +18,6 @@ factor=size(trainingDataEMG,1)/(size(trainingData,1)+eegOffset); - clear trainingDataEEG; - clear trainingDataEEGlf; - clear trainingDataEMG; if strcmp(goal,'Autoenc') predicted=shiftingMean(synergiesAutoenc,factor); @@ -30,14 +27,17 @@ predicted=shiftingMean(synergiesNNMF,factor); elseif strcmp(goal,'kin') predicted=shiftingMean(kinematics,factor); - elseif strcmp(data,'EMG') + elseif strcmp(goal,'EMG') predicted=trainingDataEMG; else error('only kin, Autoenc, PCA, NNMF and EMG are valid inputs for goal'); end - clear kinematics; + clear trainingDataEEG; + clear trainingDataEEGlf; + clear trainingDataEMG; clear synergies*; + clear kinematics; if eeg predicted=predicted(1:end-eegOffset,:); @@ -64,4 +64,4 @@ correlation(j)=mean(correlations); end -end \ No newline at end of file +end