forked from sajjadkarimi91/motor-imagery-BCI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_ovr.m
38 lines (25 loc) · 769 Bytes
/
main_ovr.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
35
close all
clear
clc
addpath(genpath(pwd))
%This code is dependent on eeglab functions, and eeglab must insatll and
%add biosig plugin
dataset_dir = 'D:/PHD codes/DataSets/2008 Graz data set A';
save_dir = [dataset_dir,'/epoched_clean_data'];
num_subjects = 1:9; % participants number
eeg_channels = 1:22; % eeg channel numbers
max_class = 4; %
%% Start load, preprocessing & extracting epochs
eeg_preprocessing;
%% Ready for feature extraction
close all
k_pairs = [1,2,3];% for different CSP feature generation
feature_extraction_OVR;
%% classification naive-Bayes or SVMs
close all
num_subjects_ML = 1:1;
k_pairs_ML = 3; % it is a member of set k_pairs
max_features = 20;
classfier_type = 'svm'; % nb or svm
poly_order = 4; % 1:4
csp_classifiction_OVR;