forked from MAMEM/eeg-processing-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exampleMotorPWelch.m
35 lines (28 loc) · 920 Bytes
/
exampleMotorPWelch.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
sess = eegtoolkit.util.Session;
sess.loadAll(6);
%
% load('testingMotorVag1');
% % load
% sess = eegtoolkit.util.Session;
% % sess.loadMOTOR(labels,trials);
% sess.loadVag(trials,labels);
ss = eegtoolkit.preprocessing.SampleSelection;
ss.channels = [1,3];
ss.sampleRange = [384,896];
extr1 = eegtoolkit.featextraction.PWelch;
extr1.channel = 1;
extr2 = eegtoolkit.featextraction.PWelch;
extr2.channel = 2;
aggr = eegtoolkit.aggregation.ChannelConcat;
classif = eegtoolkit.classification.MLR;
experiment = eegtoolkit.experiment.Experimenter;
experiment.session = sess;
experiment.preprocessing = {ss};
experiment.featextraction = {extr1, extr2};
experiment.aggregator = aggr;
experiment.classification = classif;
experiment.evalMethod = experiment.EVAL_METHOD_LOOCV;
% experiment.run();
% experiment.evalMethod = experiment.EVAL_METHOD_XFOLD_CV;
experiment.run();
accuracy = experiment.results{1}.getAccuracy();