diff --git a/usedMcode/callAll.m b/usedMcode/callAll.m index 6f8ad3b..4e0e3f4 100644 --- a/usedMcode/callAll.m +++ b/usedMcode/callAll.m @@ -6,13 +6,13 @@ EMGChannels={'AbdPolLo','Biceps','Triceps','FrontDelt','MidDelt','BackDelt'}; noSynergies=4; -allSubjects=false; %run all subjects and days or only one random day for one random subject -name='eegOffsetSingle'; %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='default'; %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=1; %predict actions x*shiftEEG after EEG measurement +eegOffset=0; %predict actions x*shiftEEG after EEG measurement pburgOrder=50; minEEGFreq=0; maxEEGFreq=200; @@ -84,19 +84,19 @@ [correlationEMGkin(j,:),maxRidgeParamIndexEMGkin(j,:,:)]=ridgeCV(savePath,'EMG','kin',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationEEGkin(j,:),maxRidgeParamIndexEEGkin(j,:,:)]=ridgeCV(savePath,'EEG','kin',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationLFkin(j,:),maxRidgeParamIndexLFkin(j,:,:)]=ridgeCV(savePath,'LF','kin',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); - %[correlationEMGautoenc(j,:),maxRidgeParamIndexEMGautoenc(j,:,:)]=ridgeCV(savePath,'EMG','Autoenc',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); + [correlationEMGautoenc(j,:),maxRidgeParamIndexEMGautoenc(j,:,:)]=ridgeCV(savePath,'EMG','Autoenc',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationEEGautoenc(j,:),maxRidgeParamIndexEEGautoenc(j,:,:)]=ridgeCV(savePath,'EEG','Autoenc',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationLFautoenc(j,:),maxRidgeParamIndexLFautoenc(j,:,:)]=ridgeCV(savePath,'LF','Autoenc',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); - %[correlationEMGpca(j,:),maxRidgeParamIndexEMGpca(j,:,:)]=ridgeCV(savePath,'EMG','PCA',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); + [correlationEMGpca(j,:),maxRidgeParamIndexEMGpca(j,:,:)]=ridgeCV(savePath,'EMG','PCA',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationEEGpca(j,:),maxRidgeParamIndexEEGpca(j,:,:)]=ridgeCV(savePath,'EEG','PCA',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationLFpca(j,:),maxRidgeParamIndexLFpca(j,:,:)]=ridgeCV(savePath,'LF','PCA',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); - %[correlationEMGnnmf(j,:),maxRidgeParamIndexEMGnnmf(j,:,:)]=ridgeCV(savePath,'EMG','NNMF',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); + [correlationEMGnnmf(j,:),maxRidgeParamIndexEMGnnmf(j,:,:)]=ridgeCV(savePath,'EMG','NNMF',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationEEGnnmf(j,:),maxRidgeParamIndexEEGnnmf(j,:,:)]=ridgeCV(savePath,'EEG','NNMF',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationLFnnmf(j,:),maxRidgeParamIndexLFnnmf(j,:,:)]=ridgeCV(savePath,'LF','NNMF',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); fprintf('%s%i finished %s\n',subject,number,datestr(datetime('now'))) end - save(strcat(pathToFile,sprintf('../matlabData/%s_callAll-%s.mat',datestr(datetime('now'),name)))); + save(strcat(pathToFile,sprintf('../matlabData/%s_callAll-%s.mat',datestr(datetime('now')),name))); else j=fix(rand()*size(numbersMat,2)+1); @@ -109,13 +109,13 @@ [correlationEMGkin,maxRidgeParamIndexEMGkin(:,:)]=ridgeCV(savePath,'EMG','kin',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationEEGkin,maxRidgeParamIndexEEGkin(:,:)]=ridgeCV(savePath,'EEG','kin',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationLFkin,maxRidgeParamIndexLFkin(:,:)]=ridgeCV(savePath,'LF','kin',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); - %[correlationEMGautoenc,maxRidgeParamIndexEMGautoenc(:,:)]=ridgeCV(savePath,'EMG','Autoenc',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); + [correlationEMGautoenc,maxRidgeParamIndexEMGautoenc(:,:)]=ridgeCV(savePath,'EMG','Autoenc',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationEEGautoenc,maxRidgeParamIndexEEGautoenc(:,:)]=ridgeCV(savePath,'EEG','Autoenc',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationLFautoenc,maxRidgeParamIndexLFautoenc(:,:)]=ridgeCV(savePath,'LF','Autoenc',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); - %[correlationEMGpca,maxRidgeParamIndexEMGpca(:,:)]=ridgeCV(savePath,'EMG','PCA',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); + [correlationEMGpca,maxRidgeParamIndexEMGpca(:,:)]=ridgeCV(savePath,'EMG','PCA',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationEEGpca,maxRidgeParamIndexEEGpca(:,:)]=ridgeCV(savePath,'EEG','PCA',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationLFpca,maxRidgeParamIndexLFpca(:,:)]=ridgeCV(savePath,'LF','PCA',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); - %[correlationEMGnnmf,maxRidgeParamIndexEMGnnmf(:,:)]=ridgeCV(savePath,'EMG','NNMF',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); + [correlationEMGnnmf,maxRidgeParamIndexEMGnnmf(:,:)]=ridgeCV(savePath,'EMG','NNMF',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationEEGnnmf,maxRidgeParamIndexEEGnnmf(:,:)]=ridgeCV(savePath,'EEG','NNMF',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); [correlationLFnnmf,maxRidgeParamIndexLFnnmf(:,:)]=ridgeCV(savePath,'LF','NNMF',k,ridgeParams,shiftEMG,shiftEEG,eegOffset); fprintf('%s%i finished %s\n',subject,number,datestr(datetime('now')))