diff --git a/classifyAccordingToEMG.m b/classifyAccordingToEMG.m index 3acc515..8805818 100644 --- a/classifyAccordingToEMG.m +++ b/classifyAccordingToEMG.m @@ -11,10 +11,11 @@ classification(j)=-1; %code for pause end for j=max(fix(i-0.5/shift),1):i % half a second before executed movement there should be activity (esp. EEG) - classification(j)=class; + classification(j)=-1; end oldclass=class; end + classification(i)=class; else % task is to rest but movement not finished classification(i)=oldclass; end diff --git a/read.m b/read.m index 3dd02f9..965c5ea 100644 --- a/read.m +++ b/read.m @@ -1,3 +1,5 @@ +close all +clear all %params disp('start') disp(datestr(datetime('now'))) @@ -42,8 +44,8 @@ classification=smoothClassification(smoothClassification~=-1); clear smoothClassification i -save /home/jph/Uni/masterarbeit/data/AO1200msWindow.mat +save /home/jph/Uni/masterarbeit/data/AO1200msWindow1sPause.mat disp('end') -disp(datestr(datetime('now'))) \ No newline at end of file +disp(datestr(datetime('now'))) diff --git a/svm.m b/svm.m index 7be527c..e56e459 100644 --- a/svm.m +++ b/svm.m @@ -2,13 +2,7 @@ clear all clc -%params -NFFT=2048; -cutWindowEEG=2; -window=0.2; -shift=0.05; - -load('/home/jph/Uni/masterarbeit/data/AO1200msWindow.mat'); +load('/home/jph/Uni/masterarbeit/data/AO1200msWindow1sPause.mat'); %k=2; %maxExpC=0; % c\in {2^i|i=-maxExpC:1:maxExpC} @@ -38,4 +32,11 @@ cm=cm+confusionmat(leaveClasses,predictions); %confusion matrix %cf: for each cue what was the prediction (maybe colourCoded) end -meanAccurancy=mean(accurancy(:,1)) \ No newline at end of file +meanAccurancy=mean(accurancy(:,1)) + +cmScaled=zeros(size(cm)); +for i=1:size(cm,1) + cmScaled(i,:)=cm(i,:)/sum(cm(i,:)); +end +imagesc(cmScaled) +colorbar(); diff --git a/text/collection.txt b/text/collection.txt index 91d18a7..632763a 100644 --- a/text/collection.txt +++ b/text/collection.txt @@ -10,5 +10,5 @@ new Classification ------------------ Move/Rest EMG : 99.9535% -Bewegungen EMG: 77.7352% - +Bewegungen EMG: 77.7352% bzw. 55.8440% wenn 0.5s vorher einbezogen +64.2229% bei 1s Pause vor Bewegungsbeginn