Naderi-EEG-Paper

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/251989632

Analysis and classification of EEG signals using spectral analysis and recurrent
neural networks

Article · November 2010


DOI: 10.1109/ICBME.2010.5704931

CITATIONS READS
57 564

2 authors, including:

Homayoun Mahdavi-Nasab
Islamic Azad University, Najafabad Branch, Najafabad, Isfahan, Iran
33 PUBLICATIONS 292 CITATIONS

SEE PROFILE

All content following this page was uploaded by Homayoun Mahdavi-Nasab on 31 January 2019.

The user has requested enhancement of the downloaded file.


Analysis and classification of EEG signals using
spectral analysis and recurrent neural networks
Mohammad Ali Naderi Homayoun Mahdavi-Nasab
Electrical Engineering Department, Islamic Azad Univ. Electrical Engineering Department, Islamic Azad Univ.
Najafabad Branch Najafabad Branch
Najafabad, Esfahan, Iran Najafabad, Esfahan, Iran
[email protected] [email protected]

Abstract: This study proposes a three stages technique for development of such automated devices, due to the increased
automatic detection of epileptic seizure in EEG signals. In use of prolonged and long-term video EEG recordings for
practical application of pattern recognition, there are often proper evaluation and treatment of neurological diseases and
diverse features extracted from raw data which needs to be prevention of the possibility of the analyst missing (or
recognized. Proposed method is based on time series signal, misreading) information is essential [1],[2].
spectral analysis and recurrent neural networks (RNNs). Neural networks (NN) are structures built up of many
Decision making was performed in three stages:(i)feature nodes, each one simulating (in a very simplified way) the
extraction using Welch method power spectrum density behaviour of biological neuron. Neuron behaviour is governed
estimation (PSD) (ii)dimensionality reduction using statistics over
by very simple rules but they result in a classification tool. NN
extracted features and time series signal samples (iii)EEG
has an important role in a variety of applications like pattern
classification using recurrent neural networks. This study shows
that Welch method power spectrum density estimation is an recognition and classification tasks [3].
appropriate feature which well represents EEG signals. We In this study we proposed a new method for EEG
achieved higher classification accuracy (specificity, sensitivity, classification based on Welch method power spectral density
classification accuracy) in comparison with other researches to estimation and recurrent neural networks. This method has
classify EEG signals exactly 100% in this study. three stages (i) feature extraction using FFT based Welch
method spectral analysis (ii) dimensionality reduction using
Keywords-EEG signals classification, Welch PSD, Recurrent statistics over each EEG segment and features extracted in
neural networks, Sensitivity, Specificity. pervious stage (iii) classification task using recurrent neural
networks. In this paper we worked on two classes (epileptic
I. INTRODUCTION and normal) of EEG signals. First of all we divided each class
dataset to 1600 segments using a rectangular window with 256
The whole process of methodologies used for automated discrete data. Then we applied Welch (FFT) method on each
diagnosis can be subdivided into a number of separated EEG segment and we obtained 129 attributes. In the next stage
processing modules: pre-processing, feature extraction/selecti- we reduced the dimension of each feature vector using
on and classification. The essential operation in the course of statistics over feature vectors and time series EEG segments.
the pre-processing includes signal/image acquisition, artifact We achieved feature vectors with 8 attributes. Finally we
removing, averaging, thresholding, signal/image enhancement applied recurrent and MLP neural networks as a classifier for
and edge detection. Since signal/image acquisition contributes classification of EEG signal to epileptic and healthy. These
significantly to the overall classification results, its accuracy is networks were implemented using MATLAB R2008a
very important. The feature extraction module subsequently software package with neural networks toolbox and results
processes the markers. The module of feature selection is an were compared from the specificity, sensitivity and
optional stage, wherewith the feature vector is reduce in size classification accuracy point of views. The flow chart of the
including only, from the classification viewpoint, what may be proposed system was shown in Fig.1.
considered as the most relevant features required for
discrimination. The final stage in automated diagnosis is the II. MATERIAL AND METHODS
classification module. The input feature vector is examined by
In this study, EEG signals, publicly available data described
classification module and based on its algorithmic nature,
in [4] was used. The data were processed using Welch method
produces a suggestive hypothesis [1]. power spectral density estimation and statistical features. Then
One of the most common sources of information used to
we used recurrent and MLP neural networks as classifier on
study brain abnormalities is Electroencephalogram (EEG)
these processed data for classification EEG signals to normal
which is a highly complex signal. EEG monitoring systems
and epileptic.
generate a lot of data for electroencephalographic changes, so
their complete visual analysis is not routinely possible.
Computers have long been proposed to solve this problem and A. Data description and selection
thus, automated systems to recognize electroencephalographic We used the data described in [4], which is publicly
changes have been under study for several years. The available. Regardless the different recording electrodes used
for extracranial and intracranial EEG registration, all other

PDF created with pdfFactory Pro trial version www.pdffactory.com


recording parameters were fixed. Some of the morphological where N is the total number of observed samples and K=N/L,
characteristics of the different EEG time series under and if there is 50% overlap, K=2N/L-1. The i-th sequence is
examination, which are obvious to an expert’s eye, will be xi [n] = x[n + (i − 1) D], n ∈ {0,1,..., L − 1} (2)
sketched in the following. where i=1,2,...,K, and its periodogram by
EEG time series recorded extracranially during the relax
state of healthy subjects with eyes closed show a predominant
2
physiological rhythm, the so-called alpha rhythm in a L−1
frequency range of 8-13 Hz, an activity which is most
pronounced at the back of the head. In contrast, broader
(i )
PˆM ( f ) = 1/ L ∑ w[n]xi [n]e j 2πfn . (3)
n=1
frequency characteristics are obtained for open eyes. EEG (i )
time series are also recorded intracranially in humans, Here PˆM ( f ) is the modified periodogram of the data
however only in the framework of a presurgical evaluation of because the samples x[n] are weighted by a nonrectangular
focal epilepsies. In this context implantation of electrodes is
window w[n] . The Welch spectrum estimate is then given by
carried out to exactly localize the seizure generating area
which is termed the epileptogenic zone. During the seizure K
free interval the EEG recorded from within the epileptogenic PˆB ( f ) = 1 / K ( ∑ PˆMi ( f )). (4)
zone is often characterized by intermittent occurrences of so- i =1
called interictal epileptiform activities. Investigation of these By permitting overlap of sequences, we can form more
steep, sometimes rhythmic high amplitude patterns in EEG segments than in the case of Bartlett’s method. Also, if we
recordings contributes to localization of the epileptogenic keep the same number of segments, the overlap allows for
zone. Finally, the EEG recorded during epileptic seizure, longer segments. The increased number of the segments
termed ictal activity, is almost periodic and of high amplitude, reduces the variance of the estimators, and the longer
resulting from hypersynchronous activity of large assemblies segments improve its resolution. Thus, with the Welch method
of neurons. we can trade reduction in variance for improvement in
The complete data set consists of five sets (denoted A-E) resolution in many more ways than with the Bartlett’s method.
each containing 100 EEG signals of 23.6 s period. After visual It can be shown that if the overlap is 50%, the variance of the
inspection for artifacts, e.g., due to muscle activity or eye Welch estimator is approximately 9/16 of the variance of the
movements, we select the signals and cut out them from Bartlett estimator [7].
continuous multichannel EEG recordings. Sets A and B
consisted of signals taken from surface EEG recordings that C. Recurrent neural networks
were carried out on five healthy volunteers using standardize Multilayered architecture is a special architecture of neural
electrode placement scheme. models. With respect to the direction of their connection,
Volunteers were relaxed in an awake state with eyes open multilayered networks are divided to feed forward and
(A) and eyes closed (B), respectively. Sets C, D, and E feedback networks. Highly nonlinear dynamic mappings can
originated from the EEG archive of presurgical diagnosis. The be performed by RNNs and therefore have temporally
EEGs from five patients were selected, all of them had extended application, whereas multilayer feed forward
achieved complete seizure control after resection of one of the networks are confined to performing static mappings. RNNs
hippocampal formations, which was therefore correctly have many applications such as associative memory,
diagnosed to be the epileptogenic zone. Signals in set D were spatiotemporal pattern classification, control, optimization and
recorded from within the epileptogenic zone, and those in set generalization of pattern sequences.
C from the hippocampal formation of the opposite hemisphere Fully recurrent networks use unconstrained fully
of the brain. All EEG signals were recorded with the same interconnected architectures and learning algorithm that can
128-channel amplifier system, using an average common deal with time-varying input and /or output in nontrivial ways.
reference. After 12 bit analog-to-digital conversion, the data Fully recurrent networks are still complicated when dealing
were written continuously onto the disk of data acquisition with complex problems. Therefore, partially recurrent
computer system at a sampling rate of 173.61 Hz. Band-pass networks whose connections are mainly feed forward were
filter setting were 0.53-40 Hz [1]-[3],[5]-[6]. used including a carefully chosen set of feedback connections.
In this paper we used two classes data sets, normal and In this study Elman RNN were used as a classifier. An Elman
epileptic (set A and E), for EEG signals classification. RNN is a network which is set up as a regular feed forward
network. Architecture of Elman recurrent neural network is
B. Spectral analysis using Welch method shown in Fig.2. All neurons in one layer are connected with
The Welch method is a power spectrum density estimator all neurons in the next layer. A copy of the output of the
that applies the periodogram. It is based on Bartlett’s idea of hidden neurons is held in neurons in context layer. The output
splitting of the data into segments and finding the average of of each hidden neuron is copied into a specific neuron in the
their priodograms. Difference is that the segments are context layer. Therefore the Elman network has an explicit
overlapped, where the overlaps are usually 50% or 75% large, memory of one time lag.
and the data within the segment are windowed. L is the length The weights from the hidden layer to the context layer are
of the segments, the i-th segment is denoted by {xi [n ]}0L−1 , set to one and are fixed in an Elman network because the
values of the context neurons have to be copied exactly. We
and the offset of the successive sequences by D samples. Then can train the Elman network with gradient descent
N = L + D(k − 1) (1) backpropagation algorithm. The backpropagation has some

PDF created with pdfFactory Pro trial version www.pdffactory.com


y1 output layer yn
Raw EEG signals

SPECTRAL ANALYSIS
FFT based Welch method: 129 attributes
hidden layer context layer
… …
DIMENSIONALITY REDUCTION
Statistics over feature vectors: 8 attributes


CLASSIFICATION
Recurrent neural networks
x1 input layer xn

Fig.2: Architecture of Elman recurrent neural networks


CLASSIFICATION RESULT
Epileptic seizure and healthy
were used to reduce the dimension of the feature vectors. To do
this the following statistical features were used:
• Maximum of each EEG time series segment and
Fig.1: the flow chart of the proposed technique maximum of power levels of the Welch method.
• Minimum of each EEG time series segment and
problems like that gradient descent may get stuck in local minimum of power levels of the Welch method.
minima. The Levenberg-Marquardt algorithm is least-squares
• Mean of each EEG time series segment and mean of
estimation. This algorithm combines the best features of the
power levels of the Welch method.
Gauss-Newton technique and the steepest-descent algorithm
but avoids many of their limitations [1]. • Standard deviation of each EEG time series segment
and standard deviation of power levels of the Welch
method.
III. PROPOSED SYSTEM Using the above mentioned statistical features the
dimension of each feature vector was reduced to 8 attributes.
In this study, we proposed a new scheme for detection of In this research we proposed recurrent neural networks (RNN)
epileptic seizure in EEG signals using power spectrum density as a classifier for classification of two classes (epileptic
(PSD) estimation and recurrent neural networks. This system is seizure and healthy) of EEG signals. The RNN network was
implemented using MATLAB R2008a software package (with implemented with MATLAB software with neural networks
neural networks and signal processing toolboxes). In this toolbox.
research we choose two types (epileptic seizure and normal) of 100 time series of 4096 samples for each class of EEG
EEG signals that are publicly available for use in [4]. signals (epileptic seizure and normal) were divided into 1600
Selection of the NN inputs is the most important comp- segments of 256 samples for each class. The training and test
onent in designing the NN for pattern classification since even data sets of neural networks were formed by 3200 vectors
the best classifier will perform poorly if the inputs are not (1600 vectors with 8 attributes for each class).We assigned
selected well. Transforming of NN input data into a more 1600 vectors (800 vectors from each class) for training set and
appropriate representation can facilitate the learning process. 1600 vectors (800 vectors from each class) for test set. In
Using a smaller number of parameter, which are often called order to examine the performance of the RNN, for the same
features, to represent the signal under study is particularly classification problem, the multilayer perceptron neural
important for recognition and diagnostic purpose [2]. network (MLPNN) with the Backpropagation learning
First of all, we divided each class of EEG signals to 1600 algorithm was used.
segments which was formed into 256 discrete data using a
rectangular window. The length of each EEG segment was 256 IV. EXPERIMENTAL RESULTS
samples. In Fig.3, EEG signals belonging to two classes were
shown. Then FFT based Welch method was applied to each The performance of the classifier in this scheme was
EEG segment to obtain power spectral density (PSD) of each calculated by following measures.
segment. After applying Welch method PSD the number of • Specificity: number of correct classified healthy
samples in each segment was reduced from 256 samples to 129 segments/ number of total healthy segments.
samples. High dimension feature vectors increased • Sensitivity: number of correct classified epileptic
computational complexity. To solve this problem, statistics seizure segments/ number of total epileptic seizure
over the time series EEG segments and power levels of PSD segments.

PDF created with pdfFactory Pro trial version www.pdffactory.com


TABLE 1: The classification performances

Classifiers Specificity Sensitivity Classification


(%) (%) accuracy (%)
RNN 100% 100% 100%
MLPNN 99.75% 98.12% 98.93%

TABLE 2: Comparison of different methods for EEG classification

method Classification accuracy


A neural network based method[8] 97.2%
Wavelet coefficient and combined NN[2] 94.83%
Current work 100%

19, pp. 134-143, 2008


[2] E.D. Ubbeyli, "Combined neural network model employing wavelet
coefficients for EEG signals classification", Digital Signal
Processing, Vol.19, pp. 297-308, 2008
Fig.3: Examples of EEG signals of epileptic and normal subjects [3] G. Tezel, E.D. Ubbeyli, "A new approach for epileptic seizure
detection using adaptive neural network", Expert Systems with
Applications, Vol.36, pp.172-180, 2007
• Classification accuracy: number of correct classified
[4] http://www.meb.uni-bonn.de/epileptogie/science/physik/eegdata.html
segments/ number of total segments.
[5] E.D. Ubbeyli, "Lyapunov exponent/probabilistic neural networks for
The classification performances (specificity, sensitivi- analysis of EEG signal", Expert Systems with Applications, Vol.37,
ty, total classification accuracy) on the test datasets were pp.985-992, 2009
presented in TABLE 1. [6] K. Polat, S. Gunes, "artificial immune recognition system with fuzzy
In TABLE 2 the performance of the proposed method resource allocation mechanism classifier, principal component
were compared with other algorithms. It shows obviously analysis and FFT method based new hybrid automated identification
that the current work has higher accuracy than other system for classification of EEG signals", Expert Systems with
Applications, Vol.34, pp.2039-2048, 2007
methods.
[7] Digital Signal Processing Handbook, Chapman & Hall/ CRC Press
As can be seen from results, we conclude that Welch LLC, London, 1999, pp. 336-337
method PSD presents very strong features which well
[8] V.P. Nigam, D. Graupe, "A neural-network-based detection of
represent EEG signals and by usage of these features a good epilepsy", Neurol. Res., Vol.26, pp. 55-60, 2004
distinction between classes can be obtained. Also statistical
features were used in dimensionality reduction of the
extracted feature vectors representing the EEG signals
(these statistical features were used as inputs of the
classifier). The classification results indicate that RNN has
considerable success in classification of EEG signals.
V. CONCLUSION
The aim of this study was to find a new scheme for
classification of EEG signals and detection of epileptic
seizure with high accuracy using power levels of PSD and
neural networks. This study demonstrates that Welch
method power spectrum density estimation provides very
strong features which well represent EEG signals. The high
dimension of feature vectors increases computations. In
order to solve this problem, statistical features were
obtained from extracted feature vectors and time series EEG
segment. The dimension of feature vectors was reduced to 8
attributes. Then for classification of these feature vectors,
we used recurrent neural networks (RNN) as a classifier.
For performance evaluation of proposed system, we
computed sensitivity, specificity and classification accuracy
(100%) using recurrent neural networks as a classifier.
REFERENCES
[1] E.D. Ubbeyli, "Analysis of EEG signals by implementing eigenvector
methods /recurrent neural networks" , Digital Signal Processing, Vol.

PDF created with pdfFactory Pro trial version www.pdffactory.com


View publication stats

You might also like