You are on page 1of 4

2012 International Conference on Advances in Computing and Communications

Classification of Normal and Epileptic EEG Signal


using Time & Frequency Domain Features through
Artificial Neural Network
Anusha K S, Mathew T Mathews, Subha D.Puthankattil
Department of Electrical Engineering, National Institute of Technology,
Calicut, Kerala,India
anukutts@gmail.com
mathewtmathews@gmail.com
subhadp@nitc.ac.in
requires highly trained professionals. The presence of
epileptic form activity in the EEG, confirms the diagnosis of
epilepsy which sometimes can be confused with other
disorders producing similar seizure like activity.
Traditional methods rely on experts to visually inspect
the entire length EEG recordings of up to 1 week, which is
tedious and time-consuming. Therefore, many automated
systems assisting the diagnosis of epilepsy have emerged.
They could detect abnormal EEG segments related to
seizures so that doctors can quickly view events of interest
without having to page through the entire recording. But this
approach requires the presence of seizure activities in the
EEG data. This tough requirement often leads to very long,
even up to 1 week, continuous EEG recording to capture
seizure activities because of the difficulty to tell if and when
a seizure will occur. The long-term EEG recording can
greatly disturb patients daily lives. Another clinical concern
is that, 50-75% of epileptic patients in the world reside in
areas lacking medical resources and trained professionals,
which makes the long-term EEG recording virtually
impractical. Therefore, an automated EEG epilepsy
diagnostic system would be of significance to make out the
subtle changes due to seizure. This would make the
diagnosis easier.
Several techniques have been proposed to automate the
diagnosis of epilepsy in order to overcome the difficulty of
epilepsy diagnosis using conventional methods. Gotman first
presented a computerized system to detect seizure [1]. Weng
et al. introduced a real time method to detect epileptic EEG
[2]. He used epoch method to split EEG to acquire required
features. This work proposes sliding window technique to
classify normal and epileptic EEG signals using Feedforward
Artificial Neural Network.

Abstract Epilepsy is one of the important brain disorders,


characterized by sudden recurrent and transient disturbances
of mental function and movements of body, which is caused
from excessive neuronal activity due to highly frequent
electrochemical impulses from the neurons. This excessive
discharge is shown in EEG as epileptic spikes which are
complementary source of information in diagnosis and
localization of epilepsy. Currently there are many techniques
for the diagnosis and monitoring of epilepsy. Artificial Neural
Networks (ANN) have proved to be an effective approach for a
broad spectrum of applications for EEG signals because of its
self-adaptation and natural way to organize and implement the
redundancy. This paper proposes a neural-network-based
automated epileptic EEG detection system that uses
Feedforward Artificial Neural Network incorporating sliding
window technique for pattern recognition. This work utilizes
100 single channel EEG signals obtained from the database of
Epilepsy Centre in Bonn, Germany. The algorithm was
trained with 50 datasets and tested for 25 normal data and 25
epileptic data sets. The performance of classification using
Feedforward Artificial Neural Network gave a high success
rate of 93.37% for distinguishing normal signals and 95.5% for
epileptic signals.
Keywords- Epilepsy; Electroencephalogram (EEG); seizure
detection; Feedforward network; Artificial Neural Network.

I.
INTRODUCTION
The Electroencephalogram (EEG) is an easy and safe
technique to monitor the brain function. EEG measurements
are obtained from electrodes placed on the surface of the
scalp; these waveforms represent a very gross type of
summation of potentials that originate from an extremely
large number of neurons in the vicinity of the electrodes.
Electroencephalography is an important clinical tool,
diagnosing, monitoring and managing neurological disorders
related to epilepsy. Electroencephalographer (EEGer),
although guided by the general definitions for epileptogenic
sharp transient waveforms, uses additional subjective criteria
based on contextual information and other heuristics to reach
decision. Therefore, visual screening of the EEG records
978-0-7695-4723-7/12 $26.00 2012 IEEE
DOI 10.1109/ICACC.2012.21

II.

EEG CHARACTERISTICS AND EEG DATA SELECTION

EEG is a random, dynamic signal that exhibits non


stationary behavior. It has amplitude ranging from less than
10V to over 100 V. The frequency varies from below 1Hz
to over 100Hz.

98

The data set for the analysis was obtained from EEG
database of Epilepsy Centre, Bonn, Germany [4, 5]. It
contains 5 sets of data (A-E), of which we selected set A and
set E for the analysis in the work proposed. Set A consists of
segments taken from surface EEG recordings that were
carried out on ve healthy volunteers using a 10-20
standardized electrode placement scheme. Set E consists of
records with seizure activity. Each data set contains 100
single-channel EEG segments of 23.6-sec duration [6].The
sampling rate of the signal is 173.61Hz.
Fig.1. (a) and 1. (b) represents a 2 sec epoch normal
and epileptic EEG signal respectively.

Figure 2 Schematic for seizure detection

PRE-PROCESSING STAGE

NORMAL EEG
150

The acquired EEG signal used for diagnosis usually


contains artifacts. These artifacts are removed normally in
the preprocessing stage. But the EEG signals which we used
here are free from artifacts as it has been removed after
visual inspection [6].

amplitude in micro volts

100

50

SLIDING WINDOW SEGMENTATION

This work uses a window of length 2 seconds instead of


dividing the signal into different epochs. The window length
is chosen so as to accommodate a minimum of 5 half waves.
The distance moved by the window is variable. It covers one
half waves (rising - first half wave and falling - second half
wave) at a time. The duration of the half wave width vary
which changes the sliding distance. Fig 3 shows a sample of
EEG signal with a sliding window.

-50

-100

0.2

0.4

0.6

0.8
1
1.2
time in seconds

1.4

1.6

1.8

Figure 1(a) Normal EEG signal for 2 sec epoch

EPILEPTIC EEG

200

120
100

150

amplitude in micro volts

80

100

60
40

50

20

0
-20

-50

-40

-100

-60
-80

0.2

0.4

0.6

0.8
1
1.2
time in seconds

1.4

1.6

1.8

-150

1000

1500

2000

2500

3000

3500

4000

4500

FEATURE EXTRACTION STAGE


The features are extracted from the EEG signal inside the
window. Ten features are extracted and used for
identification of seizure. There are three classes of features
a. Time domain features: Time domain features
extract the most representative seizure attributes
[2]. These are the features related to amplitude and
duration of EEG half waves. First half wave is the
rising part of EEG and second half wave is falling
part of EEG. Figure 4(a) and 4(b) shows half wave
amplitudes and half wave duration. The average of

METHODOLOGY

The schematic of proposed method is shown in figure 2.


The proposed method includes:
i.
ii.
iii.
iv.

500

Figure 3 EEG signal with sliding window

Figure 1(b) Epileptic EEG signal for 2 sec epoch

III.

Preprocessing stage
Sliding window segmentation
Feature extraction stage
Classification stage

99

half wave amplitudes and half wave durations are


used in this work. Thus the 4 features used are:
average first half wave duration (afhwd), average
second half wave duration (ashwd), average first
half wave amplitude (afhwa), average second half
wave amplitude (ashwa). All the averages are
confined to the window.

14000

12000

10000

|x1(f)|

8000

6000

4000

2000

10

20

30

40
50
Frequency (Hz)

60

70

80

90

Figure 5(a) FFT of Normal EEG


3

x 10

2.5

|x1(f)|

1.5

Figure 4(a) FHWA & SHWA feature


0.5

10

20

30

40
50
Frequency (Hz)

60

70

80

Figure 5(b) FFT of Epileptic EEG

90

CLASSIFICATION STAGE
The features extracted from the EEG signal assist in the
classification of normal and epileptic subjects. Feed forward
Artificial Neural Network is used to realize this
classification. The Matlab function patternnet, used in this
work creates a network that is very similar to feed forward
net, except that it uses the tansig transfer function in the last
layer. Here we use 20 hidden layer neurons. Fig. 6 shows
performance curve for patternnet.
The neural network used has the following parameters:
Type of network: Multilayer Feed forward network
No. of input vectors: 10
Activation function of the output neuron unit: tansig
No. of hidden layer neurons: 20
No. of output layer neurons: 2
No. of training epochs: 87

Figure 4(b) FHWD & SHWD feature

b. Frequency domain features: It is a well-established


fact that the seizure signals have a cyclic
component and exhibit a dominant frequency.
Also there is an increase in average energy of
signals. This work uses dominant frequency and
average energy of spectrum as the frequency
domain features for detection of seizure [1, 2]. Fig
5(a) and 5(b) represents the FFT of normal EEG
and Epileptic EEG signal respectively.
c. Derived features: These features are derived from
the time domain features. It include average first
half wave slope (fhws), average second half wave
slope (shws), covariance of first half wave duration
(cfhwd) and covariance of second half wave
duration (cshwd). Covariance is the measure of
rhythmicity of EEG and is independent of
frequency. Slope is the measure of steepness of
curve, here rise and fall of EEG.

Fig. 6 Performance curve for patternnet

IV.

RESULTS & DISCUSSIONS

Figure 6 Performance curve for patternnet

100

TABLE 1 DETECTION OF EPILEPTIC SAMPLES


Sample
set
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

Correctly
detected
169
163
173
177
146
121
150
154
152
131
150
149
159
140
127
149
150
168
167
162
163
139
143
157
131

Incorrectly
detected
3
0
2
0
0
60
0
9
0
0
0
0
7
14
0
0
9
0
0
0
38
0
70
0
0

IV.

Success rate

Failure

98.256%
100.000%
98.857%
100.000%
100.000%
66.851%
100.000%
94.479%
100.000%
100.000%
100.000%
100.000%
95.783%
90.909%
100.000%
100.000%
94.340%
100.000%
100.000%
100.000%
81.095%
100.000%
67.136%
100.000%
100.000%

1.744%
0.000%
1.143%
0.000%
0.000%
33.149%
0.000%
5.521%
0.000%
0.000%
0.000%
0.000%
4.217%
9.091%
0.000%
0.000%
5.660%
0.000%
0.000%
0.000%
18.905%
0.000%
32.864%
0.000%
0.000%

RESULTS AND DISCUSSION

The artifact free EEG obtained from the database of


Epilepsy Centre, Bonn, Germany is segmented using
sliding window. The 10 features (first half wave
amplitude, second half wave amplitude, first half wave
duration, second half wave duration, covariance of first
half wave duration, covariance of second half wave
duration, dominant frequency, average power spectrum,
first half wave slope and second half wave slope) that
were used for training the network are extracted from the
windowed EEG data. The time domain, frequency domain
and the derived features extracted from EEG are used as
the pattern for identification of seizure using Feedforward
network (patternnet).
Table I shows the detection rate for different epileptic
samples. Table II shows the detection rate for normal
EEG samples.
The results from the table show that there is 93.37%
accuracy in detecting normal EEG and 95.508% accuracy
in detecting seizure. The accuracy can further be increased
by using larger number of samples and by increasing
hidden layers but at the expense of increased computation.
To conclude it may be stated that Feedforward network
could be effectively used in detecting seizure from
epileptic EEG data with reasonable accuracy.

TABLE II DETECTION OF NORMAL SAMPLES

REFERENCES
Sample
set

Correctly
detected

Incorrectly
detected

Success
rate

Failure

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

312
357
236
260
287
267
245
317
115
152
261
197
179
315
351
246
246
281
253
248
240
308
175
243
244

0
0
1
9
0
0
2
0
88
65
0
47
36
0
0
0
1
0
0
13
18
0
83
2
17

100.000%
100.000%
99.578%
96.654%
100.000%
100.000%
99.190%
100.000%
56.650%
70.046%
100.000%
80.738%
83.256%
100.000%
100.000%
100.000%
99.595%
100.000%
100.000%
95.019%
93.023%
100.000%
67.829%
99.184%
93.487%

0.000%
0.000%
0.422%
3.346%
0.000%
0.000%
0.810%
0.000%
43.350%
29.954%
0.000%
19.262%
16.744%
0.000%
0.000%
0.000%
0.405%
0.000%
0.000%
4.981%
6.977%
0.000%
32.171%
0.816%
6.513%

[1]

[2]

[3]

[4]
[5]

[6]

[7]

101

Gotman, J, Automatic recognition of epileptic seizure in the EEG,


Electroencephalograph and Clinical Neurophysiology, 54, 530540,1982.
W. Weng, K. Khorasani, An Adaptive Structure Neural Networks
with Application to EEG Automatic Seizure Detection, Volume 9,
Issue 7, October 1996, Pages 12231240.
Gotman, J, Seizure recognition and analysisLong-term monitoring
in epilepsy,electroencephalograph and clinical neurophysiology,
SuppL 37.Amsterdam: Elsevier.
http://epileptologiebonn.de/cms/front_content.php?idcat=193&lang=3&change lang=3
Abdulhamit Subasi A , M. Kemal Kiymik A , Ahmet Alkan A , Etem
Koklukaya B, Neural Network Classification Of EEG Signals By
Using AR With MLE Preprocessing For Epileptic Seizure Detection.
Volume 10, No. 1, pp. 57-70, 2005.
R G Andrzejak, K Lehnertz, F Mormann, C Rieke, P David, C E
Elger, Indications of nonlinear deterministic and finite-dimensional
structures in time series of brain electrical activity: dependence on
recording region and brain state, Volume: 64, Issue: 6, November
2011.
Maarten-Jan Hoeve, Berend Jan van der Zwaag, Michiel van Burik,
Kees Slump and Richard Jones, Detecting Epileptic Seizure Activity
in the EEG by Independent Component Analysis, 14th Workshop on
Circuits, Systems and Signal Processing, 26-27 November 2003.

You might also like