You are on page 1of 6

Classification of EEG Signals in Four Groups,

Including Healthy Subjects with Open/Closed Eyes


and Epilepsy Subjects with/without Seizure by PSD
Estimate (Using the Multitaper Method) and ANN
Masoud Alipoor Mohammad Pooyan
MSc, Student of Electronics Engineering Assistant Professor, Department of Engineering
Islamic Azad University-Arak Branch Shahed University
Arak, Iran Tehran, Iran
my2010paper@gmail.com pooyan@shahed.ac.ir

Amir Abolfazl Suratgar


Assistant Professor, Department of Electrical Engineering
Amirkabir University
Tehran, Iran
a-suratgar@aut.ac.ir

Abstract— Electroencephalography (EEG) analysis by physicians EEG signals for diagnosis of epilepsy. In addition we recognize
is intricate, time consuming and needs to experience. Therefore eyes open or closed in healthy volunteers.
automated systems for EEG analysis and classification are able to
help physician. EEG signal in the field of time is raw and EEG signals are irregular signals that have been recorded
complex so it’s not suitable for automated system. Therefore by the mounted electrodes on the scalp. These signals are
appropriate features of EEG signal becomes extraction using provided to us information about the electrical activity of
signal processing methods (in this paper used Thomson multi neurons within the brain. EEG signals have stochastic
taper method’s (MTM)), then these features becomes waveforms with various frequency and amplitude. The
classification by ANN. Also we have to correct the ANN outputs International Federation of Societies for
by a threshold function. In this study, EEG signals are classified Electroencephalography and Clinical Neurophysiology has
in three groups (including epileptic patients with seizure or recommended the conventional electrode setting that called
without seizure and healthy volunteers) with 98.02% accuracy 10–20 system [1]. In some studies (research) more than 24
and in two groups (healthy with closed or open eyes) with 97.7% electrodes were used for EEG recording (for example 64, 128
accuracy. even 256).
Keywords: Automatic Diagnosis; Classification; Epilepsy; The electrical waves of brain basically have small
Electroencephalography (EEG); Power Spectral Density (PSD); amplitude (approximately 100µV) and the frequency range
Thomson Multitaper Method’s (MTM); Artificial Neural Network from 0.2 Hz to 100 Hz. The spectrum of the EEG signal
(ANN). (EEGs) is divided into four dominant frequency bands [2]-[4].
These frequency bands called delta (0.2- 3 Hz), theta (3- 8 Hz),
I. INTRODUCTION alpha (8-12 Hz) and beta (12-30 Hz) and these are indicating of
the brain activities. The EEGs of a normal subject in the awake
Electroencephalography (EEG) signals are used for state recorded with the scalp electrodes has the amplitude
diagnosis of many diseases that are related to the brain and its 10–100 µV and frequency 1-5 Hz. If the eyes are closed, then
activities [1]. Although the diagnosis of skilled experts using are produced frequencies 10-20 Hz.
the EEG is the best diagnosis, but digital signal processing and
artificial intelligent methods can help physicians to diagnose. An epileptic seizure is caused by the massive
EEG diagnosis methods by machine are rather than ocular synchronization of neuronal electrical activity. During the
diagnosis by EEG expert (because the EEG analysis is complex seizure, groups of neurons discharge synchronously, creating a
and needs to skill). Epileptic seizure detection via these large amplitude and frequency (1000 µV and 40 Hz) signal and
methods can prevent dangers that threat to the patient’s life leading to uncontrollable oscillations. Tumors, infections,
especially when we do not have access to a doctor. Therefore trauma, or metabolic and toxic disorders may be responsible
such methods are very useful. In this paper, we analyze the for the synchronized discharges. Epilepsy is the second most

April 20-22, 2010


978-1-4244-5969-8/10/$26.00 ©2009 IEEE Antalya, Turkey
98
common neurological disease. Its clinical symptoms may constructed to minimize the spectral leakage due to the finite
involve the loss of awareness, drop attacks, facial muscles and length of the data set. The optimal tapers or “eigentapers”
eye movements, aggressive outbursts, prolonged confessional belong to a family of functions known as discrete prolate
states, and flexor spasms of a whole body [5]. spheroidal sequences (DPSS, also known as Slepian
sequences) [9].
A. A Typical System to analyze the EEG Signal Includes: In addition, the MTM provides a time-bandwidth parameter
1) EEG signal recorded by placed electrodes on the scalp. which is used to balance the variance and resolution. This
2) EEG signal amplification and filtering (analog and parameter is defined as “NW” and it is the time-bandwidth
digital) for noise and artifact cancellation. product for the DPSS, also it is directly related to the number
3) Appropriate feature extraction from the EEG signal of tapers used to compute the spectrum. There are always
(using digital signal processing methods). [(2×NW)-1] tapers used to form the estimate. This means that,
as NW increases, there are more estimates of the power
4) Classification of the EEG features into different groups
spectrum, and the variance of the estimate decreases but each
using intelligent classifiers such as Artificial Neural Network estimate exhibits more spectral leakage (i.e., wider peaks) and
(ANN). the overall spectral estimate is more biased. For each data set,
EEG signal may be classified in various groups such as there is usually a value for NW that allows an optimal trade-off
normal or abnormal. In this paper, we use the EEGs of healthy between bias and variance [10].
and epilepsy groups in the awake status and are classified as in
figure 1. A. PMTM Computation
PMTM estimates the power spectral density of the time
II. RECORDING EEG DATA series using MTM [10]. Consider a p-dimensional zero mean
stationary stochastic process
We used the publicly available data described in [6]. The
complete data set consists of five sets (denoted A-E) each
containing 100 single channel EEG segments. These segments
were selected and cut out from continuous multi-channel EEG
X ( t ) = [ X (1, t ), X ( 2 , t ),..., X ( p , t )] T . (1)
recordings after visual inspection for artifacts, e.g., due to
muscle activity or eye movements. EEGs from five patients Here T denotes the matrix transposition. In
were selected, set A (healthy volunteer, eyes open) and B Neurophysiology for example, p refers to the total number of
(healthy volunteer, eyes closed), set C (hippocampal formation channels and hence X (t) can represent simultaneous
of opposite hemisphere) and D (epileptogenic zone) and set E measurement of electrical activity of those p channels. Let the
only contained seizure activity. All EEG signals were recorded sampling interval between observations be Δt, so that the
with the same 128-channel amplifier system, using an average Nyquist frequency is
common reference. The data were digitized at 173.61 samples
per second using 12 bit resolution. Band-pass filter settings 1
fN = .
were 0.53–40 Hz (12 dB/oct). In this study, we use all the data 2 × Δt
set (A-E).
The multitaper spectral estimator utilizes several different
III. THE MTM data tapers which are orthogonal to each other. The multitaper
cross-spectral estimator between channel l and m is the average
Different signal processing methods can be used for EEG of K direct cross-spectral estimators between the same pair of
signal analysis. In this study we use power spectral density channels (l and m) and hence takes the form
(PSD) estimation methods to extract useful features from raw
signal. Many PSD estimation methods are used by researchers
K −1
for signal analysis. In this paper we use Thomson multi taper 1
method’s (MTM) [7] that it is nonparametric method to PSD Sˆ lm ( f ) =
K
∑ Sˆ lm
k (f)
estimate. MTM is like the method of Blackman and Tukey k =0 . (2)
which attempts to reduce the variance of spectral estimates by
using a small set of tapers by Thomson, Percival and Walden
Here, Sˆ k ( f ) is the k th direct cross spectral estimator
lm
[8]. A set of independent estimates of the power spectrum is
computed, by pre-multiplying the data by orthogonal tapers between channel l and m and is given by
which are
1
Sˆ klm ( f ) = [ J kl ( f )] ∗ [ J km ( f )]
NΔt , (3)

Where
N is the number of return points from PMTM analysis, W
Figure 1. The EEG signals in awake status are classified to various groups.
is the half-bandwidth as W = NW/N with W Є (0, fN) and

99
J kl ( f ) = ∑h
N

t ,k X ( l , t ) e − i 2 π ft Δ t
y = f (w,b, x) = ∑ (w i ⋅ x i + bi )
t =1
I , (6)
, (4)

e = t− y. (7)
k = 0 ,1, 2 , 3 ,..., K .
A particular workflow for training an ANN is shown in
figure 3.
2 π k ( t + 1) We use multilayer perceptron neural network (MLPNN)
ht ,k = sin [15]. MLPNN using the backpropagation (BP) algorithm for
N +1 N +1 , (5) learning, that it is based on searching an error surface using
gradient descent for points with minimum error, is relatively
easy and fast to implement, so that transfer function in hidden
t = 0 ,1, 2 ,..., N − 1 . layers is the Tan-Sigmoid function and in output layer is the
Purelin function. Net output and error are computed as follow:
The Slepian sequence {ht,k} is the data taper (such as
figure 2) for the k th direct cross-spectral estimator Sˆ k ( f ) .
lm
y j = f ( ∑ w ji ⋅ x i )
, (8)

B. Advantages of MTM
The nonparametric spectral analysis methods have severe 1
bias problems for short data. In the multitaper method, for E =
2
∑ (y dj − y j )2
reducing variance we average over different tapers using the j . (9)
full data. Since the data length is not shortened, the bias is
smaller. The MTM by average of multitaper which are Where f is activation function, ydj is the desired value of
optimum windows and NW try to minimize variance and output neuron j and yj is the actual output of that neuron. Each
leakage in the PSD estimate [11], [12]. weight wji is adjusted to reduce error (E) as rapidly as possible.

IV. THE ANN Levenberg-Marquardt (LM) method is an optimum method


for net training and has more accuracy than other methods, but
After using MTM for feature extraction, then these features it is requires a lot of computing, hence the LM method is not
are fed into an Artificial Neural Network for classification. suitable for net training with large data. In this case, Scaled
Neural networks have been successfully used in a variety of Conjugate Gradient (SCG) method is suitable choice.
medical applications [13]-[15]. In contrast to the conventional
spectral analysis methods, ANN not only models the signal, but
V. THE SUGGESTED ALGORITHM FOR EEG SIGNAL
also makes a decision to classify the signal. In this paper, we
PROCESSING AND CLASSIFICATION (LPMTM-TNN)
use the “net” to mean network.
In Fig. 4, our suggested algorithm for EEG signals
A. An ANN includes: processing and classification has been shown.
1) Neuron: processing unit with linear or nonlinear
A. EEGs Features Extracting
transfer function.
2) Biases and weights: connection between neurons that In this section, if the NW be chosen optimally (see
their value will be regulated in net training. figure 11) then PMTM gives a better estimate that this is
dependent on the signal features within the frequency domain.
3) Topology of the network: number of net layers,
structure and number of neurons in any layer, connections In Fig. 5, 6 and 7 each sample in sample axis is the
method between net layers. obtained frequency spectrum (by PMTM or LPMTM with the
4) Net input (x), net output (y), net target (t), net error (e), N=88 and NW=22) from a single channel EEG segments of the
and transfer function (f). complete data set (denoted A-E). In other words, sample axis
0.2
includes 500 samples as every 100 samples belong to a group,
0.15

0.1

0.05
Magnitude

-0.05

-0.1

-0.15
0 10 20 30 40 50 60 70 80 90
Frequency (Hz)

Figure 2. Slepian sequence tapers with NW=1.5 and three tapers. Figure 3. A particular workflow for training an ANN.

100
Figure 6. EEGs analysis by LPMTM in 3D space so that 100 samples
belonging to group A have similar frequency spectrum and magnitude. Also
this theorem is true for group B, group E and 200 sample belonging to group
CD.

We selected the logarithm based 2 because if the base is


selected large, then the resolution is reduced. We have called
this method to the “LPMTM”. This method provides a
spectrum of EEG signal that each group (group A/B/CD or E)
Figure 4. Suggested EEGs Classification Algorithm in this study can be separable from other groups and this result is visible in
figure 7.
so that:
B. EEGs Features Classification
• Group A: healthy volunteer with open eyes, samples
1-100. In this section, the EEGs features are normalized in order to
simplify the computation and reduce the net error caused by a
• Group B: healthy volunteer with closed eyes, samples malformed input (that causes the divergence of net training).
101-200. We use MLPNN with feed-forward structure (Figure 8) also
SCG and GDM (Gradient Descent with Momentum) training
• Group CD: epileptic without seizure, samples 201-400.
algorithms.
• Group E: epileptic with seizure, samples 401-500.
The obtained magnitude from the EEG signal analysis by
PMTM is in the epileptic patient with seizure (group E) much
more than other groups (groups A, B, C and D), see figure 5.
Hence by this method, EEGs can be classified with high
accuracy only in the two groups (ABCD or E). To solve this
problem, we use nonlinear function of the logarithm to reduce
this large difference (see figure 6).

Figure 7. EEGs analysis by LPMTM in 2D view so that samples from each


group have similar frequency spectrum and magnitude and the difference
between magnitude of various groups in specific frequency ranges makes an
ability for separate groups from each other. The obtained magnitude from the
EEGs analysis by LPMTM shown as the color density.
a: the “AB-Diff. Zone” represents the diffrence zone between two groups A
and B from the standpoint of magnitude in frequency range 10-20 Hz.
Figure 5. EEGs analysis by PMTM so that the magnitude of samples 401- b: the “AB-Sim. Zone” represents the similar zone between two groups A and
500 (group E) is much more than the magnitude of samples 1-400 (groups A, B from the standpoint of magnitude in frequency range 1-6 Hz.
B, C and D). B1 is samples 101-158 and B2 is samples 159-200.

101
Performance of our method was evaluated according to
conventional methods of performance evaluation. For this aim
accuracy of the ANN was calculated. For example a result was
Figure 8. The net structure used in this study for the classification of three as: fault in Group AB=0, fault in Group CD=1, fault
groups. in Group E=3 so accuracy was in Group AB =100%,
in Group CD =99%, in Group E =94% and the total accuracy
The advantages of this net are fast performance and require was 98.40% for three groups (AB, CD and E).
little memory (that these are useful for a diagnosis machine),
because Train-GDM is a network training function that updates
VI. RESULTS
weight and bias values according to gradient descent with
momentum (response to the error level changes, apart from the To get the best N and NW, we tested the net 20 times for
small error) and Train-SCG is a network training function each N and NW. The average accuracy of 20 times is shown in
consist LM and Conjugate Gradient algorithms, but this figure 11. The best average accuracy was 98.02% in the
algorithm does not perform a long time line search at each NW=46 and N=175 (from N=44, N=88 and N=175) with a
iteration. The good performance of ANN depends on proper minimum accuracy of 96% and a maximum accuracy of
selection of net structure, number of net layers and number of 99.2%. Until now EEG signals are classified in three groups
neurons per layer . (AB, CD and E) with 98.02% accuracy. In the next part we
separated two groups A and B from each other.
Half of data (250 samples from 500 samples) used
randomly for the net training and other data (other 250 In this part, the LPMTM-TNN is used similar to the
samples) used for the net examination. Amount of validation previous part but for the classification of two groups A and B
fail in the net training is equal zero also as shown in figure 9 by a net as figure 12. In this part we use the frequency
the net training error is strictly falling. spectrum of EEGs that is in the frequency range 8-88 Hz and
remove part of the EEGs spectrum that includes frequencies
The net targets for groups selected based on a linear below 8 Hz, because maximum spectral similarity between
relationship with the spectral magnitude of each group in figure groups A and B is in the frequency range 1-6 Hz (AB-Sim.
7 so that AB= -1, CD=0 AND E=1. In the net training stage, zone in Figure 7). In the training stage, net is first trained with
net is first trained with group AB, then with group CD and group A (with net target A = -1) and then with group B (with
finally with group E. In the net examination stage, the data are net targets B1=1 and B2=1). In the net examination stage, the
entered to the net randomly from each group. Often the net AB data set are fed to the net randomly. Also when
settings are the default of the matlab software (version 7.6), ANN-output ≤ 0 then TNN-output is -1 and when
epochs=200 and Performance Function=Mean Square Error ANN-output > 0 then TNN-output is 1. The best average
(MSE). accuracy was 98.5% in the NW=26 and N=175 (from N=88
and N=175). The average accuracy of 20 times is shown in
C. Net Output Correction figure 13. In this part, if we use group B (not groups B1 and B2
After EEGs features classification by ANN, a multi-level separately) then the average accuracy will be 97.7% in the
threshold function is used to correct the net output. So when NW=14 and N=175.
ANN-output < -0.5 then TNN-output is -1, when 99
-0.5 ≤ ANN-output ≤ 0.5 then TNN-output is 0 and when
ANN-output > 0.5 then TNN-output is 1 (see figure 10). 98
Accuracy (%)

97

96

95
0 20 40 60 80 100
NW
Figure 11. The NW effect on the classification accuracy. The best of average
Figure 9. The net training error is strictly falling with performance function accuracy is 98.02% with NW =46 and N=175 that obtained from 20 times of
of MSE. net testing with randomly data.

a: ANN Operation c: TNN Operation


1 1
b: Threshold Function
1
ANN output

TNN output

0.5 0.5
Output

0.5

0 0
0
-0.5

-0.5 -1
-0.5
Figure 12. The net structure used in this study for the classification of two
-1 -0.5 0 0.5 1 groups.
-1 Input
-1
50 100 150 200 250 50 100 150 200 250
ANN input TNN input

Figure 10. The classification improved after using the threshold function.
a: ANN Operation, b: Threshold function, and c: TNN Operation.

102
100 [4] B.W.Jervis, M. Coelho, G.W.Morgan, “Spectral analysis of EEG
98 responses,” Springer Berlin / Heidelberg, Medical and Biological
Engineering and Computing, vol. 27, pp. 230-238, 1989.
Accuracy (%)

96
[5] J. S. Dunkan, S. D. Shorvon, and D. R. Fish, Clinical Epilepsy. New
94 York: Churchill Livingstone, 1995.
92 [6] Andrzejak et al., 2001 for making the data publicly available at
http://www.meb.unibonn.de/epileptologie/science/physik/eegdata.html.
90
[7] D. J. Thomson, "Spectrum estimation and harmonic analysis," In
88 Proceedings of the IEEE, Bell System Technical Journal, vol. 57 , pp.
0 20 40 NW 60 80 100 1371–1430, 1978, vol 70 , pp. 1055–1096, 1982.
[8] SSA-MTM Toolkit for Spectral Analysis, SSA-MTM Group,
Figure 13. The NW effect on the classification accuracy for two groups A and Department of Atmospheric Sciences, University of California, Los
B. Angeles, Jan. 31, 2000,
http://www.atmos.ucla.edu/tcd/ssa/guide/mann/mann4.html .
[9] Slepian D, Pollak H.O., “Prolate spheroidal wavefunctions Fourier
VII. COMPARISON analysis and uncertainty,” I. Bell Syst Tech. J., vol. 40, 1961 ,pp. 43–63.
As shown in table I, in compare with previous works, our [10] Serban, M.-C., Dobrea, D.M., “Central Physiological Tremor Oscillators
method has better accuracy for the classification of three within a Hemifield Repetitive Visual Stimulation Paradigm,” 28th
groups (1- healthy (AB), 2- epilepsy without seizure (CD), and Annual International Conference of the IEEE, 2006, pp. 4478-4481.
3- epilepsy with seizure (E)). Two groups A and E are [11] Nalatore, H., Rangarajan, G., “Short-window spectral analysis using
AMVAR and multitaper methods: a comparison,” Biological
classified by our method with 100% accuracy, but some Cybernetics, Springer, 27.05.2009, vol. 101, no. 1, pp. 71-80.
previous works have had 100% accuracy [17]. [12] Wieczorek, M. A. and F. J. Simons, “Minimum-Variance Multitaper
Spectral Estimation on the Sphere,” Journal of Fourier Analysis and
Applications, vol. 13, Springer, 2007, pp. 665-692.
TABLE I. COMPARISON WITH OTHER METHODS FOR EEGS
CLASSIFICATION IN THREE GROUPS [13] N. F. Güler, E. D. Übeyli, and İ. Güler, “Recurrent neural networks
employing Lyapunov exponents for EEG signals classification,” Expert
Groups Accuracy Year Author Systems with Applications, vol. 29, no. 3, pp. 506–514, 2005.
A, D and E 96.79 % 2005 Güler et al. [13] [14] N. Sadati, H. R. Mohseni, and A. Maghsoudi, “Epileptic seizure
A, D and E 85.9 % 2006 Sadati et al. [14] detection using neural fuzzy networks,” in Proceedings of IEEE
A and E 100% 2008 Polat et al. [17] International Conference on Fuzzy Systems (FUZZY ’06), pp. 596–600,
A, D and E 94.07 % 2009 Sheng Bao et al. [16] Vancouver, BC, Canada, July 2006.
A, D and E 94.83 % 2009 Übeyli [15] [15] Elif Derya Übeyli, “Combined neural network model employing wavelet
AB, CD and E 98.02 % 2010 Our coefficients for EEG signals classification,” ScienceDirect: Digital
Signal Processing, pp. 297-308, 2009.
CONCLUSION [16] Forrest Sheng Bao, Jue-Ming Gao, Jing Hu , Donald Y. C. Lie , Yuanlin
The EEG signal has the various statuses (e.g. healthy or Zhang , and K. J. Oommen, “Automated Epilepsy Diagnosis Using
Interictal Scalp EEG” 31st Annual International Conference of the IEEE
epileptic) and we can classify them. The EEG signals from EMBS Minneapolis, Minnesota, USA, September 2-6, 2009.
each group have similar frequency spectrum and magnitude, so [17] Kemal Polat, Salih Günes, “Artificial immune recognition system with
difference between magnitude of various groups in specific fuzzy resource allocation mechanism classifier, principal component
frequency ranges makes an ability for separate groups from analysis and FFT method based new hybrid automated identification
each other. In this study, first the EEGs features are extracted system for classification of EEG signals,” ScienceDirect: Expert
of the EEGs time series by LPMTM (the LPMTM is the Systems with Applications vol. 34, pp. 2039–2048, 2008.
logarithm base 2 of the PSD using the MTM) then these
features are classified by ANN and finally a multi-level
threshold function is used to correct the net output. We
introduce this novel method for the EEGs classification called
LPMTM-TNN. Overall accuracy obtained by this method is
98.02% for the classification of three groups (healthy and
epileptic patient with/without seizure) and 97.7% for the
classification of two groups (healthy with open/closed eyes).
The good accuracy obtained in this method is depended to
MTM, suitable NW, ANN structure and net training method.

REFERENCE:
[1] Saeid Sanei and J.A. Chambers, EEG Signal Processing, John Wiley &
Sons Ltd, 2007, ISBN 978-0-470-02581-9.
[2] Niedermeyer E, Lopes da Silva F. Electroencephalography: Basic
Principles, Clinical Applications, and Related Fields. 5 th
ed. Baltimore: Williams & Wilkins, 1993.
[3] M.Tplan, Fundamental of EEG measurement, Measurement Science
Review, vol. 2, Section 2, 2002.

103

You might also like