4
EEG Classification using Support Vector Machine Homri Ines, Yacoub Slim and Ellouze Noureddine Laboratoire Signal Image et Technologie de l'Information,(SITI), Université Tunis El Manar, ENIT Tunis, Tunisia [email protected], [email protected], [email protected] AbstractEEG data of motor imagery of left and right hand movement are analyzed; different wavelet functions are applied to EEG segments for features extraction. Support vector machine is utilized for right and left hand movement imagination classification, than, the obtained results are compared with neural networks and linear discriminant analysis classification results . Index TermsEEG, Wavelet function, support vector machine. I. INTRODUCTION Brain computer interfaces BCI offer new possibilities for EEG signals exploitation , EEG signals of motor imagery can be seen as a new way of communication for persons suffering from severe physical handicaps [1]. Actually, analysis and interpretation of EEG signals are useful to distingue limbs movement imagination [2].The classification of EEG signals include primarily their preprocessing which can be accomplished by several methods, such as independent component analysis (ICA) [3], Principal component analysis (PCA) [4]; then the features extraction which can be performed using different techniques such as; fast Fourier transform FFT [5], band power [6, 7], common spatial pattern (CSP) [8], the autoregressive model AR [9] or multivariate autoregressive model MVAR [10], the wavelet transform for time-frequency analysis [11, 12, 13, 14, 15]; allowing the creation of features vectors. Next, the classification can be achieved by several classifiers such as Linear discriminant analysis LDA, neural networks , support vector machine SVM . In this paper, EEG signals for left and right hand movement imagery are utilized. Signals are filtered between 0.5 and 30 HZ. Features extraction is performed using different wavelet functions, and support vector machine is used in the classification. II. METHODS A. EEG Data Description EEG motor imagery data utilized in this study is dataset III available in BCI competition II (2003) [16]. EEG signals are sampled with 128Hz and filtered between 0.5 and 30Hz. Dataset consists of 140 trials of training data and 140 test trials, each trial of 9s contains records acquired by electrodes C3, CZ Fig. 1. Electrodes positions ( top) and timing scheme (bottom) [16]. and C4 according to the international 10-20 system of electrode placement. In each trial, subject imagined left or right hand movement between 3s and 9s. Dataset contain three records: x-train contains 140 training trials x-test contains 140 test trials y-train contains trials labels {1, 2}, respectively for left and right hand movement, saved in x_train. B. EEG Temporal Windowing EEG dataset is composed of a train set and a test set including each 140 trials of 9s length. Each trial is segmented with sliding windows of 256 samples corresponding to 2 seconds with a shift of one point. In this way each trial is composed of 385 EEG segments. C. Wavelet Transform for Features Extraction EEG signals recorded from channels C3 and C4, over sensory-motor cortices; activated during movement imagination; are analysed in order to assess sensory-motor SSD'13 1569682619 1 2013 10th International Multi-Conference on Systems, Signals & Devices (SSD) Hammamet, Tunisia, March 18-21, 2013 978-1-4673-6457-7/13/$31.00 ©2013 IEEE

[IEEE 2013 10th International Multi-Conference on Systems, Signals & Devices (SSD) - Hammamet, Tunisia (2013.03.18-2013.03.21)] 10th International Multi-Conferences on Systems, Signals

  • Upload
    ellouze

  • View
    228

  • Download
    12

Embed Size (px)

Citation preview

Page 1: [IEEE 2013 10th International Multi-Conference on Systems, Signals & Devices (SSD) - Hammamet, Tunisia (2013.03.18-2013.03.21)] 10th International Multi-Conferences on Systems, Signals

1 2 3 4 5 6 7 8 91011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556576061

EEG Classification using Support Vector Machine

Homri Ines, Yacoub Slim and Ellouze Noureddine

Laboratoire Signal Image et Technologie de l'Information,(SITI),

Université Tunis El Manar, ENIT

Tunis, Tunisia

[email protected], [email protected], [email protected]

Abstract—EEG data of motor imagery of left and right hand

movement are analyzed; different wavelet functions are applied

to EEG segments for features extraction. Support vector

machine is utilized for right and left hand movement imagination

classification, than, the obtained results are compared with

neural networks and linear discriminant analysis classification

results .

Index Terms—EEG, Wavelet function, support vector

machine.

I. INTRODUCTION

Brain computer interfaces BCI offer new possibilities for

EEG signals exploitation , EEG signals of motor imagery can

be seen as a new way of communication for persons suffering

from severe physical handicaps [1]. Actually, analysis and

interpretation of EEG signals are useful to distingue limbs

movement imagination [2].The classification of EEG signals

include primarily their preprocessing which can be

accomplished by several methods, such as independent

component analysis (ICA) [3], Principal component analysis

(PCA) [4]; then the features extraction which can be

performed using different techniques such as; fast Fourier

transform FFT [5], band power [6, 7], common spatial pattern

(CSP) [8], the autoregressive model AR [9] or multivariate

autoregressive model MVAR [10], the wavelet transform for

time-frequency analysis [11, 12, 13, 14, 15]; allowing the

creation of features vectors. Next, the classification can be

achieved by several classifiers such as Linear discriminant

analysis LDA, neural networks , support vector machine SVM

. In this paper, EEG signals for left and right hand movement

imagery are utilized. Signals are filtered between 0.5 and 30

HZ. Features extraction is performed using different wavelet

functions, and support vector machine is used in the

classification.

II. METHODS

A. EEG Data Description

EEG motor imagery data utilized in this study is dataset III

available in BCI competition II (2003) [16]. EEG signals are

sampled with 128Hz and filtered between 0.5 and 30Hz.

Dataset consists of 140 trials of training data and 140 test trials,

each trial of 9s contains records acquired by electrodes C3, CZ

Fig. 1. Electrodes positions ( top) and timing scheme (bottom) [16].

and C4 according to the international 10-20 system of

electrode placement. In each trial, subject imagined left or

right hand movement between 3s and 9s. Dataset contain three

records:

x-train contains 140 training trials

x-test contains 140 test trials

y-train contains trials labels {1, 2}, respectively for

left and right hand movement, saved in x_train.

B. EEG Temporal Windowing

EEG dataset is composed of a train set and a test set

including each 140 trials of 9s length. Each trial is segmented

with sliding windows of 256 samples corresponding to 2

seconds with a shift of one point. In this way each trial is

composed of 385 EEG segments.

C. Wavelet Transform for Features Extraction

EEG signals recorded from channels C3 and C4, over

sensory-motor cortices; activated during movement

imagination; are analysed in order to assess sensory-motor

SSD'13 1569682619

1

2013 10th International Multi-Conference on Systems, Signals & Devices (SSD) Hammamet, Tunisia, March 18-21, 2013

978-1-4673-6457-7/13/$31.00 ©2013 IEEE

Page 2: [IEEE 2013 10th International Multi-Conference on Systems, Signals & Devices (SSD) - Hammamet, Tunisia (2013.03.18-2013.03.21)] 10th International Multi-Conferences on Systems, Signals

1 2 3 4 5 6 7 8 91011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556576061

rhythms mu [8 13] HZ [17] and beta [13 30] HZ located in the

centro-temporal region of the scalp. Indeed, the preparation or

imagination of movement is accompanied by a decrease of

power, named Event-Related De-synchronization (ERD) in mu

and beta rhythms, and an increase in power is observed in

these frequency bands after the end of movement called ERS

(Event Related Synchronization) [18]. In BCI, these events are

utilized to describe hand movements imagination [19].

In order to extract characteristics of EEG signals, different

wavelet families; Daubechies, Symmlet and Coiflet; are

utilized for EEG segment decomposition into frequency sub-

bands. Several wavelet functions are tested to find the

appropriate one for EEG decomposition [20, 21] as following:

1. Daubechies4, Daubechies6, Daubechies8,

Daubechies10, and Daubechies12

2. Coiflet2, Coiflet4, and Coiflet5

3. Symmlet5, Symmlet6, Symmlet7, Symmlet8,

Symmlet9, and Symmlet10.

EEG sampled at 128 HZ are decomposed into three levels,

three details sub-bands D1 - D3 and one final approximation

A3. Since relevant characteristics of hand movement

imagination exist in mu and Beta bands, Wavelet coefficients

of details D2 and D3 are considered and following statistical

parameters are created in order to reduce the size of features

vectors [20]:

1. P1: Mean of the absolute values of wavelet

coefficients of detail sub-bands { 2D, 3D

}

recorded from channels { 3C, 4C

}.

2. P2: Standard deviation of wavelet coefficients

3. P3: Average power of wavelet coefficients.

Parameters P1 and P3 provide information related to the

power spectrum of the signal, and parameter P2 presents the

variation in the power spectrum over time.

Each EEG segment is described by a vector of twelve

features representing statistical parameters computed from

wavelet coefficients of detail sub-bands { 2D, 3D

} recorded

from channels { 3C, 4C

}.

EEG segments of all trials are grouped into subsets

according to their occurrence in each trial, for example all

segments having occurrence number 1 and obtained from trials

number 1 to 140 are grouped into subset number 1. So, to

generalize segments having occurrence number k and obtained

from 140 trials are grouped into a subset number k, where k is

an integer from 1 to N, and N=385 is the total segments

number in one EEG trial.

Each one of the 385 EEG subsets, is described by a

features matrix composed of 140 rows corresponding to total

trials number and twelve columns corresponding to features

number. In this way, 385 features matrices are created for

train and test datasets as illustrated in Fig. 2.

Fig. 2. EEG trials segmentation and features extraction .

D. Support Vector Machine SVM

SVM is a strong binary supervised learning classifier, with

a high capacity of generalization . SVM is based on a general

linear model. In the presence of nonlinear trends in the data, a

kernel method is applied to map the data to a high-dimensional

kernel induced feature space. The maximization of margin

separating the chosen support vectors from the two classes, in

the training data, generate a decision boundary. The kernel was

chosen to be a nonlinear radial-basis function RBF kernel

with a penalty parameter c of 6 and a parameter of 0.5. We

use the LIBSVM program provided by Chang and Lin [22].

Each features matrix is converted to LIBSVM input data

format. The desired target output was set to {-1, 1}

respectively for right and left hand movement. Patterns from

140 trials are used in training session and 140 trials are

EEG subset n°1 EEG subset

n°385

EEG Trial segmentation

EEG segment n°

1

EEG segments (of 256

samples) numerated from 1 to

385

140 times for ALL EEG trials

Creation of EEG subsets

numerated from 1 to 385

EEG segment

n°1 from trial 1

................

EEG segment

n°1 from trial

140

EEG segment

n°385 from trial 1

................

EEG segment n°385 from trial

140

features matrix

n°1

features matrix

n°385

Features Extraction

2

Page 3: [IEEE 2013 10th International Multi-Conference on Systems, Signals & Devices (SSD) - Hammamet, Tunisia (2013.03.18-2013.03.21)] 10th International Multi-Conferences on Systems, Signals

1 2 3 4 5 6 7 8 91011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556576061

reserved for test. For each features matrix presented as input to

the classifier, SVM performance is estimated in terms of

classification accuracy based on the percentage of correct

recognition rate of hand movement classes, calculated as

following:

Accuracy= (number of correctly classified patterns / total

number of tested patterns)*100.

Moving average classification accuracy of 10 past segments

is employed to create curves showing the classification results

in figure 3, 4 and 5, as following:

ki

ki

iAccuracykaccuracyMav

9

))((*10/1)( (1)

III. RESULTS AND DISCUSSION

Table 1 illustrates highest classification results obtained for

different wavelet families and the corresponding optimal EEG

segments achieving these results.

Considering classification results achieved by SVM

classifier in table 1, among Daubechies wavelet functions

(DB4, DB6, DB8, DB10, and DB12), DB10 reached the

highest accuracy of 89.30% in segment (504- 760 samples); for

Coiflet wavelet functions (Coiflet2, Coiflet4 and Coiflet5)

highest accuracy of 89.30% is accomplished via Coiflet5 in

segment (466- 722 samples), and for Symmlet wavelet

functions (Symmlet5, Symmlet6, Symmlet7, Symmlet8,

Symmlet9 and Symmlet10) highest accuracy is 90% in EEG

segment (478- 734 samples ) using Symmlet5.

As seen in table 1, DB10, Coiflet5 and Symmlet5 wavelet

functions achieved highest classification accuracies via SVM

classifier, results accomplished via DB10, Coiflet5, and

Symmlet5 are illustrated respectively in Fig. 3, Fig. 4 and

Figure 5; where The x -axis represents the starting point of

EEG segments of size 256 samples; the y-axis represents the

moving average classification accuracy.

SVM classification results illustrated in Fig. 3, Fig. 4 and

Figure 5 show that immediately after announcing the

movement to imagine, the classification accuracy grows. It

peaks at the time of the actual movement imagination, and it

remains 2 s after.

TABLE I. HIGHEST CLASSIFICATION RESULTS OBTAINED FOR DIFFERENT

WAVELET FAMILIES USING SVM CLASSIFIER

Wavelet

family

Wavelet

function

Optimal EEG

segment

Highest

Classification

accuracy

Daubechies DB10 504-760 samples 89.30%

Coiflet Coiflet5 466-722 samples 89.30%

Symmlet Symmlet5 478-734 samples 90%

TABLE II. COMPARISON OF HIGHEST CLASSIFICATION RESULTS

OBTAINED FOR DIFFERENT WAVELET FAMILIES USING SVM CLASSIFIER, NEURAL NETWORKS MLP, AND LDA CLASSIFIER.

Classifier Wavelet

function

Optimal EEG

segment

Highest

Classification

accuracy

SVM Symmlet5 478-734 samples 90 %

MLP Coiflet5 544-800 samples 89.30%

LDA Symmlet10 482-738 samples 87.86 %

Fig. 3. Moving average classification accuracy achieved via DB10 wavelet

function and SVM Classifier.

Fig. 4. Moving average classification accuracy achieved via Coiflet5 wavelet

function and SVM Classifier

Fig. 5. Moving average classification accuracy achieved via Symmlet5

wavelet function and SVM Classifier

3

Page 4: [IEEE 2013 10th International Multi-Conference on Systems, Signals & Devices (SSD) - Hammamet, Tunisia (2013.03.18-2013.03.21)] 10th International Multi-Conferences on Systems, Signals

1 2 3 4 5 6 7 8 91011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556576061

In table 2, there is a comparison between the accomplished

highest results of SVM classifier and highest results achieved

by neural network multilayer perceptron MLP and linear

discriminant analysis LDA classifiers we obtained in a

previous study [23].

Considering LDA results accomplished by different

wavelet functions , highest result of 87.88% is reached by

Symmlet10.

For MLP neural network classifier, highest results of

89.30% is achieved by Coiflet5 . SVM classifier results

reached 90% using Symmlet5 wavelet function.

Comparing results in table 1 and table 2 , shows that SVM,

MLP and LDA results differ slightly, also based on previous

results [23], DB10 and Coiflet5 wavelets attain good

accuracies using either SVM, LDA and MLP classifiers.

IV. CONCLUSION

In this paper, EEG trials are segmented and prepared for

features extraction by temporal windowing of 256 samples

corresponding to 2s with a shift of one point. Features

extraction techniques based on different wavelet functions, are

applied in order to compare their effects on the classification

accuracy using SVM classifier, among them; Symmlet5

wavelet function reach a classification rate of 90%.

Comparison of SVM with MLP and LDA classification

results, show a slight difference in the achieved highest

accuracies. Tests achieved to find the appropriate wavelet

function for features extraction, the variation of classification

accuracies in time in different EEG segments indicated that

classification results depended on individual subject

concentration over time.

REFERENCES

J.R. Wolpaw, T.M. Vaughan and E. Donchin, “EEG based

communication prospects and problems,” IEEE Transactions on

Rehab. Engineering, vol.04, pp. 425-430, 1996.

Z.A. Keirn, and J.I Aunon, “A new mode of communication between

man and his Surroundings, ” IEEE Transactions on Biomed.

Eng, vol.37, pp.1209-1214, 1990.

S .Makeig, AJ. Bell, T-P . Jung, and TJ. Sejnowski, “Independent

component analysis of Electroencephalographic data, ”

Advances in Neural Information Processing Systems, vol.08,

pp. 145-151, 1996.

T-P .Jung, C. Humphries, TW .Lee, S. Makeig, MJ. McKeown, V.

Iragui, and TJ .Sejnowski, “Removing Electroencephalographic

Artifacts : Comparison between ICA and PCA,” Neural

Networks for Signal Processing VIII, pp. 63-72,1998.

P. Mark, K. Aleksandar, “Feature Extraction in development of

brain-computer interface: a case study, ” Proceedings of the

20th Annual International Conference of the IEEE Engineering

in Medicine and Biology Society, 2003.

R. Palaniappan, “Brain computer interface design using band powers

extracted during mental tasks, ” Proceedings of the 2

International IEEE EMBS Conference on Neural Engineering,

Arlington, Virginia, March 16 - 19, 2005.

N. Brodu, F. Lotte, and A. Lécuyer, “Comparative Study of Band-

Power Extraction Techniques for Motor Imagery

Classification,” IEEE Symposium on Computational

Intelligence, Cognitive Algorithms, Mind, and Brain (SSCI'2011

CCMB), pp. 1-6, 2011.

H. Ramoser, J. Muller-Gerking and G. Pfurtscheller, “Optimal spatial

filtering of single –trial EEG during imagined hand

movements,” IEEE Trans. Neural Syst. Rehabil. Eng, vol.08,

no.4, pp.441-446, 2000.

C.W. Anderson, E. Stolz, and S. Shamsunder, “ Discriminating

mental tasks using EEG represented by AR models, ” in IEEE

17th Annual Conference Engineering in Medicine and biology

Society, vol.02 , 1995.

C.W. Anderson, E.A. Stolz, S. Shamsunder, “ Multivariate

autoregressive models for classification of spontaneous

electroencephalographic signals,” IEEE Trans. Biomed. Eng,

vol.45, pp.277–286, 2004.

H. Adeli, Z. Zhou, and N. Dadmehr, “ Analysis of EEG records in an

epileptic patient using wavelet transform, ” J. Neurosci.

Methods, vol.123, no.1, pp. 69-87, Feb 2003.

M. Akay, “ Wavelet in biomedical engineering, ” Journal of Annals

of Biomedical Engineering., vol.23, pp. 529-530, 1995.

V. J. Samar, A. Bopardikar, R. Rao, K. Swartz, “Wavelet Analysis of

Neuroelectric Waveforms: A Conceptual Tutorial, ” Brain and

Language, pp.66: 7–60, 1999.

X. Zhang , L. Yin, W.Wang, “ Wavelet Time-frequency Analysis of

Electro-encephalogram (EEG) Processing, ” (IJACSA)

International Journal of Advanced Computer Science and

Applications, vol.01, no.5 , November 2010.

Lei Qin., “A wavelet-based time–frequency analysis approach for

classification of motor imagery for brain–computer interface

applications, ” J. Neural Eng, vol.02, pp. 65–72, 2005.

http://www.bbci.de/competition/ii/

G. Pfurtscheller, C. Neuper, A. Schlogl, and Lugger K.,

“Separability of EEG signals recorded during right and left

motor imagery using adaptive auto regressive parameters ”,

IEEE Transactions on Rehabilitation Engineering, vol.06,

pp.316-325, 1998.

G. Pfurtscheller, A. Stancfik Jr., G. Edlinger, “On the existence of

different types of central beta rhythms below 30 Hz”, Journal of

Electroencephalography and clinical Neurophysiology, vol.102,

pp. 316-325, 1997.

G. Pfurtscheller, C. Neuper, D. Flotzinger, and M. Pregenzer, “EEG

based discrimination between imagination of right and left

hand movement”, Electroenceph clin Neurophysiol, vol.103,

pp. 642-651, 1997.

P. Jahankhani , V. Kodogiannis, K. Revett, “ EEG signal

classification using wavelet feature extraction and neural

networks , ” IEEE John Vincent Atanasoff 2006 International

Symposium on Modern Computing, pp.52-57, 2006.

Y. Slim, K. Raoof, “Removal of ECG interference from surface

respiratory electromyography”, Innovation et Recherche

Biologique et Médicale IRBM, vol.31, no4, pp.209-220, 2010.

Chang C-C, Lin C-J, “LIB-SVM: a library for support vector

machines”, 2001. Software available at

http://www.csie.ntu.edu.tw/cjlin/libsvm

I. Homri, S. Yacoub, N. Ellouze, “EEG signal classification for

motor imagery", International Journal of Advancements in

Computing Technology. IJACT., in press.

4