Next Article in Journal
Guidelines on Asset Management of Offshore Facilities for Monitoring, Sustainable Maintenance, and Safety Practices
Next Article in Special Issue
EEG/fNIRS Based Workload Classification Using Functional Brain Connectivity and Machine Learning
Previous Article in Journal
An Ensemble Approach for the Prediction of Diabetes Mellitus Using a Soft Voting Classifier with an Explainable AI
Previous Article in Special Issue
Epileptic Disorder Detection of Seizures Using EEG Signals
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Classification Model of EEG Signals Based on RNN-LSTM for Diagnosing Focal and Generalized Epilepsy

1
Department of Electrical, Electronics and Systems Engineering, Universiti Kebangsaan Malaysia, Bangi 43600, Malaysia
2
Department of Medicine, Hospital Canselor Tuanku Muhriz, Universiti Kebangsaan Malaysia, Cheras, Kuala Lumpur 56000, Malaysia
*
Author to whom correspondence should be addressed.
Submission received: 30 June 2022 / Revised: 20 September 2022 / Accepted: 20 September 2022 / Published: 25 September 2022
(This article belongs to the Special Issue EEG Signal Processing Techniques and Applications)

Abstract

:
Epilepsy is a chronic neurological disorder caused by abnormal neuronal activity that is diagnosed visually by analyzing electroencephalography (EEG) signals. Background: Surgical operations are the only option for epilepsy treatment when patients are refractory to treatment, which highlights the role of classifying focal and generalized epilepsy syndrome. Therefore, developing a model to be used for diagnosing focal and generalized epilepsy automatically is important. Methods: A classification model based on longitudinal bipolar montage (LB), discrete wavelet transform (DWT), feature extraction techniques, and statistical analysis in feature selection for RNN combined with long short-term memory (LSTM) is proposed in this work for identifying epilepsy. Initially, normal and epileptic LB channels were decomposed into three levels, and 15 various features were extracted. The selected features were extracted from each segment of the signals and fed into LSTM for the classification approach. Results: The proposed algorithm achieved a 96.1% accuracy, a 96.8% sensitivity, and a 97.4% specificity in distinguishing normal subjects from subjects with epilepsy. This optimal model was used to analyze the channels of subjects with focal and generalized epilepsy for diagnosing purposes, relying on statistical parameters. Conclusions: The proposed approach is promising, as it can be used to detect epilepsy with satisfactory classification performance and diagnose focal and generalized epilepsy.

1. Introduction

Epilepsy is a chronic disorder inducing subjects to experience seizures, leading to cognitive impairments, medical and psychiatric comorbidities, social stigmatization, and, in general, poor quality-of-life (QOL) [1]. A recent study reported that the prevalence of lifetime epilepsy was 7.8 per 1000 individuals in Malaysia in 2021 [2]. Diagnoses of epilepsy are basically clarified by an epileptologist based on a clinical assessment, neuro imaging, and the visual detection of interictal epileptiform discharges (IEDs) appearing in 30% of cases in their electroencephalography (EEG) signals [3]. EEG reveals a general overview of neuronal activity in disparate cortical regions by representing potential differences between certain areas of the brain and a determined reference on the head surface in timeseries data [4]. According to [5], known epilepsy is classified into two categories based on the clinical symptoms and the localization of manifested abnormalities in EEG. These epilepsy categories are focal epilepsy, which involves the partial region of the brain, and generalized epilepsy, which affects all regions of the brain. Although anti-seizure drugs (ASDs) are vastly used to control the number of seizures, about one-third of epileptic patients in the world are refractory to treatment, and surgical operation in which the epileptogenic foci need to be removed is the only option. As a result, detecting the affected area linked with the seizure onset zone plays a pivotal role in the process of treatment [6]. The challenge to the diagnosis phase mostly arises from the need to assess long-term EEG recordings, which is time-consuming and prone to inaccuracy due to human error. Consequently, training models for IED observation may be useful in the diagnosis process, especially at times when an epileptologist is unavailable.
Literature shows that the focus in the majority of epilepsy studies is summarized in seizure detection using machine or deep learning techniques to determine the type of epilepsy [7]. This study is concentrated on interictal duration and in the cases in which IEDs are not necessarily available. Diagnosing different types of epilepsy does not solely depend on analyzing EEG signals for discovering IEDs. In this regard, machine learning techniques are used in analyzing epileptic EEG signals. The analysis comprises the following main steps: pre-processing, feature extraction and classification.
Feature extraction of machine learning technique is done in time, frequency, or time–frequency domains [8]. Time–frequency methods such as flexible analytic wavelet transform [9,10], short-time Fourier transform [11], discrete wavelet transform (DWT) [12], Hilber Huang transform [13], and empirical mode decomposition [14] have been considered for diagnosing epilepsy. Automatic focal and non-focal epilepsy were detected using entropy-based features from flexible analytic wavelet transform in [10]. Wavelets, scatter matrices, and quadratic classifiers were, respectively, employed for feature extraction, feature dimensionally reduction, and classification in [15] in order to classify EEG signals to detect epileptic seizures. The study reached a 99% accuracy in distinguishing healthy controls from subjects with epilepsy, with or without seizures. An interictal seizure-free period has been analyzed by [16] using triggering signals of intermittent photic stimulation (IPS) reporting frequency domain features; the theta band is the most fitting feature in diagnosing generalized epilepsy in the visual cortex. This classification has been done with a support vector machine (SVM) in 18 Hz IPS, reaching the best discrimination between groups. The authors in [17] in 2017 introduced a statistical-based solution to overwhelm the empirical or arbitrarily determination of the level of decomposition in wavelets. The study reached an accuracy of more than 80% in detection using an SVM for two datasets: Bern Barcelona and University of Bonn. The authors in [18] evaluated different wavelet families using a probabilistic neural network (PNN) and an SVM. The study reported Coiflet as the best wavelet family in diagnosing epilepsy. Literature shows that the SVM is a valuable tool and is vastly used as a valuable classifier in a variety of clinical diagnostic research [19].
After feature extraction, feature dimensionality reduction is a vital step in analyzing signals in cases where we want to reduce irrelevant features and determine the most effective ones with a high model performance. This can be done through various methods such as feature selection or a combination of features, both of which rely on mathematical solutions behaving as filters, wrappers, and embedded strategies [20,21]. Detecting epileptic seizures with a focus on feature selection based on fuzzy membership was achieved in [22]. The authors in [23] conducted a comparative study to analyze discriminative features using various feature selection techniques in epilepsy. A method for EEG feature selection was introduced in [24] via stacked deep embedded regression with joint sparsity.
Classification steps have been taken by a variety of linear and non-linear classifiers, such as the decision tree [25], logistic regression [26], the k-nearest neighbor, the support vector machine [27], Naive Bayes [28], and artificial neural networks [29,30,31], or deep learning [32]. Artificial intelligence encompasses a variety of areas, and one of them is deep learning (DL). Before the rise of DL, conventional machine learning algorithms involving feature extraction were used. Their performance was limited to the ability of those handcrafting the features. However, in DL, the extraction of features and classification are entirely automated. These techniques have made significant advances in many areas of medicine, such as in the diagnosis of epileptic seizures.
The drawback of machine learning algorithms, albeit still beneficial, is that their performance is limited to the ability of those handcrafting the features [33]. Artificial intelligence encompasses a variety of areas, and one of its branches is deep learning. The priority of deep learning compared to machine learning is that the extraction of features and classification are entirely automated. The paper cited above comprehensively revies deep learning techniques in epilepsy studies from 2016 to 2021 using EEG and neuroimaging techniques with a focus on seizure detection. The review represented the available epilepsy datasets, such as Freiburg, CHB-MIT, and Bonn. It was reported that the majority of researchers employed their own clinical dataset. With a focus on EEG and epilepsy, the paper represented the definition of some of the high-usage deep learning models: one-dimensional convolutional neural networks (1D-CNNs), recurrent neural networks (RNNs) and two of its branches, long short-time memory (LSTM) and gated recurrent units (GRUs), autoencoders (AEs), CNN-RNNs, and CNN-AEs. The paper collected 24 papers on EEG signals in epilepsy detection using 1D-CNNs. The studies used 4–33 layers for their models and found diagnosis accuracies ranging from 79.34% to 99.28% (with one reaching 100%) using mostly Softmax and in some cases SVM classifiers. In 15 studies that applied an RNN and its different branches, mainly LSTM, the accuracy reported was superior (from 84.35% to 98.91% and one 100%) to the CNN. The papers mostly used 4 layers (minimum 3, maximum 48 layers) for their models and mainly used using Softmax and Sigmoid, with one study using multilayer perceptron (MLP) classifiers.
An RNN is developed to process timeseries data through cyclic connections based on feedforward neural networks. The method has been vastly used for seizure prediction with classification approaches. The history of input in an RNN is mapped in order to predict each output by weighting the temporal relationships between the data at each time point. The issue is that a vanishing gradient problem causing the given input influences hidden and output layers, thus decaying or exploding exponentially over time [34]. One of the popular solutions for this is to use LSTM. RNN-LSTM consists of connected subnetworks called a memory block, which remembers inputs for a long time. The authors in [35] used a combination of a 1D-CNN and LSTM for epileptic seizure detection. The authors in [36] investigated the automatic detection of epilepsy by a CNN-LSTM using the University of Bonn dataset and reached an accuracy of more than 80%. CNN-LSTM was further used in [37] on the same dataset to detect epileptic seizures, approaching a 99.71% accuracy, with a focus on the Tunable-Q Wavelet Transform (TQWT) in feature extraction. Using time series data and LSTM to analyze sequenced data, the authors in [38] were able to introduce a hybrid model by a dense convolutional network and LSTM using information transferred from DWT to images for prediction purposes.
In the present study, a model using RNN-LSTM is proposed for distinguishing normal subjects from subjects with epilepsy without observing IEDs. The model is further validated by correctly diagnosing focal and generalized epilepsy. Hence, retrospective EEG data from normal subjects and patients with focal and generalized epilepsy were used. The data of normal subjects and focal epilepsy patients were used for classification purposes, whereas the data of focal and generalized epilepsy patients were used for validating our classification model. After pre-processing using DWT, a longitudinal bipolar (LB) montage was calculated for all groups. Next, features were extracted in time and frequency domains for further selection based on p-values of Pearson’s linear correlation coefficient. Signals were segmented, and the network was trained by a sequence of selected features extracted from each segment. Instead of raw signals, we used features extracted from segments as sequenced data to feed the network. The optimal group of features and the best model are employed to diagnose focal and generalized groups via classifying their LB channels as epileptic or normal, as depicted in Figure 1. The findings reveal that the proposed classification model is effective in detecting epileptic signals from normal signals and diagnosing focal and generalized epilepsy.

2. Materials and Methods

2.1. Dataset

In this study, two sets of data were used for two purposes: to train the classification model (classification approach) and to validate the model (diagnosing approach). EEG data were collected from the hospital Canselor Tuanku Muhriz (HCTM) in Cheras, Malaysia. In the classification approach, the focus is classification between normal and epileptic subjects. In this regard, the temporal lobe channels of 42 patients suffering from non-lesional temporal lobe epilepsy (TLE) and the temporal lobe channels of 62 normal subjects were used. In the diagnosing approach, i.e., distinguishing between focal and generalized epilepsy, whole EEG channels of 50 patients with generalized epilepsy and whole EEG channels of 42 TLE patients were used. Some generalized patients had a normal EEG and were diagnosed as generalized epilepsy patients based on clinical symptoms. EEG was recorded from Fp1, Fp2, F3, F4, F7, F8, C3, C4, P3, P4, T3, T4, T5, T6, O1, and O2: a total of 16 electrodes via the Nicolet EEG device based on the 10–20 EEG standard electrode placement system for each case. For the measurement of EEG signals, subjects (male and female; age: 36.90 ± 13.40) were prepared to contain a contact impedance of less than 5 kΩ and recorded at a 500 Hz sample rate, and data recording was done during a resting state. The affected channels in the TLE cases were deemed as the epilepsy group, and the same channels in the normal cases were deemed as the normal group. From EEG reports and patients’ clinical profiles, we determined that the placements of the affected channels were identified by neurologists in the inferior, mid, and superior areas of the temporal gyrus, i.e., in the right, left, or both hemispheres reflected in specific EEG channels under LB montage: Fp1-F7, F7-T3, T3-T5, T5-O1, Fp2-F8, F8-T4, T4-T6, and T6-O2. The affected channels were referred to as the channels with epilepsy localization. Therefore, the montage was calculated for 10 s of all datasets, 51 affected channels were identified as the epilepsy group, and 62 channels of the same regions were considered as the normal group. This data were studied to train our network. In the final stage, the classification model was validated by testing all LB channels from 50 generalized patients and the same 42 TLE patients (lateralized TLE and both hemispheres affected). The classification model and all EEG analysis were implemented via MATLAB (R2020a).

2.2. Pre-Processing

Pre-processing focused on signal preparation in the aspect of eliminating artifacts due to muscular movement and blinking as well as swallowing manually. DWT using coif3 from the Coiflet family was applied to 10 s of raw signals for both the epileptic and the normal groups to eliminate power line noise by three levels of signal decomposition [39]. A longitudinal bipolar montage was calculated for each group by subtracting the amounts of potential differences between pertinent electrodes [40]. Figure 2 demonstrates the LB montage and the calculation details. In the figure, the cross mark represents the placement of the reference (Ref) while recording EEG signals—somewhere between the frontal lobe and central sulcus. LB consists of 18 channels; in this study, only 16 channels in the left and right posterior and anterior regions were calculated, and the leads Fz, Cz, and Pz were ignored.
LB calculation is defined by replacing targeted leads, as shown by arrows in Figure 2, with the original reference during the EEG recording. For instance, for calculating Fp1-F7 as the first LB channel, first the potential difference recorded from both leads must be added by the amount of the original Ref. The new F7 should then be considered as the new reference for Fp1. This means that the value of F7 must be subtracted from the value of Fp1. In this study, due to the deficiency of the original Ref value, this amount was considered as a common subtracted value in LB calculation. Figure 3 represents 10 s of normal and epileptic EEG signals from one LB channel in the temporal region. Figure 4 exhibits a sample of de-noised generalized and TLE EEG data based on an LB montage.

2.3. Feature Extraction

Fifteen features in the time and frequency domains were extracted from each channel of both the epileptic and normal group: mean, standard deviation (STD), peak-to-peak (P2P), min, max, skewness (Skew), kurtosis (Kurt), peak-to-root sum square (P2RMS), root sum square (RSS), power of delta frequency band (delta; 1–4 Hz), power of theta frequency band (theta; 4–8 Hz), power of alpha frequency band (alpha; 8–14 Hz), power of beta frequency band (beta; 14–30 Hz), and power of gamma frequency band (gamma; over 30 Hz). Figure 5 exhibits a sample of the power spectrum density for one epileptic channel and one normal channel.

2.4. Feature Selection

Pearson’s rank correlation coefficients between all pairs of variables were calculated. The hypothesis test was considered in order to determine which correlations are significantly different from zero. Features with p-value <0.05, i.e., theta, alpha, beta, mean, min, skew, and kurt, were considered if they show a high classification performance. In addition, the features with the lowest correlation (≤20%) were considered, and the features with a high correlation (≥80%) were added separately to the group. Therefore, three groups of five features with low correlations were considered to feed the network.

2.5. Classification Model Using RNN-LSTM

In this research, we used the RNN-LSTM architecture to identify epilepsy and diagnose focal and generalized epilepsy. Hence, the network was implemented with five layers: a sequence input layer, a bidirectional LSTM (BiLSTM) layer with 200 hidden units, a fully connected layer, a SoftMax layer, and a classification output layer. Table 1 represents the details of deep learning layers, values, and descriptions for training the network. The network is fed based on 10-fold cross validation achieved by 80% of the data for training and the remaining 20% was used for testing. EEG signals were segmented with 50% overlapping—1 s for each. Three groups of features were extracted from each segment. The model was trained by each group of features. The model with the best performance was considered as our classification model. In the next stage of the study, the classification model was applied to all LB channels of the focal and generalized epilepsy groups. The overall value of infections for each channel for each group was then calculated, separately. The variance of the overall values, which shows that the channel is affected, was measured for each channel of both groups. A high variance indicates that some channels are affected more than others by our model. Focal and generalized epilepsy cases were encountered when features had high and low variance; respectively. This was used as to validate our classification model.

3. Results and Discussion

3.1. Classification Approach

Figure 6a shows the significance level for the correlation tests specified as a scalar between 0 and 1, representing a low or high correlation, respectively. Negative values show a negative correlation among the relevant features. The figure shows the correlation between two features in the group. As shown, there are three strong correlated group of features surrounded by red boxes that need to be chosen individually, while the rest in these boxes are dropped out [41]. In addition, there are seven features where p < 0.05, i.e., theta, alpha, beta, mean, min, skew, and kurt, indicating significant features for discrimination (Figure 6b). In addition, a high correlation between the power of frequency bands restricted us from introducing three groups of features separated by theta, alpha, or beta. Therefore, we will have three groups of features with theta, alpha, and beta added separately to the mean, min, skew, and kurt.
The ability of the model performance for discrimination has been characterized by sensitivity, specificity, accuracy, positive predictive value (PPV), and negative predictive value (NPV), referring to Equations (1)–(5), respectively. The sensitivity presents the percentage of detecting case subjects, while specificity emphasizes the ability to detect normal subjects. The accuracy is the amount of total detection for both patients and normal subjects from the study population. PPV and NPV represent the proportion of subjects with a positive test result who actually have the disease and those with a negative result who do not have the disease, respectively.
Sensitivty = TP TP + FN × 100
Specificity = TN TN + FP × 100
Accuracy = TP + TN TN + FP + TP + FN × 100
PPV = TP TP + FP × 100
NPV = TN FN + TN × 100
where TP is true positive, representing patients that were correctly diagnosed among the patients, TN is true negative, indicating the number of normal subjects that were correctly diagnosed among normal subjects, FN is false negative, showing the number of subjects wrongly diagnosed as normal among the patients, and FP is false positive, representing the number of subjects wrongly diagnosed as patients among the normal subjects. Table 2 presents the network performance for three groups of features. It seems that the discrimination ability using the first group, highlighted in the table, is higher than the rest. Table 3 shows the details of the confusion matrix for three groups of selected features. The table shows that the model can detect epilepsy well, but there is still some confusion in detecting some samples. The model based on the features of Group 1 incorrectly detected three samples as epileptic instead of normal, and it detected only one normal sample as epileptic. Similarly, with the features of Group 3, there were significantly more false negatives than there were false positives. In contrast, the features of Group 2 led to the opposite balance, where the number of normal samples detected as epileptic was slightly higher. In general, the model behaved better using the features of Group 1, with emphasis on the power of the theta frequency band.

3.2. The Diagnosing Approach

The classification model was applied to each LB channel of EEG recordings from subjects with generalized and focal epilepsy. Figure 7 illustrates the result of the classification model for both groups by presenting the percentage of affected channels in the left or right posterior or anterior LB montage. Regarding focal epilepsy, the majority of the left and right posterior LB channels were diagnosed as affected in over 60% of the study population. Moreover, in the same group, all anterior LB channels were classified as affected in approximately 50% of the study population. In contrast, the generalized epilepsy findings indicate that affected LB channels were affected at a slightly constant rate in approximately 50% of its population. The average (55.59%) and variance (272.14) of detection for focal epilepsy, and the average (44.01%) and variance (51.05) of detection for generalized epilepsy, validate the classification model as a promising tool for distinguishing epileptic signals from normal signals without analyzing IEDs.
Figure 7 appears to indicate that the temporal lobe is not the only region affected in TLE, and the frontal area may be involved in this type of epilepsy. TLE is associated with long-term memory dysfunction [42]. The frontal lobe is related to cognition comprising executive skills as well as memory [43]. Evidence from neurophysiological and neuroimaging literature confirms the deficiency in executive function in the frontal lobe and working memory in TLE cases. The facts support this part of our study achievement.
Turning back to feature extraction step, the power of the theta frequency band were more effective in the classification model compared to the alpha and beta frequencies, albeit being accompanied with four other features (mean, min, skew, and kurt). There is an assumption that epilepsy characteristics are related to theta band connectivity in patients suffering from epileptic seizures [44]. A systematic review confirmed a consistent association between the theta frequency band and idiopathic epilepsy [45]. The authors in [46] reported an increment in theta activity during resting states in patients with major epilepsy syndromes. A diagnostic epilepsy study worked on the spectral power of different frequency bands in controls, patients with well controlled idiopathic generalized epilepsy, and drug-resistant patients. The study confirmed a higher interictal EEG spectral power in all frequency bands, and the reported frequency band were useful in diagnosing epilepsy.
Furthermore, the hippocampus has been claimed as the main structure involved in generating theta oscillations [47]. In 2021, the authors in [48] assessed the effects of hippocampal stimulation by inducing theta frequency, resulting in convulsion elimination. The authors in [49] conducted a successful animal study using deep brain stimulation (DBS) in attenuating seizures in TLE. The hypothesis was the reversal of the effects of stimulation augmentation of the hippocampal theta oscillation. Moreover, it was reported that epileptic seizures occur less often during waking periods or paradoxical sleep period and in conditions when the hippocampal theta rhythm can be observed.

4. Conclusions

In this work, we defined two approaches in proposing a classification model for detecting epilepsy. The first approach was an essential one (the classification approach), and the second approach (the diagnosing approach) was focused on using the model to diagnose focal and generalized epilepsy using statistics. In the classification approach, brain signal processing techniques were implemented for signal pre-processing. De-noising signals and discovering affected channels were performed via DWT and LB montage calculation, respectively. Feature extraction was performed using methods in the time and frequency domains. Feature selection was performed using correlation coefficients. Classification was performed using RNN-LSTM. In this approach, the first aim is to find optimal features in distinguishing epileptic subjects from normal subjects, whereas the second aim is to extract features from segmented EEG signals. Continuous features are fed to the network. In the diagnosing approach, the best classification model was used for each LB channel of focal and generalized epilepsy subjects. The variance of the overall affected channels represented the type of epilepsy, where a high and low variance refers to focal and generalized epilepsy, respectively. In this work, three groups of EEG data were considered: normal subjects (non-epilepsy) and subjects with focal (TLE) and generalized epilepsy. Affected channels were collected from subjects without epilepsy and with focal epilepsy using the classification approach, whereas subjects with focal and generalized epilepsy were considered in the diagnosing approach. The results show that the best classification model was achieved through employing mean, min, skewness, kurtosis, and the power of the theta frequency band, with 96.70% accuracy, 94.44% sensitivity, and 97.6% specificity. Furthermore, it seems that the theta frequency band was more successful than alpha and beta in the detection procedure. The results show a remarkable difference in variance in the diagnosing approach via the proposed classification model. The most important limitation here is the potential lack of IEDs in epileptic EEG signals during interictal periods. Therefore, confident affected signals according to EEG reports were considered as a reference for training network. Furthermore, we could not test the model for other different types of focal lobe epilepsy due to the lack of data caused by a lower prevalence. In our study, we used affected signals from TLE cases because TLE is significantly prevalent in the HCTM dataset. TLE is also known as one of the most common causes of focal epilepsy and one of the most frequent indications of epilepsy surgery. Therefore, TLE became the only option for checking the validity of the model in the diagnosing approach. There is a thread to validate in the classification stage. Despite the selected features that significantly distinguished epileptic subjects from normal subjects, the validation may become confronted with a lower variance in diagnosing focal versus generalized epilepsy by increasing the amount of data. In future work, investigation on more data is suggested. Moreover, it would be beneficial not to combine both hemispherical focal epilepsy in the same diagnosing process. The model then might be needed to optimize the internal parameters that indicate the affected hemisphere.

Author Contributions

The paper is prepared by collaboration among authors in different aspects. The original draft preparation, conceptualization, methodology, software, formal analysis, in-vestigation and visualization were done by T.N. Conceptualization, resources, review and editing, supervision, project administration as well as funding acquisition were done by R.J., R.R. and W.A.W.Z. were responsible for validation, resources and data curation. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Ministry of Higher Education Malaysia through the Fundamental Research Grant Scheme (FRGS/1/2019/TK04/UKM/02/3). The APC was funded by the same grant in addition to two internal grants received from Faculty of Engineering and Built Environment, UKM (DPP-2022 and TAP-20030).

Institutional Review Board Statement

The study was conducted in accordance with the Declara-tion of Helsinki, and approved by the Universiti Kebangsaan Malaysia Ethics Committee (UKM PPI/111/8/JEP-2021-177), date of approval on 19 April 2021.

Informed Consent Statement

Patient consent was waived due to collective report on the overall study results based on retrospective data. This adheres to the research ethics approval.

Data Availability Statement

The data used in the study are not publicly available as the data repository belongs to HCTM that bounds to the ethics approval.

Acknowledgments

The authors would like to thank the Ministry of Higher Education Malaysia for funding the research and UKM Research Ethics Committee for the ethics approval.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Vaurio, L.; Karantzoulis, S.; Barr, W.B. The Impact of Epilepsy on Quality of Life. In Changes in the Brain; Springer: New York, NY, USA, 2017; pp. 167–187. [Google Scholar]
  2. Fong, S.-L.; Lim, K.-S.; Tan, L.; Zainuddin, N.H.; Ho, J.-H.; Chia, Z.-J.; Choo, W.-Y.; Puvanarajah, S.D.; Chinnasami, S.; Tee, S.-K.; et al. Prevalence study of epilepsy in Malaysia. Epilepsy Res. 2021, 170, 106551. [Google Scholar] [CrossRef] [PubMed]
  3. Renzel, R.; Tschaler, L.; Mothersill, I.; Imbach, L.L.; Poryazova, R. Sensitivity of long-term EEG monitoring as a second diagnostic step in the initial diagnosis of epilepsy. Epileptic Disord. 2021, 23, 572–578. [Google Scholar] [CrossRef] [PubMed]
  4. Olejniczak, P. Neurophysiologic basis of EEG. J. Clin. Neurophysiol. 2006, 23, 186–189. [Google Scholar] [CrossRef] [PubMed]
  5. Fisher, R.S.; Cross, J.H.; D’Souza, C.; French, J.A.; Haut, S.R.; Higurashi, N.; Hirsch, E.; Jansen, F.E.; Lagae, L.; Moshe, S.L.; et al. Instruction manual for the ILAE 2017 operational classification of seizure types. Epilepsia 2017, 58, 531–542. [Google Scholar] [CrossRef]
  6. Pati, S.; Alexopoulos, A.V. Pharmacoresistant epilepsy: From pathogenesis to current and emerging therapies. Cleve. Clin. J. Med. 2010, 77, 457–467. [Google Scholar] [CrossRef] [PubMed]
  7. Ahmad, I.; Wang, X.; Zhu, M.; Wang, C.; Pi, Y.; Khan, J.A.; Khan, S.; Samuel, O.W.; Chen, S.; Li, G. EEG-Based Epileptic Seizure Detection via Machine/Deep Learning Approaches: A Systematic Review. Comput. Intell. Neurosci. 2022, 2022, 6486570. [Google Scholar] [CrossRef] [PubMed]
  8. Najafi, T.; Jafaar, R.; Remli, R.; Chellappan, K. The Role of Brain Signal Processing and Neuronal Modeling in Epilepsy. In Proceedings of the International Epilepsy Day, Malaysia, 4 February 2021. [Google Scholar]
  9. Ashokkumar, S.R.; MohanBabu, G.; Anupallavi, S. A KSOM based neural network model for classifying the epilepsy using adjustable analytic wavelet transform. Multimed. Tools Appl. 2020, 79, 10077–10098. [Google Scholar] [CrossRef]
  10. You, Y.; Chen, W.; Li, M.; Zhang, T.; Jiang, Y.; Zheng, X. Automatic focal and non-focal EEG detection using entropy-based features from flexible analytic wavelet transform. Biomed. Signal Process. Control 2020, 57, 101761. [Google Scholar] [CrossRef]
  11. Duque-Muñoz, L.; Espinosa-Oviedo, J.J.; Castellanos-Dominguez, C.G. Identification and monitoring of brain activity based on stochastic relevance analysis of short-time EEG rhythms. Biomed. Eng. Online 2014, 13, 1–20. [Google Scholar] [CrossRef]
  12. Chen, D.; Wan, S.; Xiang, J.; Bao, F.S. A high-performance seizure detection algorithm based on Discrete Wavelet Transform (DWT) and EEG. PLoS ONE 2017, 12, 1–21. [Google Scholar] [CrossRef] [Green Version]
  13. Oweis, R.J.; Abdulhay, E.W. Seizure classification in EEG signals utilizing Hilbert-Huang transform. Biomed. Eng. Online 2011, 10, 38. [Google Scholar] [CrossRef] [PubMed]
  14. Riaz, F.; Hassan, A.; Rehman, S.; Niazi, I.K.; Dremstrup, K. EMD-based temporal and spectral features for the classification of EEG signals using supervised learning. IEEE Trans. Neural Syst. Rehabil. Eng. 2016, 24, 28–35. [Google Scholar] [CrossRef] [PubMed]
  15. Gajic, D.; Djurovic, Z.; Gennaro, S.D.; Gustafsson, F. Classification of eeg signals for detection of epileptic seizures based on wavelets and statistical pattern recognition. Biomed. Eng. Appl. Basis Commun. 2014, 26, 1450021. [Google Scholar] [CrossRef]
  16. Najafi, T.; Jaafar, R.; Remli, R.; Zaidi Wan, A.W.; Chellappan, K. Brain Dynamics in Response to Intermittent Photic Stimulation in Epilepsy. Int. J. Online Biomed. Eng. 2022, 18, 80–95. [Google Scholar] [CrossRef]
  17. Chen, D.; Wan, S.; Bao, F.S. Epileptic focus localization using discrete wavelet transform based on interictal intracranial EEG. IEEE Trans. Neural Syst. Rehabil. Eng. 2017, 25, 413–425. [Google Scholar] [CrossRef] [PubMed]
  18. Gandhi, T.; Panigrahi, B.K.; Anand, S. A comparative study of wavelet families for EEG signal classification. Neurocomputing 2011, 74, 3051–3057. [Google Scholar] [CrossRef]
  19. Ghazal, T.M.; Anam, M.; Hasan, M.K.; Hussain, M.; Farooq, M.S.; Ali, H.M.A.; Ahmad, M.; Soomro, T.R. Hep-Pred: Hepatitis C Staging Prediction Using Fine Gaussian SVM. C. Mater. Contin. 2021, 69, 191–203. [Google Scholar] [CrossRef]
  20. Cherrington, M.; Thabtah, F.; Lu, J.; Xu, Q. Feature selection: Filter methods performance challenges. In Proceedings of the 2019 International Conference on Computer and Information Sciences (ICCIS), Sakaka, Saudi Arabia, 3–4 April 2019; pp. 1–4. [Google Scholar] [CrossRef]
  21. Chandrashekar, G.; Sahin, F. A survey on feature selection methods. Comput. Electr. Eng. 2014, 40, 16–28. [Google Scholar] [CrossRef]
  22. Lee, S.H. Classification of epileptic seizure using feature selection based on fuzzy membership from EEG signal. Technol. Health Care 2021, 29, S519–S529. [Google Scholar] [CrossRef]
  23. Abbaszadeh, B.; Teixeira, C.A.D.; Yagoub, M.C.E. Feature Selection Techniques for the Analysis of Discriminative Features in Temporal and Frontal Lobe Epilepsy: A Comparative Study. Open Biomed. Eng. J. 2021, 15, 1–15. [Google Scholar] [CrossRef]
  24. Jiang, K.; Tang, J.; Wang, Y.; Qiu, C.; Zhang, Y.; Lin, C. EEG Feature Selection via Stacked Deep Embedded Regression With Joint Sparsity. Front. Neurosci. 2020, 14, 829. [Google Scholar] [CrossRef]
  25. Polat, K.; Güneş, S. Classification of epileptiform EEG using a hybrid system based on decision tree classifier and fast Fourier transform. Appl. Math. Comput. 2007, 187, 1017–1026. [Google Scholar] [CrossRef]
  26. Alkan, A.; Koklukaya, E.; Subasi, A. Automatic seizure detection in EEG using logistic regression and artificial neural network. J. Neurosci. Methods 2005, 148, 167–176. [Google Scholar] [CrossRef] [PubMed]
  27. Sharmila, A.; Madan, S.; Srivastava, K.; Sharmila, A.; Madan, S.; Srivastava, K. Epilepsy detection using dwt based hurst exponent and svm, k_nn classifiers. J. Exp. Clin. Res. 2018, 19, 311–319. [Google Scholar] [CrossRef]
  28. Sharmila, A.; Geethanjali, P. DWT Based Detection of Epileptic Seizure from EEG Signals Using Naive Bayes and k-NN Classifiers. IEEE Access 2016, 4, 7716–7727. [Google Scholar] [CrossRef]
  29. Acharya, U.R.; Oh, S.L.; Hagiwara, Y.; Tan, J.H.; Adeli, H. Deep convolutional neural network for the automated detection and diagnosis of seizure using EEG signals. Comput. Biol. Med. 2018, 100, 270–278. [Google Scholar] [CrossRef]
  30. Puspita, J.W.; Soemarno, G.; Jaya, A.I.; Soewono, E. Interictal Epileptiform Discharges (IEDs) classification in EEG data of epilepsy patients. J. Physics Conf. Ser. 2017, 943, 012030. [Google Scholar] [CrossRef]
  31. George, S.T.; Subathra, M.S.P.; Sairamya, N.J.; Susmitha, L.; Joel Premkumar, M. Classification of epileptic EEG signals using PSO based artificial neural network and tunable-Q wavelet transform. Biocybern. Biomed. Eng. 2020, 40, 709–728. [Google Scholar] [CrossRef]
  32. Tjepkema-Cloostermans, M.C.; de Carvalho, R.C.V.; van Putten, M. Deep learning for detection of focal epileptiform discharges from scalp EEG recordings. Clin. Neurophysiol. 2018, 129, 2191–2196. [Google Scholar] [CrossRef]
  33. Shoeibi, A.; Khodatars, M.; Ghassemi, N.; Jafari, M.; Moridian, P.; Alizadehsani, R.; Panahiazar, M.; Khozeimeh, F.; Zare, A.; Hosseini-Nejad, H.; et al. Epileptic Seizures Detection Using Deep Learning Techniques: A Review. Int. J. Environ. Res. Public Health 2021, 18, 5780. [Google Scholar] [CrossRef]
  34. Aliyu, I.; Lim, Y.B.; Lim, C.G. Epilepsy detection in EEG signal Using recurrent neural network. In Proceedings of the 2019 3rd International Conference on Intelligent Systems, Metaheuristics & Swarm Intelligence, Male, Maldives, 23–24 March 2019; pp. 50–53. [Google Scholar] [CrossRef]
  35. Xu, G.; Ren, T.; Chen, Y.; Che, W. A One-Dimensional CNN-LSTM Model for Epileptic Seizure Recognition Using EEG Signal Analysis. Front. Neurosci. 2020, 14, 578126. [Google Scholar] [CrossRef] [PubMed]
  36. Liu, X.; Jia, J.; Zhang, R. Automatic Detection of Epilepsy EEG based on CNN-LSTM Network Combination Model. In Proceedings of the 2020 4th International Conference on Computer Science and Artificial Intelligence, Zhuhai, China, 11–13 December 2020; pp. 225–232. [Google Scholar] [CrossRef]
  37. Malekzadeh, A.; Zare, A.; Yaghoobi, M.; Kobravi, H.R.; Alizadehsani, R. Epileptic seizures detection in eeg signals using fusion handcrafted and deep learning features. Sensors 2021, 21, 7710. [Google Scholar] [CrossRef] [PubMed]
  38. Ryu, S.; Joe, I. A hybrid densenet-LSTM model for epileptic seizure prediction. Appl. Sci. 2021, 11, 7661. [Google Scholar] [CrossRef]
  39. Alyasseri, Z.A.A.; Khader, A.T.; Al-Betar, M.A. Electroencephalogram signals denoising using various mother wavelet functions: A comparative analysis. ACM Int. Conf. Proceeding Ser. 2017, Part F1313, 100–105. [Google Scholar] [CrossRef]
  40. Acharya, J.N.; Hani, A.J.; Thirumala, P.D.; Tsuchida, T.N. American Clinical Neurophysiology Society Guideline 3: A Proposal for Standard Montages to Be Used in Clinical EEG. J. Clin. Neurophysiol. 2016, 33, 312–316. [Google Scholar] [CrossRef] [PubMed]
  41. Making, D.; In, C.; Affairs, H. Decision Making and Change in Human Affairs. In Proceedings of the Fifth Research Conference on Subjective Probability, Utility, and Decision Making, Darmstadt, Germany, 1–4 September 1977. [Google Scholar]
  42. Tramoni-Negre, E.; Lambert, I.; Bartolomei, F.; Felician, O. Long-term memory deficits in temporal lobe epilepsy. Rev. Neurol. 2017, 173, 490–497. [Google Scholar] [CrossRef] [PubMed]
  43. Stretton, J.; Thompson, P.J. Frontal lobe function in temporal lobe epilepsy. Epilepsy Res. 2012, 98, 1–13. [Google Scholar] [CrossRef] [Green Version]
  44. Douw, L.; van Dellen, E.; de Groot, M.; Heimans, J.J.; Klein, M.; Stam, C.J.; Reijneveld, J.C. Epilepsy is related to theta band brain connectivity and network topology in brain tumor patients. BMC Neurosci. 2010, 11, 103. [Google Scholar] [CrossRef]
  45. Faiman, I.; Smith, S.; Hodsoll, J.; Young, A.H.; Shotbolt, P. Resting-state EEG for the diagnosis of idiopathic epilepsy and psychogenic nonepileptic seizures: A systematic review. Epilepsy Behav. 2021, 121, 108047. [Google Scholar] [CrossRef]
  46. Clemens, B.; Emri, M.; Csaba Aranyi, S.; Fekete, I.; Fekete, K. Resting-state EEG theta activity reflects degree of genetic determination of the major epilepsy syndromes. Clin. Neurophysiol. 2021, 132, 2232–2239. [Google Scholar] [CrossRef]
  47. Nuñez, A.; Buño, W. The Theta Rhythm of the Hippocampus: From Neuronal and Circuit Mechanisms to Behavior. Front. Cell. Neurosci. 2021, 15, 649262. [Google Scholar] [CrossRef] [PubMed]
  48. Miller, J.W.; Turner, G.M.; Gray, B.C. Anticonvulsant effects of the experimental induction of hippocampal theta activity. Epilepsy Res. 1994, 18, 195–204. [Google Scholar] [CrossRef]
  49. Wang, Y.; Shen, Y.; Cai, X.; Yu, J.; Chen, C.; Tan, B.; Tan, N.; Cheng, H.; Fan, X.; Wu, X.; et al. Deep brain stimulation in the medial septum attenuates temporal lobe epilepsy via entrainment of hippocampal theta rhythm. CNS Neurosci. Ther. 2021, 27, 577–586. [Google Scholar] [CrossRef] [PubMed]
Figure 1. A flowchart of the study.
Figure 1. A flowchart of the study.
Sensors 22 07269 g001
Figure 2. Longitudinal bipolar montage calculation separated in the left and right posterior and anterior areas.
Figure 2. Longitudinal bipolar montage calculation separated in the left and right posterior and anterior areas.
Sensors 22 07269 g002
Figure 3. Samples of raw signals (top) and de-noised signals (down) of normal (a) and epileptic (b) signals recorded from T4−T6. The X-axis shows the potential difference (µv).
Figure 3. Samples of raw signals (top) and de-noised signals (down) of normal (a) and epileptic (b) signals recorded from T4−T6. The X-axis shows the potential difference (µv).
Sensors 22 07269 g003
Figure 4. Generalized epilepsy (left) and TLE (right) samples based on the LB montage.
Figure 4. Generalized epilepsy (left) and TLE (right) samples based on the LB montage.
Sensors 22 07269 g004
Figure 5. A Sample of power spectral density for one normal channel (a) and one epileptic (b) channel.
Figure 5. A Sample of power spectral density for one normal channel (a) and one epileptic (b) channel.
Sensors 22 07269 g005
Figure 6. Correlation coefficient among features (a), p-value for each feature in group (b).
Figure 6. Correlation coefficient among features (a), p-value for each feature in group (b).
Sensors 22 07269 g006
Figure 7. The result of the classification model for focal (blue) and generalized (grey) groups in classifying each channel as affected channels. The X-axis represents LB channels categorized in the left and right posterior and anterior areas. The Y-axis represents the percentage of affected channels according to the population of each group.
Figure 7. The result of the classification model for focal (blue) and generalized (grey) groups in classifying each channel as affected channels. The X-axis represents LB channels categorized in the left and right posterior and anterior areas. The Y-axis represents the percentage of affected channels according to the population of each group.
Sensors 22 07269 g007
Table 1. Deep learning layers and network training options.
Table 1. Deep learning layers and network training options.
Deep learning LayersValueDescription
BiLSTMLayerBiLSTM with 200 hidden unitsOutput Mode: Last
FullyConnectedLayer2 fully connected layers
SoftmaxLayerSoftmax
ClassificationLayerCrossentropyex
Training OptionValueDescription
ADAM-Adoptive moment estimation—Optimization Algorithm
MaxEpochs3030 passes through the training data in the network
MiniBatchSize150Leads the network to look at 150 training signals at a time
InitialLearnRate0.01Assists to speed up the training process
GradientThreshold1To stabilize the training process by preventing gradients from becoming too large
Table 2. The performance of the network in distinguishing normal subjects from epileptic subjects in the training stage.
Table 2. The performance of the network in distinguishing normal subjects from epileptic subjects in the training stage.
Groups of FeaturesAcc (%)Sen (%)Spc (%)PPV (%)NPV (%)
Group 1: mean, min, skew, kurt, theta96.196.897.498.492.7
Group 2: mean, min, skew, kurt, alpha90.494.085.491.089.7
Group 3: mean, min, skew, kurt, beta91.487.397.698.082.0
Table 3. The details of the confusion matrix for the three groups of features.
Table 3. The details of the confusion matrix for the three groups of features.
Predicted Classes
Group 1Group 2Group 3
EpilepticNormalEpilepticNormalEpilepticNormal
Actual ClassesEpilepsy381356401
Normal362459855
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Najafi, T.; Jaafar, R.; Remli, R.; Wan Zaidi, W.A. A Classification Model of EEG Signals Based on RNN-LSTM for Diagnosing Focal and Generalized Epilepsy. Sensors 2022, 22, 7269. https://0-doi-org.brum.beds.ac.uk/10.3390/s22197269

AMA Style

Najafi T, Jaafar R, Remli R, Wan Zaidi WA. A Classification Model of EEG Signals Based on RNN-LSTM for Diagnosing Focal and Generalized Epilepsy. Sensors. 2022; 22(19):7269. https://0-doi-org.brum.beds.ac.uk/10.3390/s22197269

Chicago/Turabian Style

Najafi, Tahereh, Rosmina Jaafar, Rabani Remli, and Wan Asyraf Wan Zaidi. 2022. "A Classification Model of EEG Signals Based on RNN-LSTM for Diagnosing Focal and Generalized Epilepsy" Sensors 22, no. 19: 7269. https://0-doi-org.brum.beds.ac.uk/10.3390/s22197269

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop