0% found this document useful (0 votes)
27 views12 pages

Epileptic Seizure Detection in EEG Signals Using Machine Learning and Deep Learning Techniques

Uploaded by

Sneha Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views12 pages

Epileptic Seizure Detection in EEG Signals Using Machine Learning and Deep Learning Techniques

Uploaded by

Sneha Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Received 9 May 2024, accepted 24 May 2024, date of publication 4 June 2024, date of current version 14 June 2024.

Digital Object Identifier 10.1109/ACCESS.2024.3409581

Epileptic Seizure Detection in EEG Signals


Using Machine Learning and Deep
Learning Techniques
HEPSEEBA KODE 1 , (Student Member, IEEE), KHALED ELLEITHY 1, (Senior Member, IEEE),
AND LAIALI ALMAZAYDEH 2 , (Member, IEEE)
1 Department of Computer Science and Engineering, University of Bridgeport, Bridgeport, CT 06604, USA
2 Department of Software Engineering, Faculty of Information Technology, Al-Hussein Bin Talal University, Ma’an 71111, Jordan
Corresponding author: Khaled Elleithy ([email protected])

ABSTRACT This research presents a novel approach to detecting epileptic seizures leveraging the strengths
of Machine Learning (ML) and Deep Learning (DL) algorithms in EEG signals. Epileptic seizures are
neurological events with distinctive features found in Electroencephalography (EEG) that lend considerable
credibility to researchers. Machine Learning (ML) and Deep learning (DL) algorithms have emerged as
powerful feature extraction and classification tools in EEG signal analysis. Many studies have converted
the EEG signals into either images and /or calculated time-frequency domain features and performed
classification. This study focuses on classifying time-series data representation of EEG signals with machine
learning-based classifiers by tuning parameters and deep learning-based One-Dimensional Convolutional
Neural Network (1D CNN) methods. The primary objective is not only to determine the optimal classifier
but also to emphasize critical metrics such as sensitivity, precision, and accuracy, which are critical in
medical investigations, particularly for the early detection of diseases and patient care optimization. The UCI
Epileptic Seizure Recognition dataset used in this study consists of time-series data points extracted from
the EEG signals. The dataset has been preprocessed and fed to the classifiers, namely Extreme Gradient
Boosting (XGBoost), TabNet, Random Forest (RF), One Dimensional Convolutional Neural Network, and
achieved encouraging accuracies of 98%, 96%, 98%, and 99%, respectively. The proposed 1D-CNN model
performed better than other state-of-the-art models concerning accuracy, sensitivity, precision, and recall.

INDEX TERMS XGBoost, TabNet, deep learning (DL), machine learning (ML), random forest (RF),
epileptic seizures, 1D CNN, data points, time series.

I. INTRODUCTION diverse circumstances, encompassing factors such as skull


Epilepsy, a neurological disorder affecting approximately fractures, genetic predisposition, tumors, and other contribut-
50 million individuals globally, stands as one of the most ing factors [2]. It is found that anyone can be affected at any
prevalent neurological diseases worldwide, as reported by age, but it is most initiated in childhood or over the age of
the World Health Organization. It is characterized by recur- 65 [3].
rent and unpredictable seizures. Epileptic seizures pose a An epileptic seizure is a sudden and temporary distur-
significant challenge to the quality of life for affected indi- bance in the normal functioning of the brain, characterized
viduals [1]. It is marked by a tendency for recurrent episodes by abnormal and excessive electrical activity. This electrical
across one’s lifespan. Epileptic seizures can manifest under activity can result in various physical and mental manifesta-
tions, ranging from subtle sensations to convulsions and loss
The associate editor coordinating the review of this manuscript and of consciousness, and sometimes leads to sudden, unexpected
approving it for publication was Mohammad Shorif Uddin . death [4]. Accurate detection of seizures in epilepsy patients
2024 The Authors. This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.
VOLUME 12, 2024 For more information, see https://creativecommons.org/licenses/by-nc-nd/4.0/ 80657
H. Kode et al.: Epileptic Seizure Detection in EEG Signals Using ML and DL Techniques

is vital for diagnosing the condition correctly and devising


personalized treatment strategies. A better quality of life and
reduced life risks can be ensured through early diagnosis and
continuous monitoring of seizures.
The purpose of analyzing the electroencephalogram (EEG)
signals, which record electrical activity in the brain, is to
evaluate patients with known seizures to detect the accurate
seizure type [5]. Epileptic EEG signals provide a dynamic
representation of neural activity, capturing the intricate pat-
terns associated with seizures. EEG signals are recorded
using electrodes attached to the scalp. These electrodes detect
the electrical impulses generated by neurons in the brain. FIGURE 1. Variation in EEG signals at different instances.
Raw EEG signal data often contains noise and irrelevant
information. Preprocessing steps, such as filtering, artifact
removal, and baseline correction, are applied to clean the
correctly, and the ability to correctly identify non-seizures to
signals and enhance their quality. Once preprocessing is
classify EEG time-series data, explicitly targeting the accu-
done, feature selection and extraction play a crucial role
rate prediction of epileptic seizures. The dataset used in this
in epileptic seizure detection using EEG signal classifica-
study consists of time series data points that represent the
tion [6]. Extracting relevant features from the signal data
value of the EEG signal at a particular time. Further, the
provides more discriminative information than the raw sig-
data was preprocessed and classified using XGBoost, TabNet,
nal alone. Machine learning and Deep learning techniques
Random Forest, and 1D CNN methods. The parameters of the
have shown remarkable potential in extracting relevant fea-
classifiers are tuned according to the nature of the dataset to
tures and classifying them in various medical applications,
acquire qualitative results and high-performance evaluations.
including epilepsy diagnosis.
The subsequent sections of this research paper are outlined
Epileptic seizures can vary widely in their presentation,
as follows: Section II briefly discusses existing works rele-
severity, and duration. The brain’s regular activity results
vant to this study, Section III discusses the methodology with
from intricate communication between neurons through elec-
details about the dataset employed, and offers insight into the
trical signals. In individuals with epilepsy, there is a tendency
methodology utilized in this research. Section IV illustrates
for the brain’s neurons to fire excessively and abnormally,
the evaluation process, presents graphical analyses, and com-
leading to a seizure. Seizures can be classified into different
pares our findings with pertinent state-of-the-art research.
types based on their characteristics and the brain regions from
Lastly, Section V concludes the study, highlighting the lim-
which they originate. In Figure 1, we observe the diverse
itations and challenges encountered and outlining potential
patterns of EEG signals recorded from different brain regions:
avenues for future research.
the healthy brain area, the region affected by a tumor, and
during a seizure event. In healthy brain areas, we typically
observe regular, rhythmic patterns characterized by consis- II. RELATED WORK
tent frequency and amplitude, which reflect normal electrical The EEG signal, characterized by non-stationary behavior
activity. At the tumor site, the EEG signals exhibit alter- and notable time variations, necessitates applying non-linear
ations compared to those from the healthy brain area. These analytical methods. To address this, [7] employed the dis-
can manifest in various ways depending on the nature and crete wavelet transform (DWT) to extract the intricate
location of the tumor. However, during a seizure event, the frequency components inherent in EEG signals. Their pro-
EEG signals exhibit distinctive patterns that reflect abnormal posed approach utilizes an optimized k-nearest neighbors
neuronal activity with high frequency and amplitude. (KNN) algorithm for enhanced detection accuracy.
The X-axis in the above figure represents the EEG signal at The quantitative features have been extracted from the
a particular time interval, and the Y-axis represents the signal EEG data using a one-dimensional local binary pattern
amplitude. (IDLBP) in [8], and these features were fed to various clas-
This study employs various ML classifiers and a 1D- CNN sifiers, which include logistic regression, BayesNet, SVM,
network to classify EEG time-series data. This approach ANN, and functional tree. The authors in [9] introduced
allows for a comprehensive comparison of different classi- a novel seizure detection algorithm that employs princi-
fication techniques, enabling insights into which methods are pal component analysis (PCA) for feature extraction. The
most effective for seizure detection. The aim of this study is algorithm compares these features with other machine learn-
not only to acquire the best accuracy but also to demonstrate a ing (ML) algorithms, incorporating four prediction models:
commitment to addressing the real-world needs of healthcare logistic regression (LR), dense trees, 2D-support vector
practitioners and patients. The focus is on the critical metrics machine (2D-SVM), and cosine k-nearest neighbor (cos-
relevant to medical diagnosis and decision-making, such as KNN). The algorithm enhanced training and test datasets’
sensitivity, the ability to identify seizures and specificity performance by leveraging PCA to reduce data dimensions.

80658 VOLUME 12, 2024


H. Kode et al.: Epileptic Seizure Detection in EEG Signals Using ML and DL Techniques

Furthermore, The authors in [10] introduce an innovative to a unique individual, with 100 files per folder, each repre-
approach to identifying epileptic seizures in EEG signals senting brain activity over 23.6 seconds. The corresponding
through the application of the Improved Correlation-based time series are sampled into 4097 datapoints, where each
Feature Selection method (ICFS) in conjunction with the point reflects the EEG value at a specific time. So, a total
Random Forest classifier (RF). The methodology entails an of 500 individuals with 4097 data points each are available.
initial step of employing ICFS to extract key features from the The UCI Epileptic Seizure Recognition [18] dataset par-
time domain, frequency domain, and entropy-based features. titioned the above 4097 datapoints (from Bonn dataset) into
Subsequently, the Random Forest ensemble is trained on 23 segments, each containing 178 data points, representing
a refined set of selected features. Furthermore, the authors a 1-second time interval. This process was applied to all
in [11] chose fourteen highly correlated features using the 500 individuals, resulting in 11500 (23 ∗ 500) data instances.
Chi-square tests. They applied classifiers such as random for- This process was made to make it available for the users to
est, decision tree, support vector machine, k-nearest neighbor, use for different classification purposes. This dataset has five
and TabNet. Extraction of meaningful features from EEG classes. Each is represented as below.
signals will directly impact the classification of the model’s Class 1: Seizure activity recordings.
performance [12]. Class 2: EEG signal captured from the tumor’s region.
The Convolutional Neural Network (CNN) employs Class 3: EEG recordings were from the healthy brain area.
various filters in its convolutional layers to extract a dis- Class 4: EEG recordings were captured when patients
tinctive and rich set of meaningful features. However, one- closed their eyes.
dimensional CNNs are suitable for tasks where the input Class 5: EEG recordings were captured when patients
data is structured in a sequence, time-series data. In [13], the opened their eyes.
author proposed a 1D-CNN approach by converting EEG sig- All the non-seizure class values (2,3,4 and 5) were uni-
nals into 2D/3D images and achieved an accuracy of 96.30%. formly set to 0 and the seizure class to 1. The graphical
In [14], nineteen EEG data channels were selected, representation in Figure 2 illustrates the distinct nature of
and then the signals were resampled at a frequency of the EEG signal data present in the dataset, categorized
256Hz. Subsequently, these signals were partitioned into time into epileptic and non-epileptic. The binary classification is
frames of 3 seconds each. Further, we feed the data into denoted by the label ‘y’, where y = 0 signifies non-epileptic
the ConvLSTM model for epileptic seizure identification. instances, and y = 1 represents epileptic seizures.
Another study [15] proposed an innovative method capa-
ble of autonomously extracting features from deep within a
CNN and generating easily interpretable rules for classifying
seizures in EEG signals. Their objective is to elucidate the
internal logic, providing neurologists with valuable insights
for decision-making, whereas [16] proposed a 13-layer deep
CNN algorithm to detect normal, preictal, and seizure classes.
Their proposed method achieved accuracy, sensitivity, and
specificity of 88.67%, 95.00%, and 90.00%, respectively.
A supervised deep convolutional autoencoder (SDCAE)
model [17] was proposed to detect seizures in children with
epilepsy. The Bi-LSTM-based classifier used in this model
with an EEG signal segmented to 4s length achieved an FIGURE 2. Histogram representation of the epileptic and non-epileptic
accuracy of 98.79%. seizures in the dataset.

III. METHODOLOGY
B. PROPOSED APPROACH
This section describes the dataset and methods we propose
This study employs a comprehensive approach utilizing four
to detect epileptic seizures, including the machine learn-
distinct classifiers: XGBoost, TabNet, decision tree, and
ing algorithms such as extreme gradient boosting classifier
1D-Convolutional Neural Network (CNN). Before model
(XGBoost), TabNet classifier, Random Forest classifier with
training, the dataset underwent preprocessing steps to ensure
fine-tuning their parameters, and a 1D- CNN based deep
data quality and consistency. The dataset was strategically
learning algorithm.
divided into an 80% training set and a 20% validation set.
Figure 3 illustrates the framework of the proposed method-
A. DATASET DESCRIPTION ology representing data processing, classifiers, and a set of
The dataset used in this study is a publicly available UCI evaluation metrics employed in the approach. In the feature
Epileptic Seizure Recognition [18] dataset, which is a pro- extraction process, the authors in [18] extracted data points
cessed version of the original Bonn dataset [19]. The Bonn from the EEG signals. In our study, we considered those
dataset is organized into five folders. Each folder corresponds extracted datapoints as features and further preprocessed and

VOLUME 12, 2024 80659


H. Kode et al.: Epileptic Seizure Detection in EEG Signals Using ML and DL Techniques

FIGURE 3. The Block diagram for the proposed method.

TABLE 1. Experimental configuration. gradient boosting frameworks. This classifier can capture
temporal dependencies in time series data due to its ensemble
of decision trees. Each tree can recognize patterns and
trends within the temporal sequence of data points. Epileptic
seizures may exhibit non-linear patterns that can be effec-
tively captured by XGBoost’s decision trees, allowing the
model to learn complex relationships between features across
different time steps. Also, the regularization techniques in this
classifier help prevent overfitting, which is crucial for mod-
eling epileptic seizures where noisy data or outliers might
be present. In this study, we configured the parameters of
XGBoost as follows: a learning rate was set to 0.01 as it
controls the contribution of each tree to the overall model.
A lower learning rate makes the model more robust. In the
context of epileptic seizure detection, setting a small learning
rate suggests a cautious and deliberate learning approach.
Regularization parameter ‘alpha’ is used, which helps avoid
fitting noise in the data. A booster tree specified as ‘gbtree’
is suitable for capturing non-linear relationships and tempo-
ral dependencies present in the time-series data of epileptic
normalized to ensure all the features are on a consistent seizures. The maximum depth of individual trees was set to 8.
scale, preventing certain features from dominating others in A depth indicates a relatively deep tree structure allowing
the learning process. Further, the data was fed to the classi- the model to capture intricate patterns in the data, and the
fiers and evaluated with the following metrics as shown in number of estimators (n_estimators) is set to 1000, which
Figure 3. indicates a commitment to build a sufficiently large ensemble
Table 1 details the hardware and software configura- to capture diverse patterns in the epileptic seizure time-series
tion utilized for developing this proposed method. We used data.
Google Colab for both code development and execution.
D. TABNET CLASSIFIER
C. XGBOOST CLASSIFIER Tabular Neural Network is an architecture designed for tabu-
Extreme Gradient Boosting (XGBoost) [20] is a robust lar data with sequential dependencies. TabNet [21] combines
and widely used machine learning algorithm, particularly in the elements of deep learning with attention mechanisms

80660 VOLUME 12, 2024


H. Kode et al.: Epileptic Seizure Detection in EEG Signals Using ML and DL Techniques

FIGURE 4. CNN architecture of the proposed method.

to handle structured data efficiently. In epileptic seizures, F. CONVOLUTIONAL NEURAL NETWORK


where the order of observations matters, TabNet’s attention Convolutional Neural Networks (CNNs) can be used for
mechanism allows the model to focus on relevant time steps various data types, not just images. In the case of one-
while considering their sequential relationships. The attention dimensional data, such as sequences or time series, 1D
mechanism in this classifier provides transparency into the convolutions are employed. In this study, 1D CNN is used
decision-making process, enabling researchers to understand with kernel_size = 2 to capture relatively short-term features
which time steps contribute most to the seizure classification. in EEG data, max pooling layer helps reduce the spatial
In our study, we imported the TabNet classifier from PyTorch dimensions of the data, and activation function ‘‘ReLU’’ is
and adjusted the parameters as follows: patience was set at used to learn complex relationships in the data. Four lay-
20, and maximum epochs (max_epochs) were set to 100. ers of convolutions were used in this model with filters
Combining these two parameters indicates a strategy of early of 32, 32, 64, and 128. The progressive increase in the
stopping that allows the training process to stop automat- number of filters across the convolutional layers implies a
ically when the model’s performance on the validation set hierarchical feature learning process. Deep layers with more
stops improving, preventing unnecessary computation and filters learn more abstract and high-level representations.
potential overfitting. This architecture allows the model to extract hierarchical
features at different levels of abstraction from the EEG data.
E. RANDOM FOREST CLASSIFIER The dropout rate of 0.2 used in this model indicates a reg-
Random Forest is an ensemble learning like XGBoost method ularization strategy to prevent overfitting. The first fully
that operates by constructing a multitude of decision trees connected layer has 64 neurons with activation function
during training and outputting the class, which is the mode ReLU and a dropout rate 0.5. The final FC layer has one
of classes of the individual trees. This classifier has high neuron with the activation function ‘Sigmoid.’ Here, Adam
predictive accuracy, robustness to overfitting, and the ability Optimizer is used with a ‘learning_rate’ equal to 0.0005 and
to handle large amounts of data with high dimensionality. ‘binary_crossentropy’ as a loss function. FIGURE.4 repre-
Combining multiple decision trees enhances the model’s abil- sents the architecture of the 1D- CNN model proposed in this
ity to generalize well to different temporal patterns observed study.
in epileptic seizure data. This classifier can identify the most The equations below represent the mathematical form of
important features at different time points, aiding in iden- the Sigmoid, ReLU, and Binary cross-entropy functions used
tifying crucial factors contributing to seizure occurrences. in the CNN model.
In this study, the parameters of the Random Forest are 1
set as follows: a number of estimators (n_estimators) set Sigmoid (x) = (1)
1 + e−x
to 1000 to create a large and diverse ensemble of trees
leads to more robust and stable models reducing the risk Here, x is the input to the function, e is the base of the natural
of overfitting and improving generalization performance. logarithm (Euler’s number, approximately equal to 2.71828),
random state at 42, and the criterion parameter specifies Sigmoid (x) is the output, which has a value between 0 and 1.
the function used to measure the quality of a split in the ReLU (x) = max (0, x) (2)
decision tree. We used ‘gini’ criterion measures of how
often a randomly chosen element would be incorrectly The ReLU activation function outputs the input value x if
classified. x is positive or zero, and zero if x is negative. Graphically,

VOLUME 12, 2024 80661


H. Kode et al.: Epileptic Seizure Detection in EEG Signals Using ML and DL Techniques

FIGURE 5. Confusion matrices of four classifiers. (a) XGBoost classifier, (b) TabNet classifier, (c) RF classifier, and (d) 1D-CNN.

it looks like a ramp, allowing positive values to pass IV. PERFORMANCE EVALUATION AND RESULTS
through unchanged while converting negative values to The evaluation metrics accuracy, precision, recall, and F1
zero. score, CSI, MCC, and Kappa are computed below to assess
the performance of the proposed method to differenti-
L y, ŷ = − y.log ŷ + (1 − y) .log 1 − ŷ
  
(3) ate seizures and non-seizures accurately. The mathematical

From the above equation L y, ŷ is the binary cross- representation of these metrics is shown below:
entropy loss, y is the true label (either 0 or 1) and ŷ
is the predicted probability that the instance belongs to (TP + TN )
Accuracy = (4)
class 1. (TP + TN + FP + FN )

80662 VOLUME 12, 2024


H. Kode et al.: Epileptic Seizure Detection in EEG Signals Using ML and DL Techniques

FIGURE 6. ROC-AUC curve of four classifiers. (a) XGBoost, (b) TabNet, (c) Random Forest, and (d) CNN.

TP
Precision = (5) FN is false negative, incorrectly predicts as negative also
TP + FP called as Type 11 error.
TP
Recall = (6) Po − Pe
TP + FN Cohen′ s Kappa = (10)
(Precision ∗ Recall) 1 − Pe
F1 Score = 2 ∗ (7)
(Precision + Recall) where, Po is the relative observed agreement and
TP Pe is the expected agreement.
CSI = (8)
TP + FN + FP
TP × TN − FP × FN A. CONFUSION MATRIX
MCC = √
(TP + FP)(TP + FN )(TN + FP)(TN + FN ) The key evaluation metrics, such as accuracy, precision,
(9) sensitivity (Recall), and specificity, were derived from the
confusion matrix. FIGURE 5 illustrates the visual repre-
sentation of the confusion matrices generated for all four
where TP is true positive, correctly predicts as positive. classifiers. It serves as a comprehensive tool for assessing
TN is true negative, correctly predicts as negative. the performance of the model by revealing the distribu-
FP is false positive, incorrectly predicts as positive also tion of true positive (TP), true negative (TN), false positive
called as Type 1 error. (FP), and false negative (FN) predictions. Based on the

VOLUME 12, 2024 80663


H. Kode et al.: Epileptic Seizure Detection in EEG Signals Using ML and DL Techniques

FIGURE 7. Classification report of four classifiers. (a) XGBoost, (b) TabNet, (c) Random Forest, and (d) 1D-CNN.

TABLE 2. Weighted average values of the proposed method.

results shown in FIGURE 5, 5(a) shows the XGBoost 5(c) shows the Random Forest classifier predicts 21 non-
classifier predicts ten non-epileptic instances as epileptic epileptic instances as epileptic and 26 epileptic instances
and 47 epileptic instances as non-epileptic, 5(b) shows as non-epileptic. Finally, 5(d) shows the 1D-CNN pre-
the TabNet classifier predicts 20 non-epileptic instances as dicts 18 non-epileptic instances as epileptic and 9 epileptic
epileptic and 75 epileptic instances as non-epileptic whereas, instances as non-epileptic. These results provide insights

80664 VOLUME 12, 2024


H. Kode et al.: Epileptic Seizure Detection in EEG Signals Using ML and DL Techniques

TABLE 3. Comparison table with previous works.

into the performance and characteristics of each classifier in ROC curve. In FIGURE 6, (a), (b), (c), and (d) have
terms of their ability to correctly classify instances as epilep- the AUC values of 0.997, 0.98, 1.00, and 0.98, respec-
tic or non-epileptic. For instance, TabNet classifier exhibits tively, which indicate that a has the AUC value of
more misclassifications than the other classifiers, particularly 0.997 and c has an AUC value of 1.00 which rep-
in falsely identifying epileptic instances as non-epileptic. resents those proposed approaches reflects the perfect
On the other hand, the 1D-CNN model demonstrates rel- discrimination.
atively fewer misclassifications among all the proposed
classifiers. C. CLASSIFICATION REPORT
A classification report is a valuable tool for model evalu-
B. ROC-AUC CURVE ation. It helps guide adjustments to the model parameters
The Receiver Operating Characteristic Area Under the Curve to improve performance, especially for imbalanced datasets
(ROC AUC) is a metric used to assess the performance of where one class dominates the other, which becomes crucial
a classification model, mainly in binary class classification. for assessing the model’s performance. FIGURE 7 shows
It is a graphical representation between sensitivity (true pos- that the classification report clearly indicated the precision,
itive rate) and specificity (true negative rate) across various recall, and f1-score of epileptic and non-epileptic seizures
threshold settings. individually. It also shows the effective results of accu-
The ROC curve plots the true positive rate against the racy, macro average, and weighted average of the proposed
false positive rate, whereas AUC is the area under the approach.

VOLUME 12, 2024 80665


H. Kode et al.: Epileptic Seizure Detection in EEG Signals Using ML and DL Techniques

D. CSI, MCC AND COHEN’S KAPPA medical diagnosis. By incorporating these additional metrics,
Additional metrics like the Critical Success Index (CSI), we have introduced a comprehensive evaluation framework
Mathews Correlation Coefficient (MCC), and Cohen’s Kappa that captures various aspects of the model’s effectiveness.
gave additional insights into the classifiers and 1D-CNN Despite similar accuracies achieved in previous studies using
model performance. For the XGBoost classifier, the results comparable classifiers, our research demonstrates superior
achieved for the CSI, MCC, and Cohen’s Kappa are 0.88, precision, recall and f1-score performance. This comparison
0.92, and 0.92, respectively. For the TabNet classifier, the highlights the novelty and significance of our findings, indi-
results were 0.80, 0.86, and 0.86, respectively. For the Ran- cating a substantial improvement over existing approaches.
dom Forest classifier, the results were 0.90, 0.93, and 0.93, Accurate and reliable seizure detection is essential for
respectively, and for the 1D-CNN model, the results achieved timely intervention and personalized treatment planning in
were 0.94, 0.96, and 0.96, respectively. epilepsy patients, and our findings contribute to advanc-
Table 2 provides a comprehensive overview of the exper- ing the state-of-the-art in this domain in Epileptic Seizure
imental outcomes derived from the proposed approach. The Detection.
table encapsulates the achieved accuracies of the employed
classifiers, namely XGBoost, TabNet, Random Forest, and A. LIMITATIONS AND CHALLENGES
1D CNN, which achieved 98%, 96%, 98%, and 99% accu- Our study used the UCI epileptic seizure recognition dataset,
racies, respectively. In this analysis, we opted for weighted consisting of extracted data from the Bonn University dataset
average values for Precision, Recall, and F1 score calcu- stored in.csv format rather than raw signal data; nuances and
lations due to the imbalance class distribution within the features may be lost during the extraction process. Relying
dataset. Weighted average metrics consider the class imbal- on the preprocessed data means that the model’s perfor-
ances, providing a more representative evaluation of the mance highly depends on the quality of the preprocessing
model’s performance. The values in Table 2 were obtained steps applied to the original EEG signals. If the prepro-
from FIGURE 7. The validation loss values were high- cessing steps do not adequately capture relevant features or
lighted for additional insight into the model’s generalization. introduce biases, it could affect the accuracy and reliability
Specifically, the validation loss of the XGBoost classifier of the classification model. While tuning parameters may
is 0.06, the tabNet classifier is 0.13, and the 1D- CNN have led to the acquisition of the best results, there may
model showcased a notably lower validation loss of 0.02. still be unexplored areas of the feature space that could
These loss values indicate how well each classifier in our potentially improve the model’s performance. There may
proposed approach generalizes to unseen data. Numerous be a gap between its performance in a controlled exper-
studies have delved into Epileptic Seizure detection using imental setting and its practical applicability in real-time
EEG signals, achieving encouraging results. The efficacy seizure detection scenarios since the model’s performance
of the models has consistently hinged on the characteristics is evaluated using preprocessed data (UCI epileptic seizure
of the datasets, each with its unique set of features. While detection).
some studies use 1D-CNN models, as shown in Table.3, Despite the progress presented in this paper, Epileptic
additional layers were added to make the model more effi- seizure detection poses several challenges, ranging from
cient and accurate. In our proposed 1D-CNN model, only the complexity of EEG signals to the need for real-time
convolutional, pooling, and classification layers show similar monitoring. Some key challenges include variability in
outcomes concerning accuracy. Still, our investigation stands seizure patterns. Epileptic seizures can manifest in vari-
out by achieving the highest sensitivity, precision, and recall ous patterns, making it challenging to develop a universal
values. algorithm that can accurately detect all types of seizures.
Another challenge is that EEG signals vary significantly
between individuals. Creating a personalized model for
V. CONCLUSION each patient to improve accuracy is a challenge, especially
This research used machine learning and deep learning considering the diversity of seizure presentations. Address-
algorithms to classify epileptic seizures effectively within ing these challenges requires interdisciplinary collaboration
the EEG signals. We meticulously tuned the parameters of between neuroscientists, clinicians, and machine learning
classifiers, namely XGBoost, TabNet, Random Forest and experts.
developed a 1D CNN architecture. Our primary innova-
tion lies in creating a best model that not only predicts B. FUTURE DIRECTIONS
epileptic and non-epileptic seizures with high accuracies Integrating data from multiple sources, such as EEG, elec-
but places a special emphasis on metrics such as preci- trocardiography (ECG), accelerometry, and other physio-
sion, recall, and f1 score, which are crucial in the medical logical signals, provides a more comprehensive view of a
field but may have been overlooked in previous studies. patient’s condition. Multimodal approaches can improve the
By focusing on these metrics, we have highlighted the impor- specificity and sensitivity of seizure detection.
tance of correctly identifying positive cases (seizure events) Deep Learning and domain adaptation techniques can
and negative cases (non-seizure events) in the context of leverage information from related tasks to enhance model

80666 VOLUME 12, 2024


H. Kode et al.: Epileptic Seizure Detection in EEG Signals Using ML and DL Techniques

generalization. Exploring explainable AI methods will [16] U. R. Acharya, S. L. Oh, Y. Hagiwara, J. H. Tan, and H. Adeli,
contribute to the interpretability of these models in a ‘‘Deep convolutional neural network for the automated detection
and diagnosis of seizure using EEG signals,’’ Comput. Biol. Med.,
clinical setting. As technology continues to evolve and vol. 100, pp. 270–278, Sep. 2018, doi: 10.1016/j.compbiomed.2017.09.
interdisciplinary collaborations flourish, the future of 017.
epileptic seizure detection holds the promise of more effec- [17] A. Abdelhameed and M. Bayoumi, ‘‘A deep learning approach for
automatic seizure detection in children with epilepsy,’’ Frontiers Com-
tive, personalized, and accessible solutions that positively put. Neurosci., vol. 15, pp. 1–12, Apr. 2021, doi: 10.3389/fncom.2021.
impact the lives of individuals with epilepsy and their 650050.
caregivers. [18] Q.Wu and E. Fokoue, ‘‘Epileptic seizure recognition,’’ 2017. [Online].
Available: https://www.kaggle.com/datasets/harunshimanto/epileptic-
seizure-recognition, doi: 10.13140/RG.2.2.33336.03843.
CONFLICTS OF INTEREST [19] R. G. Andrzejak, K. Lehnertz, F. Mormann, C. Rieke, P. David,
and C. E. Elger, ‘‘Indications of nonlinear deterministic and finite-
The authors declare no conflict of interest. dimensional structures in time series of brain electrical activity: Depen-
dence on recording region and brain state,’’ Phys. Rev. E, Stat.
REFERENCES Phys. Plasmas Fluids Relat. Interdiscip. Top., vol. 64, no. 6, p. 8,
Nov. 2001.
[1] L. De Clerck, A. Nica, and A. Biraben, ‘‘Clinical aspects of seizures in the [20] T. Chen and C. Guestrin, ‘‘XGBoost: A scalable tree boosting sys-
elderly,’’ Geriatr Psychol. Neuropsychiatr Vieil., vol. 17, no. 1, pp. 7–12, tem,’’ in Proc. 22nd ACM SIGKDD Int. Conf. Knowl. Discovery Data
Mar. 2019. Mining, San Francisco, CA, USA, Aug. 2016, pp. 785–794, doi:
[2] S. Nalla and S. Khetavath, ‘‘A review on epileptic seizure detection and pre- 10.1145/2939672.2939785.
diction,’’ in Intelligent Manufacturing and Energy Sustainability. Cham, [21] S. Ö. Arik and T. Pfister, ‘‘TabNet: Attentive interpretable tabular learn-
Switzerland: Springer, 2023, pp. 225–232. ing,’’ in Proc. AAAI Conf. Artif. Intell., vol. 35, no. 8, pp. 6679–6687,
[3] A. S. Daoud, A. Batieha, M. Bashtawi, and H. El-Shanti, ‘‘Risk factors May 2021.
for childhood epilepsy: A case-control study from Irbid, Jordan,’’ Seizure, [22] M. Varlı and H. Yılmaz, ‘‘Multiple classification of EEG signals and
vol. 12, no. 3, pp. 171–174, Apr. 2003. epileptic seizure diagnosis with combined deep learning,’’ J. Comput. Sci.,
[4] K. Harris. (2018). The Dangers of Seizures: Why vol. 67, Mar. 2023, Art. no. 101943.
You Need Immediate Treatment. [Online]. Available: [23] S. M. Beeraka, A. Kumar, M. Sameer, S. Ghosh, and B. Gupta, ‘‘Accuracy
https://www.osfhealthcare.org/blog/dangers-of-seizures enhancement of epileptic seizure detection: A deep learning approach with
[5] J. W. Britton, L. C. Frey, and J. L. Hopp, An Introductory Text and Atlas of hardware realization of STFT,’’ Circuits, Syst., Signal Process., vol. 41,
Normal and Abnormal Findings in Adults, Children, and Infants [Internet]. no. 1, pp. 461–484, Jan. 2022.
Chicago, IL, USA: American Epilepsy Society, 2016. [24] G. Xu, T. Ren, Y. Chen, and W. Che, ‘‘A one-dimensional
[6] L.-L. Chen, J. Zhang, J.-Z. Zou, C.-J. Zhao, and G.-S. Wang, ‘‘A CNN-LSTM model for epileptic seizure recognition using
framework on wavelet-based nonlinear features and extreme learn- EEG signal analysis,’’ Frontiers Neurosci., vol. 14, pp. 1–20,
ing machine for epileptic seizure detection,’’ Biomed. Signal Process. Dec. 2020.
Control, vol. 10, pp. 1–10, Mar. 2014, doi: 10.1016/j.bspc.2013.11. [25] H. RaviPrakash, M. Korostenskaja, E. M. Castillo, K. H. Lee, C. M. Sali-
010. nas, J. Baumgartner, S. M. Anwar, C. Spampinato, and U. Bagci,
[7] A. Dogra, S. A. Dhondiyal, and D. S. Rana, ‘‘Epilepsy seizure ‘‘Deep learning provides exceptional accuracy to ECOG-based functional
detection using optimised KNN algorithm based on EEG,’’ in Proc. language mapping for epilepsy surgery,’’ Frontiers Neurosci., vol. 14,
Int. Conf. Advancement Technol. (ICONAT), Jan. 2023, pp. 1–6, doi: pp. 1–11, May 2020.
10.1109/ICONAT57137.2023.10080847. [26] Y. Kumar, M. L. Dewal, and R. S. Anand, ‘‘Epileptic seizure
detection using DWT based fuzzy approximate entropy and
[8] Y. Kaya, M. Uyar, R. Tekin, and S. Yıldırım, ‘‘1D-local binary pattern
support vector machine,’’ Neurocomputing, vol. 133, pp. 271–279,
based feature extraction for classification of epileptic EEG signals,’’ Appl.
Jun. 2014.
Math. Comput., vol. 243, pp. 209–219, Sep. 2014.
[27] K. M. Almustafa, ‘‘Classification of epileptic seizure dataset using dif-
[9] S. Ryu, S. Back, S. Lee, H. Seo, C. Park, K. Lee, and D.-S. Kim, ‘‘Pilot ferent machine learning algorithms,’’ Informat. Med. Unlocked, vol. 21,
study of a single-channel EEG seizure detection algorithm using machine May 2020, Art. no. 100444.
learning,’’ Child’s Nervous Syst., vol. 37, pp. 2239–2244, May 2021, doi:
[28] I. Ahmad, X. Wang, D. Javeed, P. Kumar, O. W. Samuel, and S. Chen,
10.1007/s00381-020-05011-9.
‘‘A hybrid deep learning approach for epileptic seizure detection in
[10] M. Mursalin, Y. Zhang, Y. Chen, and N. V. Chawla, ‘‘Automated epilep- EEG signals,’’ IEEE J. Biomed. Health Informat., pp. 1–12, 2023, doi:
tic seizure detection using improved correlation-based feature selection 10.1109/JBHI.2023.3265983.
with random forest classifier,’’ Neurocomputing, vol. 241, pp. 204–214, [29] J. Rabcan, V. Levashenko, E. Zaitseva, and M. Kvassay, ‘‘EEG signal
Jun. 2017, doi: 10.1016/j.neucom.2017.02.053. classification based on fuzzy classifiers,’’ IEEE Trans. Ind. Informat.,
[11] A. A. Asadi-Pooya, M. Kashkooli, A. Asadi-Pooya, M. Malekpour, vol. 18, no. 2, pp. 757–766, Feb. 2022.
and A. Jafari, ‘‘Machine learning applications to differentiate comor-
bid functional seizures and epilepsy from pure functional seizures,’’
J. Psychosomatic Res., vol. 153, Feb. 2022, Art. no. 110703, doi:
10.1016/j.jpsychores.2021.110703.
[12] T. Wadhera, ‘‘Brain network topology unraveling epilepsy and ASD
association: Automated EEG-based diagnostic model,’’ Expert Syst.
Appl., vol. 186, Dec. 2021, Art. no. 115762, doi: 10.1016/j.eswa.2021.
115762.
HEPSEEBA KODE (Student Member, IEEE)
received the M.S. degree in computer science
[13] N. K. C. Pratiwi, I. Wijayanto, and Y. N. Fu’adah, ‘‘Performance analysis
of an automated epilepsy seizure detection using EEG signals based on and information technology from Sacred Heart
1D-CNN approach,’’ in Proc. 2nd Int. Conf. Electron., 2022, pp. 265–277. University, Fairfield, CT, USA, in 2018. She is
[14] Md. N. A. Tawhid, S. Siuly, and T. Li, ‘‘A convolutional long currently pursuing the Ph.D. degree in computer
short-term memory-based neural network for epilepsy detection from science and engineering with the University of
EEG,’’ IEEE Trans. Instrum. Meas., vol. 71, pp. 1–11, 2022, doi: Bridgeport, Bridgeport, CT, USA. Her research
10.1109/TIM.2022.3217515. interests include machine learning, deep learning,
[15] M. Woodbright, B. Verma, and A. Haidar, ‘‘Autonomous deep fea- feature engineering, computer vision, and biomed-
ture extraction based method for epileptic EEG brain seizure clas- ical image processing. She has been a Connecticut
sification,’’ Neurocomputing, vol. 444, pp. 30–37, Jul. 2021, doi: Delta Chapter of Upsilon Pi Epsilon Member, since 2023. She achieved the
10.1016/j.neucom.2021.02.052. Rising Student Award from the University of Bridgeport, in 2023.

VOLUME 12, 2024 80667


H. Kode et al.: Epileptic Seizure Detection in EEG Signals Using ML and DL Techniques

KHALED ELLEITHY (Senior Member, IEEE) of the Northeast Chair, from 2006 to 2008. He was the Chair Con-
has been the PI or co-PI of over three million ference of the American Society for Engineering Education, Bridgeport,
dollars in funded research projects in the past in October 2020. He has been heavily involved with numerous professional
20 years. His sponsors include ARDEC, the United societies during the past 30 years, including the Institute of Electrical Engi-
Nations, the Connecticut NASA Space Grant, neering (IEEE), the Association for Computing Machinery (ACM), and
Cisco, the University of Connecticut START Pro- the American Society of Engineering Education (ASEE). This involvement
gram, the University of Bridgeport CTNEXT, includes conference and workshop organizations, leadership, journal editing,
Saudi Aramco, and King Abdulaziz City for Sci- and other endeavors.
ence and Technology (KACST). His most recent
research results in quantum computing, wireless
communications security, steganography, and data fusion in wireless sensor
networks represent noteworthy contributions to science and technology.
He was elected as a fellow of the African Academy of Sciences to LAIALI ALMAZAYDEH (Member, IEEE) received
recognize his contributions to wireless sensor networks and wireless com- the Ph.D. degree in computer science and engi-
munications, in December 2017. He received the Distinguished Professor neering from the University of Bridgeport, USA,
of the Year Award from the University of Bridgeport, in 2005. He received in 2013, specializing in human–computer interac-
the 2015 Connecticut Quality Improvement Award (CQIA) Gold Innovation tion. She is currently a Full Professor and the Dean
Award. In 2020, he received the IEEE Connecticut Section Outstanding of the College of Engineering and Technology,
Member in Academia Award. He is the Founder and the Co-Chair of the American University in the Emirates, United Arab
International Joint Conferences on Computer, Information, and Systems Emirates. She has published over 70 research
Sciences, and Engineering (CISEE), the most significant online engineering papers in various international journals and confer-
conference that successfully ran from 2005 to 2014. CISSE was techni- ence proceedings. Her research interests include
cally co-sponsored by CT IEEE several times. He was the Co-Chair of human–computer interaction, pattern recognition, and computer security.
the 2014 Zone 1 Conference of the American Society for Engineering She received the best paper awards in three conferences, such as ASEE
Education, Bridgeport, CT, USA, in April 2014, technically co-sponsored by 2012, ASEE 2013, and ICUMT 2016. Recently, she has been awarded two
the IEEE CT Section. He was the Chairman of the IEEE Connecticut Con- postdoctoral scholarships from the European Union Commission and the
ference on Industrial Electronics, Technology & Automation, Bridgeport, Jordanian American Fulbright Commission.
in October 2016. He was the IEEE Connecticut Communications Chapter

80668 VOLUME 12, 2024

You might also like