0% found this document useful (0 votes)
18 views

Novel Features Extraction From EEG Signals for Epilepsy Detection Using Machine Learning Model

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Novel Features Extraction From EEG Signals for Epilepsy Detection Using Machine Learning Model

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

VOL. 7, NO.

10, OCTOBER 2023 6006704

Sensor applications

Novel Features Extraction From EEG Signals for Epilepsy Detection Using
Machine Learning Model
Vandana Pandya1 , Urvashi P Shukla2 , and Amit M Joshi1
1 Department of ECE, Malaviya National Institute of Technology, Jaipur 302017, India
2 Department of CSE, Banasthali Vidyapith, Newai 304022, India

Manuscript received 30 June 2023; revised 26 July 2023; accepted 8 August 2023. Date of publication 30 August 2023; date of current version 12 September
2023.

Abstract—Epilepsy is a neurological disorder that affects the brain, as well as the human body’s nerves and spinal cord,
adversely causing unusual and uncontrollable behavior. This letter presents the prediction of epilepsy based on machine
learning modeling on the Children’s Hospital Boston and Massachusetts Institute of Technology EEG Scalp database.
The novel features are proposed, known as root mean square (RMS) of RMS, mean absolute value, and waveform length
(RRWM) and generalized method of moments (GMM). This letter also presents finding the best machine learning model
by comparing accuracies for a given dataset by varying window size and strides with various classification algorithms.
The best model is observed using K-nearest neighbour (KNN) algorithm, Window size 300, and processed through hyper-
parameter tuning deployed with the proposed features. Dataset preprocessing and conditioning are done using numpy,
pandas, Keras, and SciKit-Learn libraries. The proposed feature RRWM performs the highest accuracy with 99.0256%
and time complexity as 13 ms, whereas GMM being the fastest, has a single computation time of 8.99 ms for epilepsy
detection.

Index Terms—Sensor applications, electroencephalogram (EEG), epilepsy detection, feature extraction, K-nearest neighbour (KNN),
machine learning.

I. INTRODUCTION letter proposes time domain features for precise detection by varying
machine learning algorithms, window size and stride size. The novel
Epilepsy affects a significant portion of the world’s illness bur- features are presented, which have higher accuracy than their coun-
den at roughly about 70 million people worldwide [1]. A central terparts. Finally, the Children’s Hospital Boston and Massachusetts
nervous system disorder wherein abnormal brain activities resulting Institute of Technology (CHB-MIT) EEG Scalp database is used to
in unconsciousness, unnatural behavior, uncontrolled characteristics, verify the robustness of the derived model with proposed features.
and seizures are observed as epilepsy [2]. It can affect anybody The main contributions as follows.
regardless of age, gender, geographical, and cultural boundaries. The 1) A fully automated and highly accurate machine learning model
occurrence of epilepsy is uncertain; hence, it is considered a more is implemented for epilepsy detection using EEG.
serious mental illness [3]. A domain expert uses visual analysis of 2) Two nonlinear features have been derived and proposed for
electroencephalogram (EEG) to detect and evaluate epilepsy episodes, epilepsy detection.
which is a person-dependent procedure. There is also a chance for 3) Several machine learning models have been implemented and
human mistakes, so there is a need for automated solutions for precise compared with standard and proposed features using different
epilepsy detection [4]. This letter presents an efficient machine learning classifiers.
method using EEG signals to identify the Pre-ictal stage [5]. There 4) The models have been implemented using various parametric
have been various efforts for epilepsy detection for various datasets. settings, and the best model is proposed.
We come across different techniques of complex feature extraction The rest of this letter is organized as follows. The proposed features
with classifiers ranging from 3D convoluion neural netwok (3D CNN), of epilepsy detection are introduced in Section II. Section III presents
functional linear discriminant analysis (FLDA), support vector ma- the results and comparisons with other studies. Finally, Section IV
chine (SVM), fuzzy classifier, recurrent neural network (RNN) and concludes this letter.
fAttNet [6], [7]. Across all this work, there has been an emphasis
on feature extraction, such as short-time fourier transform (STFT)
with autoregressive-moving average (ARMA) model [8] along with
sophisticated classifiers. This letter proposes features with higher
II. EPILEPSY DETECTION USING PROPOSED
nonlinearity than the standard features with feature extraction [9]. It FEATURES AND MACHINE LEARNING MODEL
uses a simple classifier to reduce the computation time and increase
A. Proposed Feature Extraction
the accuracy. The improved eigenvalue decomposition of the Hankel
matrix and Hilbert transform method showed better performance with The standard time domain nonlinear features root mean square
time–frequency representation through component merging to differ- (RMS), mean absolute value (MAV), and waveform length (WL) are
entiate seizure and seizure free EEG signals [10], [11], [12]. This used to propose novel features as follows:

Corresponding author: Amit M Joshi (e-mail: [email protected]). N
Associate Editor: K. Ozanyan. (Value(i) )2
Digital Object Identifier 10.1109/LSENS.2023.3309254
RMS = i=1
(1)
N

2475-1472 © 2023 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.

Authorized licensed use limited to: Malaviya National Institute of Technology Jaipur. Downloaded on April 23,2024 at 08:12:06 UTC from IEEE Xplore. Restrictions apply.
6006704 VOL. 7, NO. 10, OCTOBER 2023

Fig. 1. Process flow for deriving ML model.

N
|Value(i) − M|
MAV = (2)
i=1
N


N
WL = |Value(i) − Value(i−1) |. (3)
i=1

The standard features rms, MAV, WL, and moments are already well Fig. 2. Implementation for epilepsy detection using proposed
established and, hence, provide the scope to mathematically combine features.
and enhance their feature extraction capabilities into new features. The
nonlinearity is increased through combining them, which has observed
to perform better for extracting features. The proposed features are
introduced as rms of rms, WL, and MAV (RRWM) and generalized
method of moments (GMM) (Sum of moments around mean) as
defined as follows:

N  
i=1 rms(i) + MAV(i) + WL(i)
2 2 2
RRWM = (4)
N
N N
i=1 (Value(i) − M ) (Value(i) − M )4
3
GMM = + i=1 (5)
N N
where “Value(i) ” refers to the value at the ith position, “M” refers to the
mean value of the sample, “N” is the total number of samples points,
and “rms(i) ,” “MAV(i) ,” and “WL(i) ” denotes rms, MAV, and WL value
at ith sample point, respectively.

Fig. 3. Confusion matrices and scatter plot for proposed features.


B. Deriving Model Using Standard Features
Machine learning (ML) Model is derived by experimenting with III. RESULTS
different parameters such as window size, stride length, algorithms,
and standard time-domain features on the database to find the opti- A. Database
mum model performing throughout uniformly (see Fig. 1). Running
hyperparameter tuning to the obtained optimum model provides the CHB-MIT EEG Scalp Database [16] contains long-term EEG
derived ML model. Parameters include the following: recordings from pediatric epilepsy patients. It was created through
1) window size: 100, 150, 200, 250, and 300; a collaboration between the CHB and the MIT. The recordings are
2) stride length: 40, 60, and 80; conducted over extended periods, allowing for the analysis of both
3) algorithms: SVM, K-nearest neighbour (KNN), linear discrim- interictal (nonseizure) and ictal (seizure) activity. The number of
inant analysis (LDA), quadratic discriminant analysis (QDA), channels varies across recordings but typically ranges from 19 to 25
and radial function (RF) [13]; channels.
4) standard features: rms, MAV, and WL.
B. Discussion
C. Proposed Features for Epilepsy Detection
The results for all combinations by varying window size, strides,
The data processing and analysis steps are performed to extract and algorithms for standard features are summarized in Table 1.
meaningful insights from this CHB-MIT EEG Scalp Database and Best accuracy is obtained for KNN algorithm at window size equals
are helpful in developing accurate classification models [14], [15]. to 300. Fine-tuning for “leaf_size,” “n_neighbors,” and “p” through
The steps involve extracting the EEG data and applying preprocessing hyperparameter tuning results in leaf_size = 1, n_neighbors = 5,
techniques, such as standard scaling and windowing. The proposed and p = 1 with accuracy of 99.02 % which comes out to be the
features (RRWM and GMM) are extracted after splitting the dataset highest.
into training and testing subsets, training a KNN classifier, and evalu- Next, the derived model is proposed with features RRWM and
ating the classifier’s performance. These implementation steps, which GMM for epilepsy detection using CHB-MIT EEG scalp database. The
form a comprehensive EEG data analysis and classification pipeline, values for accuracy, sensitivity, specificity, precision, F1-score [17],
are summarized in Fig. 2. and time complexity for the proposed features are documented in

Authorized licensed use limited to: Malaviya National Institute of Technology Jaipur. Downloaded on April 23,2024 at 08:12:06 UTC from IEEE Xplore. Restrictions apply.
VOL. 7, NO. 10, OCTOBER 2023 6006704

TABLE 1. Accuracy of Each of the Combination of Models Obtained by Varying Window Size, Stride Length, ML Algorithms, and Standard
Features (Highlighted in Bold Perform Best Throughout)

TABLE 2. Performance Evaluation of Proposed Features IV. CONCLUSION


Novel feature extraction is proposed with a machine learning ap-
proach for epilepsy detection. Epilepsy, if predicted before onset, can
lessen the risks associated with sudden unnatural death. The accuracy
and computation time are critical factors for early detection. RRWM
provides good accuracy, and GMM has lesser time complexity for
epilepsy detection. The proposed method can be useful in smart health-
care framework for fast and accurate epilepsy prediction. The proposed
model can be useful problems to reduce society’s neurological disorder
TABLE 3. Comparison With the State-of-Art Methodologies for CHB- burden. The performance of proposed features has not yet been applied
MIT EEG Scalp Database
to real subjects. Similarly, the performance of proposed features on
ECG and other biomedical signal’s is to be explored through detailed
analysis.

REFERENCES
[1] G. Sharma and A. M. Joshi, “A fractal based machine learning method for automatic
detection of epileptic seizures using EEG,” in Proc. Int. Conf. Eng. Emerg. Technol.,
2022, pp. 1–4.
[2] S. Benbadis, “The differential diagnosis of epilepsy: A critical review,” Epilepsy
Behav., vol. 15, no. 1, pp. 15–21, 2009.
[3] G. M. A. S. Tedrus, J. M. Limongi, and J. V. R. Zuntini, “Resilience, quality
of life, and clinical aspects of patients with epilepsy,” Epilepsy Behav., vol. 103,
2020, Art. no. 106398. [Online]. Available: https://www.sciencedirect.com/science/
article/pii/S1525505019303191
[4] A. Segato et al., “Artificial intelligence for brain diseases: A systematic review,”
APL Bioeng., vol. 4, no. 4, Oct. 2020, Art. no. 041503.
[5] M. Soufineyestani, D. Dowling, and A. Khan, “Electroencephalography (EEG)
Table 2. The confusion matrix and scatter plots for both of the proposed technology applications and available devices,” Appl. Sci., vol. 10, no. 21, Oct. 2020,
Art. no. 7453, doi: 10.3390/app10217453.
features are shown with the derived machine learning model in Fig. 3. [6] X. Wei, L. Zhou, Z. Chen, L. Zhang, and Y. Zhou, “Automatic seizure detection
The comparison of proposed features with recent works for epilepsy using three-dimensional CNN based on multi-channel EEG,” BMC Med. Informat.
detection is given in Table 3. Decis. Mak., vol. 18, no. 5, pp. 71–80, 2018.

Authorized licensed use limited to: Malaviya National Institute of Technology Jaipur. Downloaded on April 23,2024 at 08:12:06 UTC from IEEE Xplore. Restrictions apply.
6006704 VOL. 7, NO. 10, OCTOBER 2023

[7] A. Einizade, S. Nasiri, M. Mozafari, S. H. Sardouie, and G. D. Clifford, “Explainable [19] A. Pandey, S. K. Singh, S. S. Udmale, and K. Shukla, “An intelligent optimized deep
automated seizure detection using attentive deep multi-view networks,” Biomed. learning model to achieve early prediction of epileptic seizures,” Biomed. Signal
Signal Process. Control, vol. 79, 2023, Art. no. 104076. Process. Control, vol. 84, 2023, Art. no. 104798. [Online]. Available: https://www.
[8] Z. Chen, G. Lu, Z. Xie, and W. Shang, “A unified framework and method for EEG- sciencedirect.com/science/article/pii/S1746809423002318
based early epileptic seizure detection and epilepsy diagnosis,” IEEE Access, vol. 8, [20] M. Li, W. Chen, and M. Xia, “GNMF-based quadratic feature extraction in SSTFT
pp. 20080–20092, 2020. domain for epileptic EEG detection,” Biomed. Signal Process. Control, vol. 80,
[9] G. Sharma, A. M. Joshi, and E. S. Pilli, “DepML: An efficient machine learning-based 2023, Art. no. 104274. [Online]. Available: https://www.sciencedirect.com/science/
MDD detection system in IOMT framework,” SN Comput. Sci., vol. 3, no. 5, 2022, article/pii/S1746809422007285
Art. no. 394. [21] R. N. S. S. S. Pattnaik, “Machine learning approach for epileptic seizure detection
[10] R. R. Sharma and R. B. Pachori, “Time–frequency representation using IEVDHM- using the tunable-Q wavelet transform based time–frequency features,” Int. J. Inf.
HT with application to classification of epileptic EEG signals,” IET Sci. Meas. Tecnol., vol. 14, pp. 3495–3505, 2022. [Online]. Available: https://link.springer.
Technol., vol. 12, no. 1, pp. 72–82, 2018. com/article/10.1007/s41870-022-00877-1
[11] S. Hu et al., “Exploring the applicability of transfer learning and feature engineering [22] V. Harpale and V. Bairagi, “An adaptive method for feature selection and extraction
in epilepsy prediction using hybrid transformer model,” IEEE Trans. Neural Syst. for classification of epileptic EEG signal in significant states,” J. King Saud Univ. -
Rehabil. Eng., vol. 31, pp. 1321–1332, 2023. Comput. Inf. Sci., vol. 33, pp. 668–676, 2018.
[12] P. A. Chavan and S. Desai, “Effective epileptic seizure detection by classifying focal [23] R. Shivarudhrappa, N. Sriraam, S. Rao, A. Hegde, and P. Kubben, “Automated
and non-focal EEG signals using human learning optimization-based hidden Markov detection of epileptic seizures using successive decomposition index and support
model,” Biomed. Signal Process. Control, vol. 83, 2023, Art. no. 104682. vector machine classifier in long-term EEG,” Neural Comput. Appl., vol. 32,
[13] S. Pancholi and A. M. Joshi, “Intelligent upper-limb prosthetic control (IULP) with pp. 8965–8984, 2020.
novel feature extraction method for pattern recognition using EMG,” J. Mechanics [24] E. Alickovic, J. Kevric, and A. Subasi, “Performance evaluation of empirical mode
Med. Biol., vol. 21, no. 06, 2021, Art. no. 2150043. decomposition, discrete wavelet transform, and wavelet packed decomposition for
[14] S. Kumar, V. Kumar, S. Sarangi, and O. P. Singh, “Gearbox fault diagnosis: A higher automated epileptic seizure detection and prediction,” Biomed. Signal Process.
order moments approach,” Measurement, vol. 210, 2023, Art. no. 112489. Control, vol. 39, pp. 94–102, 2018. [Online]. Available: https://www.sciencedirect.
[15] S. Pancholi et al., “A novel time-domain based feature for EMG-PR prosthetic and com/science/article/pii/S1746809417301544
rehabilitation application,” in Proc. 41st Annu. Int. Conf. IEEE Eng. Med. Biol. Soc., [25] S. Khanmohammadi and C.-A. Chou, “Adaptive seizure onset detection framework
2019, pp. 5084–5087. using a hybrid PCA–CSP approach,” IEEE J. Biomed. Health Informat., vol. 22,
[16] A. Goldberger et al., “CHB-MIT Sacalp EEG Database,” vol. 101, no. 23, no. 1, pp. 154–160, Jan. 2018.
pp. e215–e220, 2010, doi: 10.13026/C2K01R. [26] A. Bhattacharyya and R. B. Pachori, “A multivariate approach for patient-specific
[17] G. Sharma, A. M. Joshi, R. Gupta, and L. R. Cenkeramaddi, “DepCap: A smart EEG seizure detection using empirical wavelet transform,” IEEE Trans. Biomed.
healthcare framework for EEG based depression detection using time-frequency Eng., vol. 64, no. 9, pp. 2003–2015, Sep. 2017.
response and deep neural network,” IEEE Access, vol. 11, pp. 52327–52338, 2023. [27] M. Shanir, P. P. K. Khan, Y. Khan, O. Farooq, and H. Adeli, “Automatic seizure de-
[18] A. A. E. Shoka, M. M. Dessouky, A. El-Sayed, and E. E.-D. Hemdan, “An tection based on morphological features using one-dimensional local binary pattern
efficient CNN based epileptic seizures detection framework using encrypted on long-term EEG,” Clin. EEG Neurosci., vol. 49, 2017, Art. no. 155005941774489.
EEG signals for secure telemedicine applications,” Alexandria Eng. J., vol. 65,
pp. 399–412, 2023. [Online]. Available: https://www.sciencedirect.com/science/
article/pii/S1110016822006639

Authorized licensed use limited to: Malaviya National Institute of Technology Jaipur. Downloaded on April 23,2024 at 08:12:06 UTC from IEEE Xplore. Restrictions apply.

You might also like