IEEE Paper Author

You might also like

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

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

net/publication/332675878

Classification of Epileptic Seizures using Recurrence Plots and Machine Learning


Techniques

Conference Paper · April 2019


DOI: 10.1109/ICCSP.2019.8697989

CITATION READS
1 95

3 authors:

Dattaprasad A. Torse Rajashri Khanai


KLS Gogte Institute of Technology Belagavi K L E Society's College of Engineering and Technology
22 PUBLICATIONS   32 CITATIONS    26 PUBLICATIONS   76 CITATIONS   

SEE PROFILE SEE PROFILE

Veena V Desai
Gogte Institute of Technology
37 PUBLICATIONS   66 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

signal processing View project

Design and Development of Optimum Brain Signal Processing Interface for Seizure Detection System View project

All content following this page was uploaded by Dattaprasad A. Torse on 03 May 2019.

The user has requested enhancement of the downloaded file.


Classification of Epileptic Seizures using Recurrence
Plots and Machine Learning Techniques
Dattaprasad A. Torse, Rajashri Khanai, Veena V. Desai

The power of the brain is being harnessed in astonishing


Abstract—Epilepsy is a neurological disorder noticeable by ways, and the implications for people with epilepsy, Attention
sudden repeated episodes of sensory commotion related with Deficit Hyperactivity Disorder (ADHD), an inability to speak,
anomalous electrical activity in the brain. Electroencephalogram and other disabilities are exciting [3]. Brain Computer
(EEG) based seizure detection system is a promising non-invasive Interface (BCI) based seizure detection technology is opening
diagnosis option for refractive epilepsy. EEG signals in this doors to use the power of the mind to overcome the limitations
system are decomposed and classified to improve the diagnostic
of the body [4]. Use of brain seizure detection to study
accuracy as compared to human diagnosis. There is a need to
explore reliable and faster classification algorithms to develop cognitive control in patients with neurological conditions
real time seizure detection system. Due to non linear nature of provides new insight into the benefits for health care. In
EEG, non-linear techniques are used to examine the EEG signals. seizure detection systems, the challenge is to identify and
The paper proposes a non linear technique of EEG feature employ the most efficient signal processing algorithm through
extraction based on the Recurrence Plots (RP), and Recurrence many comparisons for the specific application. Current seizure
Quantification Analysis (RQA) parameters derived from the RP detection systems have maximum Information Transfer Rate
have been used to categorize the EEG signal information as pre- (ITR) up to 25 b/min [5]. To achieve greater speed and
ictal, ictal and normal classes. RP is an advanced technique of accuracy requires improvements in signal classification and
nonlinear data analysis and RQA parameters of RP compute the
translation algorithms.
significant features of signals. These features have been classified
using Artificial Neural Network (ANN), Probabilistic Neural Electroencephalogram (EEG) test that records the electrical
Network (PNN) and Support Vector Machine (SVM). In order to activity of the brain is used for diagnosis of epilepsy and other
improve the current information transfer rate of seizure brain disorders. In the huge volumes of EEG data recorded
detection system, the SVM which classifies EEG signals with from the patient’s scalp, it is repetitious and time consuming
highest speed with accuracy of 91.2 % is selected for task to manually observe these signals for diagnosis. There is a
classification. need for the development of automated diagnostic system for
the analysis of the EEG signals. The research on automated
EEG signal analysis for epilepsy detection focuses on use of
Index Terms— Seizure detection system, Recurrence Plots, joint time-frequency domain features for classification [6].
Recurrence Quantification Analysis, Artificial Neural Network,
Support Vector Machine, Probabilistic Neural Network
However, non-linear concepts and techniques are also useful
due to the fact that the EEG signals exhibit 3N characteristics
being non-linear, non stationary and non-Gaussian [7].
I. INTRODUCTION
Recurrence Plot (RP) is a non-linear analysis technique
The Epilepsy is a chronic disorder of the nervous system employed for exhibiting the recurrence of states x(n) in phase
affecting almost 50 million people worldwide that is one of space. Two or three dimensional spaces are needed to
the most common neurological diseases globally [1]. It is visualize higher dimensional phase space. An RP is an array of
characterized by the abnormal synchronized firing of a large dots in an N × N matrix, where a dot is located at (n, m)
number of neurons. In order to cope with the increasing whenever x(m) is close to x(n) [8]. The dynamical system is
requirement of the treatment options of epilepsy in India, it is investigated to quantify the RPs using a non linear data
essential to explore alternative treatment for the disorder [2]. analysis technique known as RQA. A dynamical system is
analyzed by determining the number and duration of
recurrences in the system. This kind of analysis is a measure
of complexity of data and provides vital information for non-
Dattaprasad A. Torse is a Ph.D. in department of Electronics and
Communication Engineering and working in KLS Gogte Institute of
stationary data [9].
Technology, Belagavi, Karnataka, India. Phone: 09480113464; (e-mail: RQA features have been used in EEG signal analysis. The
datorse@git.edu). cortical function at different sleep stages have been analyzed
Rajashri Khanai is a Ph.D. in Electrical Engineering and working as a using RP features. It is observed that for different sleep stages
Professor and Head of the department of Electronics and Communication
Engineering, KLE Dr. M.S.S.C.E.T., Belagavi, Karnataka, India.
unique RPs is extracted [10]. The RP based features were
(e-mail: rajashri.khanai@gmail.com). extracted and classified using ANN.
Veena V. Desai is a Ph.D. in Electrical Engineering and working as a The seizures onset has been envisaged using RQA measures
Professor and Head of the department of Electronics and Communication extracted from unprocessed EEG signals and classified using a
Engineering, KLS Gogte Institute of Technology, Belagavi, Karnataka, India.
(e-mail: veenadesai@git.edu).
four layer ANN for different EEG channels [11]. A
programmed method to identify pre-ictal phase in rat EEG
signals using RQA features has proved the efficacy of the B. Analysis Technique
method in detecting the epileptic seizures [12]. The shift from One of the graphical methods such as RQ is used to
the inter-ictal to ictal states has been studied using RPs [13]. establish structural transforms and nonstationarity in the EEG
The remaining content is organized as follows: the section signal [16]. The information accessible from a one variable
II presents data set used for classification and the RQA EEG time series that is part of a bigger 16 channel recording is
technique. Next section III presents classification techniques considered. According to Takens theorem [17], a structurally
used. The implementation and results are presented in section corresponding plot of the original single channel or multi
IV. The last section presents the conclusion of the work. channel EEG signal can be generated by using the time series
of a single noticeable variable, by the method of time delays:
II. DATASET AND FEATURE EXTRACTION The embedded vector built for the scalar series (xi), is given in
A. Dataset equation 1.
m
Dataset used in this work is accessible online from x = (x , x
i
,x
i i+d i+2d
, ..., x
i + ( m +1) + d
) (1)
University of Bonn and explained in [14]. The dataset consists
of five subsets denoted as A, B, C, D, and E. The signals have here m is the embedding dimension and d is the delay time.
been recorded from normal and seizure affected patients. Each However, if m ≥ 2n + 1 , the dynamics of nonlinear EEG
set has 100 single channel signals of 4096 data samples. The signal can be reconstructed using a single output variable.
sampling frequency used for digitizing these signals is 173.61 RP and RQA depend on some parameters, proper selection
Hz. Subsets C, D, and E are from epileptic patients. EEG of which plays a crucial role in obtaining the sequence of
signals in sets C and D indicate seizure-free intervals and set E embedded vectors. The parameters m and d are to be properly
represents seizure activities. The standard international 10–20 chosen to avoid the pitfall [18]. In the next step, a symmetric
electrode placement scheme [15] has been used to obtain matrix of distances is developed by calculating distances
subsets A and B from five healthy volunteers. Since this work among all pairs of embedded vectors and that relates each
considers the classification of signals in three groups viz. distance of such a vector to a color. Thus, the RP is a solid
normal, ictal and non-ictal three subsets namely, C, D, and E rectangular plot comprising of pixels. The colors of these
have been used to test the effectiveness of the designed pixels match to the amplitude of data into a bi-dimensional
algorithm. Subsets C and D form seizure-free (SF) group of array. The coordinates match to the locations of the data in the
EEG signals and subset E is used as the epileptic seizure (S) array vector. The comparison of EEG data vectors with
group. Fig. 1 shows typical epileptic, normal and pre-ictal themselves calculate to zero distances, which reveals the
EEG signals. occurrence of the solid upward diagonal line in all the RPs.
600
Sasmple of Epileptic EEG Data The analyzed EEG signal study indicates short line segments
equivalent to the central diagonal that match up with
sequences of signals (i , j ), (i + 1, j + 1), ....(i + k , j + k ) , such that
400

200

m m m m m m
e

x ,x , ... x
d

j + k are close to xi , xi +1 , ... xi + k . For white noise


litu

j j +1
0
Amp

-200

data series the RP do not illustrate any configuration at all.


-400

-600
C. Measures of RQA
0 500 1000 1500 2000 2500 3000 3500 4000 4500

The following features of RQA have been used and their


Number of Data Samples

(a)
200
Sample of Normal EEG Data detailed explanation is available in [19]:
150
1. The percentage of recurrence points represented as
100 Determinism (DET) so as to generate a diagonal line of
50
minimum length lmin. DET indicates the expectedness of the
e

system. Stochastic signals result in a 0 value and pure periodic


d

0
Amlitu
p

-50

-100
signals result in 1.
T lP (l )
-150

l =l
min
-200

DET = (2)
T
-250
0 500 1000 1500 2000 2500 3000 3500 4000 4500
Number of Samples
R
i , j =1 i , j
(b)
200
Sample of Pre-ictal EEG Data
where P(l) indicates the length of frequency distribution l
150
of diagonal lines present in RP.
2. The percentage of recurrence points represented as
Laminarity (LAM) which forms a black vertical line of
100
litude

50
minimum length vmin. The large value of LAM indicates signal
Amp

0 structure associated with certain states.


-50 Tv =v vP (v )
LAM = min (3)
T
-100

v =1 P (v )
0 500 1000 1500 2000 2500 3000 3500 4000 4500
Number of Samples

(c)
Fig. 1. Sample EEG Data (a) epileptic (b) normal (c) pre-ictal.
where P(v) indicates the frequency of distributions of generates a probability vector as the desired output. This layer
lengths v of black vertical lines. is known as competitive layer. The transfer function at the
3. The average length of white vertical lines in the RP is output of this layer decides the maximum of these
represented as Mean Recurrence Time (MRT). probabilities, and a value ‘1’ is assigned to it and a value ‘0’
are assigned for the remaining groups.
T wP ( w)
MRT = w=1 (4) G. Performance Metrics and Evaluation
T
v =1 P ( w )
The performance of the proposed scheme is evaluated by
where P(w) indicates the frequency distribution of the the three qualities of measurements, namely Accuracy,
lengths w of white vertical lines. The variations in main EEG Sensitivity and Specificity [24].
signal are computed using MRT [20].
TP + TN
Accuracy = × 100% (7)
4. The density of recurrence points in a recurrence plot is TP + FP + TN + FN
denoted as Recurrence Rate (RR) which is as shown below TP
Sensitivity = × 100% (8)
1
RR = 2 T i , j =1 Ri , j (5) TP + FN
N TN
Specificity = × 100% (9)
TN + FP
5. Entropy measures the complication of the recurrence
here TP states true positive values, TN states true negative,
configuration represented as ENTR as
FP gives false positives, FN gives false negatives values.
ENTR = −T l =lmin P (l )ln P (l ) (6)
IV. EXPERIMENTAL RESULT
III. CLASSIFICATION ALGORITHMS The RP of the EEG from group A, C and D are calculated
The EEG classification problem is limited to and mapped to every channel of EEG signal of 4096 sample
consideration of the two-class problem without loss of values. The values of delay are used for producing the RPs is 1
generality. In this problem the goal is to separate the seizure and embedding dimension RPs as 10.
and non seizure EEG classes. The testing of a classifier on Recurrence Plot (Epileptic EEG Signal) Recurrence Plot (Normal EEG Data)

new EEG data is the aim so that it can be concluded that a 4000 3500 4000

classifier is generalizing well. 3500 3000 3500


400

Finally, a comparison of three classifiers is presented to 3000


2500
3000
350

choose a suitable classifier for the proposed seizure detection 2500 2500
300

system based on accuracy and speed.


2000 250
2000 2000
j

j
200
1500

D. Artificial Neural Networks 1500 1500


150
1000

Three-layer ANN( 5-3-2) has been used in this work. The


1000 1000
100

500
network is formed so that every layer is completely connected 500 500 50

to the subsequent layer. The back-propagation algorithm is 500 1000 1500 2000 2500 3000 3500 4000
i
0
500 1000 1500 2000 2500 3000 3500 4000
i
0

used for adjustment of weights for training the ANN. This (a) (b)
iterative gradient algorithm minimizes the Root Mean Squared Recurrence Plot (Pre-ictal EEG Data)

(RMS) Error between the real and the preferred output. There 4000

is a scope in future work to employ more complex structure of 3500


200

ANN for large number of sample recording [21]. 3000

2500 150

E. Support Vector Machine (SVM) 2000


j

The SVM is one of the supervised learning techniques used 1500


100

for classification of data. For a three-class problem, SVM is 1000

trained so that the direct decision function maximizes the


50

500

generalization ability, namely, the m-dimensional input space 0


x is mapped into the l-dimensional (l ≥ m) feature space z. To 500 1000 1500 2000 2500 3000 3500 4000
i

separate three groups by the optimal separating hyperplane (c)


two parallel hyperplanes are constructed. This calculates the Fig.2. Recurrence Plots (RP) of EEG Data (4097 Data Samples)
(a) epileptic (b) normal (c) pre-ictal.
margin on each side of the separating hyperplane from training
data set [22].
Fig. 2 shows the RPs of three EEG groups in dissimilar
F. Probabilistic Neural Networks (PNN) seizure periods and these plots are from EEG set A, before
One more classification technique is the PNN which is two- seizure onset during seizure and without seizure respectively.
layer radial basis network [23]. The layer of radial basis From plots five features are extracted and those are used as
calculates distances between the input vector and the training excitation to the ANN classifier for training and test. The RP
input vectors that produce a distance vector. The next layer of the normal EEG signal is more indiscriminate than that of
adds these contributions for every input vector groups and epileptic signal as depicted in Fig. 2.
State Space Plot (Epileptic EEG Data) State Space Plot (Normal EEG Data) State Space Plot (Epileptic EEG Data) State Space Plot (Normal EEG Data)

2000
200
1000 100

1000 100
0
0
0
x(t+2 τ )

x(t+ 2 τ )

x(t+2 τ )
x(t+ 2 τ )
0 -100

-100 -1000
-1000
-200
-200
-2000 -300
-2000 -2000 -2000 -300 -300
-2000 -300
-2000
-400 -400 -1000 -1000 -200 -200
-1000 -1000
0 -100 -100
0 -200 -200 0 0
1000 1000 0 0
2000 2000 0 0
x(t) 1000 1000 x(t) 100 100 x(t)
x(t+ τ ) 200 200 x(t+τ ) x(t+τ )
x(t)
x(t+ τ )

(b) (a) (b)


(a) State Space Plot (Pre-ictal EEG Data)
State Space Plot (Pre-ictal EEG Data)

200
200
100
x(t+2 τ )

x (t+ 2 τ )
-200
-100 0

-50
-100
0
-200
50
-100 200 200
-50 100 100
100 0 0 0
50 -100 -100
x(t+τ ) 100 x(t+τ ) x(t)
150 x(t)
150
(c)
(c) Fig. 5. State Space Plot of EEG Data (500 Data Samples)
Fig. 3. State Space Plots of EEG Data (4097 Data Samples) (a) epileptic (b) normal (c) pre-ictal.
(a) epileptic (b) normal (c) pre-ictal.
The efficacy of the RQA technique on smaller data segment
Fig. 3 shows state space plot for three groups of EEG data is analyzed by segmenting EEG data into 500, 1000 and 2000
obtained by using RQA toolbox [25]. The variations in the data samples. The state space plot of 500 sample data for three
state space for signal from normal EEG to epileptic EEG is the signal classes are shown in Fig. 5. The test of RQA with
useful feature set for signal classification. variable data samples provides further direction to analyze
The efficacy of the RQA technique on smaller data segment information transfer rate of the algorithm and with fewer
is analyzed by segmenting EEG data into 500, 100 and 200 relevant features performance of the classifiers can be studied.
data samples. The RQ plot of 500 sample data for three signal The sequence of RQA features for epileptic, normal and
classes are shown in Fig. 4. pre-ictal groups are given in Table 1. The table explores the
Recurrance Plot (Epileptic EEG Data) Recurrance Plot (Normal EEG Data)
epileptic and normal EEG signal features are representing
450 450 300
distinctive values with all features being higher for seizure
400
2500
400 group. The epileptic EEG signals are more random and
varying as compared to the normal EEG signals. The increase
250
350 2000 350

300 300 200


in entropy of epileptic signal is due to the fact that when
epileptic seizure occurs a large number of neurons
250 1500 250
J
J

150
200
synchronously fire to cause higher neural discharge.
200
1000
150 100
150

100
100
500 50
50
50
TABLE I. RQA PARAMETERS FOR NORMAL, ICTAL AND PRE-ICTAL EEG
0 100 200 300 400
DATA
100 200 300 400
I
I
EEG Types
Feature
Normal Pre-ictal Ictal
(a) (b) DET 0.8760 0.8312 0.8824
Recurrance Plot (Pre-ictal EEG Data)

200
LAM 0.3445 0.6035 0.5615
450
180
MRT 15.382 14.258 14.504
RR 0.0024 0.0024 0.0024
400
160
350
140 ENTR 1.4598 1.2889 1.5158
300
120
250

The three classifiers are considered and the parameters of


J

100
200
80
150
60 these classifiers such as accuracy, sensitivity, specificity and
100 40
positive predictive accuracy are resulted in Table 2. This
analysis revels that the SVM classifier performs superior than
50 20

the ANN and PNN classifiers. The results of RQA features are
100 200 300 400
I

(c) used for classification of EEG signals. In total, there are 100
Fig. 4. Recurrence Plots (RP) of EEG Data (500 Data Samples)
(a) epileptic (b) normal (c) pre-ictal.
ictal recordings and 200 non-ictal recordings that were used
for training purpose. The classifiers were tested on 25
epileptic and normal EEG recording.
TABLE II. ACCURACY, SENSITIVITY, SPECIFICITY AND SPEED OF [11] T. Zhu, L. Huang, S. Zhang, Y. Huang, “Predicting Epileptic Seizure by
CLASSIFIERS Recurrence Quantification Analysis of Single-Channel EEG,” Advanced
Intelligent Computing Theories and Applications, pp. 438-445, 2008.
Classification Parameters [12] G. Ouyang, L. Xie, H. Chen, X. Li, X. Guan, H. Wu, “Automated
Speed
Classifier Accuracy Sensitivity Specificity prediction of epileptic seizures in rats with recurrence quantification
(Seconds)
% % % analysis,” in Conf. Proc IEEE Eng Med Biol Soc, 2006, pp. 153-156.
ANN 87.5 91.2 92.5 4.3±0.05 [13] J. P. Pijn et al., “Nonlinear dynamics of epileptic seizures on basis of
PNN 89.3 90.7 92.5 2.6±0.05
intracranial EEG recordings,” Brain Topography, vol. 9, pp. 249-270,
SVM 91.2 92.5 98.3 1.11±0.02
1997.
[14] R. G. Andrzejak et al., “Indications of nonlinear deterministic and finite-
The speed of three classifiers is shown in table 2. The fast dimensional structures in time series of brain electrical activity:
responding time observed is 1.11±0.02 seconds for SVM. The Dependence on recording region and brain state,” Phys. Rev. E, vol. 64,
no. 6, pp. 061907, 2001.
speed of computation is for the effective epoch length of [15] Pachori Ram Bilas, and Varun Bajaj, “Analysis of normal and epileptic
single channel EEG data. The total execution time of signal seizure EEG signals using empirical mode decomposition,” Computer
pre-processing, feature extraction and classification algorithms Methods and Programs in Biomedicine, vol. 104, no.3, pp. 373-381,
result in the improvement of ITR of the current seizure 2011.
[16] Marwan Norbert et al., “Recurrence plots for the analysis of complex
detection system. The accuracy of SVM obtained in this work systems,” Physics reports, vol. 438, pp. 237-329, 2007.
is three groups of EEG signals. The feature extraction [17] Thiel Marco, M. Carmen Romano, and Jürgen Kurths, “How much
algorithm was applied on the complete EEG data series of information is contained in a recurrence plot?,” Physics Letters, vol.330,
4097 samples. no.5, pp. 343-349, 2004.
[18] Marwan Norbert, “How to avoid potential pitfalls in recurrence plot
based data analysis,” International Journal of Bifurcation and Chaos,
V. CONCLUSION vol. 21, no.04, pp. 1003-1017, 2011.
[19] Recurrence Quantification Analysis. [Online] Available:
The working of human brain is still a mystery as its http://www.recurrence-plot.tk/rqa.php
properties during epileptic activity can cause several changes [20] Ngamga Eulalie Joelle et al., “Evaluation of selected recurrence
in the EEG which are beyond the range of normal measures in discriminating pre-ictal and inter-ictal periods from epileptic
observations. Hence, epileptic disorders need continuous EEG data,” Physics Letters, vol. 380, pp. 1419-1425, 2016.
[21] Haykin Simon S. et al., Neural networks and learning machines. vol. 3,
monitoring and thus the system with faster classification Upper Saddle River, NJ, USA: Pearson, 2009.
algorithms are suitable for real life applications. In this work [22] Steinwart Ingo, and Andreas Christmann, Support vector machines.
RQA based features which quantify recurrence of the data in Springer Science & Business Media, 2008.
phase space produce variable results for each group of EEG [23] Specht Donald F., “Probabilistic neural networks,” Neural networks,
vol.3, pp. 109-118, 1990.
data. Hence, this non linear technique creates significant [24] C.J.C. Burges, “A Tutorial on support vector machines for pattern
features for classification. The SVM classifiers results in recognition,” Data Min. Knowl. Discov., vol. 2, pp. 121–167, 1998.
highest accuracy (91.2 %) with higher classification speed. [25] Y. Chen and H. Yang, “Multiscale recurrence analysis of long-term
The accuracy and speed of this algorithm helps in improving nonlinear and nonstationary time series,” Chaos, Solitons and Fractals,
Vol. 45, pp. 978-987, Jul. 2012.
the information transfer rate of current seizure detection
system.

REFERENCES
[1] World Health Organization, (2016, February), Epilepsy
[Online].Available:http://www.who.int/mediacentre/factsheets/fs999/en/
[2] Modadugu Sahithi. (2016, June, 3). Mental Illness: Overview and Status
in India [Online]. Available: http://healthminds.in/blog/mental-illness-
overview-status-in-india/
[3] Perlmutter, David. Brain Maker: The Power of Gut Microbes to Heal
and Protect Your Brain-for Life. Hachette UK, 2015.
[4] Allison, Brendan Z., Elizabeth Winter Wolpaw, and Jonathan R.
Wolpaw. "Brain–computer interface systems: progress and
prospects,” Expert review of medical devices, vol. 4, pp. 463-474, 2007.
[5] T. M. Vaughan et al., “Brain-computer interface technology: a review
the second international meeting,” in IEEE Trans. on Neural Syst. and
Rehabil. Eng., vol.11, pp. 94-109, Jun. 2003.
[6] Torse, Dattaprasad, Veena Desai, and Rajashri Khanai “A Review on
Seizure Detection Systems with Emphasis on Multi-domain Feature
Extraction and Classification using Machine Learning," BRAIN Broad
Research in Artificial Intelligence and Neuroscience 8.4, pp. 109-129,
2017.
[7] Klonowski W., “Everything you wanted to ask about EEG but were
afraid to get the right answer,” J. Nonlinear Biomed Phys., vol. 3, pp.2,
May 2009.
[8] Acharya U. Rajendra et al. “Automated EEG analysis of epilepsy: a
review,” Knowledge-Based Systems, vol. 45, pp. 147-165, 2013.
[9] Acharya, U. Rajendra et al. “Application of recurrence quantification
analysis for the automated identification of epileptic EEG signals,”
International journal of neural systems, vol. 21, pp.199-211, 2011.
[10] L.H Song, D.S Lee, S. I. Kim, “Recurrence quantification analysis of
sleep electroencephalogram in sleep apnea syndrome in humans,”
Neuroscience letters, vol. 366, pp. 148-153, 2004.

View publication stats

You might also like