Skip to main content
Top
Published in: BMC Medical Informatics and Decision Making 1/2024

Open Access 01-12-2024 | Epilepsy | Research

A comparative study of CNN-capsule-net, CNN-transformer encoder, and Traditional machine learning algorithms to classify epileptic seizure

Authors: Sergio Alejandro Holguin-Garcia, Ernesto Guevara-Navarro, Alvaro Eduardo Daza-Chica, Maria Alejandra Patiño-Claro, Harold Brayan Arteaga-Arteaga, Gonzalo A. Ruz, Reinel Tabares-Soto, Mario Alejandro Bravo-Ortiz

Published in: BMC Medical Informatics and Decision Making | Issue 1/2024

Login to get access

Abstract

Introduction

Epilepsy is a disease characterized by an excessive discharge in neurons generally provoked without any external stimulus, known as convulsions. About 2 million people are diagnosed each year in the world. This process is carried out by a neurological doctor using an electroencephalogram (EEG), which is lengthy.

Method

To optimize these processes and make them more efficient, we have resorted to innovative artificial intelligence methods essential in classifying EEG signals. For this, comparing traditional models, such as machine learning or deep learning, with cutting-edge models, in this case, using Capsule-Net architectures and Transformer Encoder, has a crucial role in finding the most accurate model and helping the doctor to have a faster diagnosis.

Result

In this paper, a comparison was made between different models for binary and multiclass classification of the epileptic seizure detection database, achieving a binary accuracy of 99.92% with the Capsule-Net model and a multiclass accuracy with the Transformer Encoder model of 87.30%.

Conclusion

Artificial intelligence is essential in diagnosing pathology. The comparison between models is helpful as it helps to discard those that are not efficient. State-of-the-art models overshadow conventional models, but data processing also plays an essential role in evaluating the higher accuracy of the models.
Literature
1.
go back to reference Thijs RD, Surges R, O’Brien TJ, Sander JW. Epilepsy in adults. Lancet. 2019;393(10172):689–701.CrossRefPubMed Thijs RD, Surges R, O’Brien TJ, Sander JW. Epilepsy in adults. Lancet. 2019;393(10172):689–701.CrossRefPubMed
2.
go back to reference Perucca P, Bahlo M, Berkovic SF. The genetics of epilepsy. Annu Rev Genomics Hum Genet. 2020;21:205–30.CrossRefPubMed Perucca P, Bahlo M, Berkovic SF. The genetics of epilepsy. Annu Rev Genomics Hum Genet. 2020;21:205–30.CrossRefPubMed
4.
go back to reference Soufineyestani M, Dowling D, Khan A. Electroencephalography (EEG) technology applications and available devices. Appl Sci. 2020;10(21):7453.CrossRef Soufineyestani M, Dowling D, Khan A. Electroencephalography (EEG) technology applications and available devices. Appl Sci. 2020;10(21):7453.CrossRef
5.
go back to reference Shoeibi A, Khodatars M, Ghassemi N, Jafari M, Moridian P, Alizadehsani R, et al. Epileptic seizures detection using deep learning techniques: a review. Int J Environ Res Public Health. 2021;18(11):5780.CrossRefPubMedPubMedCentral Shoeibi A, Khodatars M, Ghassemi N, Jafari M, Moridian P, Alizadehsani R, et al. Epileptic seizures detection using deep learning techniques: a review. Int J Environ Res Public Health. 2021;18(11):5780.CrossRefPubMedPubMedCentral
6.
go back to reference Zhou ZH. Machine learning. Springer Nature; 2021. Zhou ZH. Machine learning. Springer Nature; 2021.
8.
go back to reference Toraman S. Automatic recognition of preictal and interictal EEG signals using 1D-capsule networks. Comput Electr Eng. 2021;91:107033.CrossRef Toraman S. Automatic recognition of preictal and interictal EEG signals using 1D-capsule networks. Comput Electr Eng. 2021;91:107033.CrossRef
9.
go back to reference Hu S, Liu J, Yang R, Wang Y, Wang A, Li K, et al. Exploring the Applicability of Transfer Learning and Feature Engineering in Epilepsy Prediction Using Hybrid Transformer Model. IEEE Trans Neural Syst Rehabil Eng. 2023;31:1321–32.CrossRefPubMed Hu S, Liu J, Yang R, Wang Y, Wang A, Li K, et al. Exploring the Applicability of Transfer Learning and Feature Engineering in Epilepsy Prediction Using Hybrid Transformer Model. IEEE Trans Neural Syst Rehabil Eng. 2023;31:1321–32.CrossRefPubMed
11.
go back to reference Wei Y, Liu Y, Li C, Cheng J, Song R, Chen X. TC-Net: A Transformer Capsule Network for EEG-based emotion recognition. Comput Biol Med. 2023;152:106463.CrossRefPubMed Wei Y, Liu Y, Li C, Cheng J, Song R, Chen X. TC-Net: A Transformer Capsule Network for EEG-based emotion recognition. Comput Biol Med. 2023;152:106463.CrossRefPubMed
12.
go back to reference 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.CrossRefPubMedPubMedCentral 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.CrossRefPubMedPubMedCentral
13.
go back to reference Ma M, Cheng Y, Wei X, Chen Z, Zhou Y. Research on epileptic EEG recognition based on improved residual networks of 1-D CNN and indRNN. BMC Med Inf Decis Mak. 2021;21:1–13. Ma M, Cheng Y, Wei X, Chen Z, Zhou Y. Research on epileptic EEG recognition based on improved residual networks of 1-D CNN and indRNN. BMC Med Inf Decis Mak. 2021;21:1–13.
14.
go back to reference San-Segundo R, Gil-Martín M, D’Haro-Enríquez LF, Pardo JM. Classification of epileptic EEG recordings using signal transforms and convolutional neural networks. Comput Biol Med. 2019;109:148–58.CrossRefPubMed San-Segundo R, Gil-Martín M, D’Haro-Enríquez LF, Pardo JM. Classification of epileptic EEG recordings using signal transforms and convolutional neural networks. Comput Biol Med. 2019;109:148–58.CrossRefPubMed
15.
go back to reference Andrzejak RG, Schindler K, Rummel C. Nonrandomness, nonlinear dependence, and nonstationarity of electroencephalographic recordings from epilepsy patients. Phys Rev E. 2012;86(4):046206.ADSCrossRef Andrzejak RG, Schindler K, Rummel C. Nonrandomness, nonlinear dependence, and nonstationarity of electroencephalographic recordings from epilepsy patients. Phys Rev E. 2012;86(4):046206.ADSCrossRef
16.
go back to reference Andrzejak RG, Lehnertz K, Mormann F, Rieke C, David P, Elger CE. Indications of nonlinear deterministic and finite-dimensional structures in time series of brain electrical activity: Dependence on recording region and brain state. Phys Rev E. 2001;64(6):061907.ADSCrossRef Andrzejak RG, Lehnertz K, Mormann F, Rieke C, David P, Elger CE. Indications of nonlinear deterministic and finite-dimensional structures in time series of brain electrical activity: Dependence on recording region and brain state. Phys Rev E. 2001;64(6):061907.ADSCrossRef
17.
go back to reference Ahmadi A, Shalchyan V, Daliri MRA, new method for epileptic seizure classification in EEG using adapted wavelet packets. In: 2017 Electric Electronics, Computer Science, Biomedical Engineerings’ Meeting (EBBT). IEEE; 2017. p. 1–4. Ahmadi A, Shalchyan V, Daliri MRA, new method for epileptic seizure classification in EEG using adapted wavelet packets. In: 2017 Electric Electronics, Computer Science, Biomedical Engineerings’ Meeting (EBBT). IEEE; 2017. p. 1–4.
18.
go back to reference Wang L, Xue W, Li Y, Luo M, Huang J, Cui W, et al. Automatic epileptic seizure detection in EEG signals using multi-domain feature extraction and nonlinear analysis. Entropy. 2017;19(6):222.ADSCrossRef Wang L, Xue W, Li Y, Luo M, Huang J, Cui W, et al. Automatic epileptic seizure detection in EEG signals using multi-domain feature extraction and nonlinear analysis. Entropy. 2017;19(6):222.ADSCrossRef
21.
go back to reference Liu J, Cai W, Shao X. Cancer classification based on microarray gene expression data using a principal component accumulation method. Sci China Chem. 2011;54:802–11.CrossRef Liu J, Cai W, Shao X. Cancer classification based on microarray gene expression data using a principal component accumulation method. Sci China Chem. 2011;54:802–11.CrossRef
22.
go back to reference Liashchynskyi P, Liashchynskyi P. Grid search, random search, genetic algorithm: a big comparison for NAS. 2019. arXiv preprint arXiv:1912.06059. Liashchynskyi P, Liashchynskyi P. Grid search, random search, genetic algorithm: a big comparison for NAS. 2019. arXiv preprint arXiv:​1912.​06059.
23.
go back to reference Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, Blondel M, Prettenhofer P,Weiss R, Dubourg V, et al. Scikit-learn: Machine learning in python. J Mach Learn Res 2011;12:2825–30. Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, Blondel M, Prettenhofer P,Weiss R, Dubourg V, et al. Scikit-learn: Machine learning in python. J Mach Learn Res 2011;12:2825–30.
25.
go back to reference Klambauer G, Unterthiner T, Mayr A, Hochreiter S. Self-Normalizing Neural Networks. 2017. Klambauer G, Unterthiner T, Mayr A, Hochreiter S. Self-Normalizing Neural Networks. 2017.
26.
go back to reference Rasamoelina AD, Adjailia F, Sinčák PA, review of activation function for artificial neural network. In: 2020 IEEE 18th World Symposium on Applied Machine Intelligence and Informatics (SAMI). IEEE; 2020. p. 281–6. Rasamoelina AD, Adjailia F, Sinčák PA, review of activation function for artificial neural network. In: 2020 IEEE 18th World Symposium on Applied Machine Intelligence and Informatics (SAMI). IEEE; 2020. p. 281–6.
27.
go back to reference Srivastava N, Hinton G, Krizhevsky A, Sutskever I, Salakhutdinov R. Dropout: a simple way to prevent neural networks from overfitting. J Mach Learn Res. 2014;15:1929–58.MathSciNet Srivastava N, Hinton G, Krizhevsky A, Sutskever I, Salakhutdinov R. Dropout: a simple way to prevent neural networks from overfitting. J Mach Learn Res. 2014;15:1929–58.MathSciNet
28.
go back to reference Camacho L, Douzas G, Bacao F. Geometric SMOTE for regression. Expert Syst Appl. 2022:116387. Camacho L, Douzas G, Bacao F. Geometric SMOTE for regression. Expert Syst Appl. 2022:116387.
29.
go back to reference He H, Bai Y, Garcia EA, Li S, ADASYN: adaptive synthetic sampling approach for imbalanced learning. In: 2008 IEEE international joint conference on neural networks (IEEE world congress on computational intelligence). IEEE; 2008. p. 1322–8. He H, Bai Y, Garcia EA, Li S, ADASYN: adaptive synthetic sampling approach for imbalanced learning. In: 2008 IEEE international joint conference on neural networks (IEEE world congress on computational intelligence). IEEE; 2008. p. 1322–8.
30.
go back to reference Géron A. Hands-on machine learning with Scikit-Learn, Keras, and TensorFlow. O’Reilly Media, Inc.; 2022. p. 153–203. Géron A. Hands-on machine learning with Scikit-Learn, Keras, and TensorFlow. O’Reilly Media, Inc.; 2022. p. 153–203.
31.
go back to reference Garavand A, Salehnasab C, Behmanesh A, Aslani N, Zadeh AH, Ghaderzadeh M, et al. Efficient model for coronary artery disease diagnosis: a comparative study of several machine learning algorithms. J Healthc Eng. 2022;2022. Garavand A, Salehnasab C, Behmanesh A, Aslani N, Zadeh AH, Ghaderzadeh M, et al. Efficient model for coronary artery disease diagnosis: a comparative study of several machine learning algorithms. J Healthc Eng. 2022;2022.
32.
go back to reference Sadoughi F, Ghaderzadeh M. A hybrid particle swarm and neural network approach for detection of prostate cancer from benign hyperplasia of prostate. In: e-Health–For Continuity of Care. IOS Press; 2014. p. 481–485. Sadoughi F, Ghaderzadeh M. A hybrid particle swarm and neural network approach for detection of prostate cancer from benign hyperplasia of prostate. In: e-Health–For Continuity of Care. IOS Press; 2014. p. 481–485.
35.
go back to reference Safavian SR, Landgrebe D. A survey of decision tree classifier methodology. IEEE Trans Syst Man Cybern. 1991;21(3):660–74.MathSciNetCrossRef Safavian SR, Landgrebe D. A survey of decision tree classifier methodology. IEEE Trans Syst Man Cybern. 1991;21(3):660–74.MathSciNetCrossRef
36.
go back to reference Pandya VJ. Comparing handwritten character recognition by AdaBoostClassifier and KNeighborsClassifier. In: 2016 8th International Conference on Computational Intelligence and Communication Networks, (CICN). Tehri: IEEE; 2016. p. 271–4. Pandya VJ. Comparing handwritten character recognition by AdaBoostClassifier and KNeighborsClassifier. In: 2016 8th International Conference on Computational Intelligence and Communication Networks, (CICN). Tehri: IEEE; 2016. p. 271–4.
37.
go back to reference Bottou L. Stochastic gradient descent tricks. Neural Networks: Tricks of the Trade. 2nd ed. 2012. p. 421–436. Bottou L. Stochastic gradient descent tricks. Neural Networks: Tricks of the Trade. 2nd ed. 2012. p. 421–436.
38.
go back to reference Gu J, Wang Z, Kuen J, Ma L, Shahroudy A, Shuai B, et al. Recent advances in convolutional neural networks. Pattern Recognit. 2018;77:354–77.ADSCrossRef Gu J, Wang Z, Kuen J, Ma L, Shahroudy A, Shuai B, et al. Recent advances in convolutional neural networks. Pattern Recognit. 2018;77:354–77.ADSCrossRef
40.
go back to reference Dombetzki LA. An overview over capsule networks. Netw Archit Serv. 2018; 2–4. Dombetzki LA. An overview over capsule networks. Netw Archit Serv. 2018; 2–4.
41.
go back to reference Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, et al. Attention Is All You Need. 2023. Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, et al. Attention Is All You Need. 2023.
42.
go back to reference Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, et al. Attention is all you need. Adv Neural Inf Process Syst. 2017;30. Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, et al. Attention is all you need. Adv Neural Inf Process Syst. 2017;30.
43.
go back to reference Tabares-Soto R, Arteaga-Arteaga HB, Mora-Rubio A, Bravo-Ortíz MA, Arias-Garzón D, Alzate-Grisales JA, et al. Sensitivity of deep learning applied to spatial image steganalysis. PeerJ Comput Sci. 2021;7:616.CrossRef Tabares-Soto R, Arteaga-Arteaga HB, Mora-Rubio A, Bravo-Ortíz MA, Arias-Garzón D, Alzate-Grisales JA, et al. Sensitivity of deep learning applied to spatial image steganalysis. PeerJ Comput Sci. 2021;7:616.CrossRef
44.
go back to reference Hosseini A, Eshraghi MA, Taami T, Sadeghsalehi H, Hoseinzadeh Z, Ghaderzadeh M, et al. A mobile application based on efficient lightweight CNN model for classification of B-ALL cancer from non-cancerous cells: a design and implementation study. Inform Med Unlocked. 2023;39:101244.CrossRef Hosseini A, Eshraghi MA, Taami T, Sadeghsalehi H, Hoseinzadeh Z, Ghaderzadeh M, et al. A mobile application based on efficient lightweight CNN model for classification of B-ALL cancer from non-cancerous cells: a design and implementation study. Inform Med Unlocked. 2023;39:101244.CrossRef
46.
go back to reference Fernando GP, Brayan AAH, Florina AM, Liliana CB, Héctor-Gabriel AM, Reinel TS. Enhancing Intrusion Detection in IoT Communications Through ML Model Generalization With a New Dataset (IDSAI). IEEE Access. 2023;11:70542–59. Fernando GP, Brayan AAH, Florina AM, Liliana CB, Héctor-Gabriel AM, Reinel TS. Enhancing Intrusion Detection in IoT Communications Through ML Model Generalization With a New Dataset (IDSAI). IEEE Access. 2023;11:70542–59.
47.
go back to reference Ghaderzadeh M, Aria M, Hosseini A, Asadi F, Bashash D, Abolghasemi H. A fast and efficient CNN model for B-ALL diagnosis and its subtypes classification using peripheral blood smear images. Int J Intell Syst. 2022;37(8):5113–33.CrossRef Ghaderzadeh M, Aria M, Hosseini A, Asadi F, Bashash D, Abolghasemi H. A fast and efficient CNN model for B-ALL diagnosis and its subtypes classification using peripheral blood smear images. Int J Intell Syst. 2022;37(8):5113–33.CrossRef
48.
go back to reference Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, et al. Scikit-learn: machine learning in Python. J Mach Learn Res. 2011;12:2825–30.MathSciNet Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, et al. Scikit-learn: machine learning in Python. J Mach Learn Res. 2011;12:2825–30.MathSciNet
49.
go back to reference Hossin M, Sulaiman MN. A review on evaluation metrics for data classification evaluations. Int J Data Min Knowl Manag Process. 2015;5(2):1.CrossRef Hossin M, Sulaiman MN. A review on evaluation metrics for data classification evaluations. Int J Data Min Knowl Manag Process. 2015;5(2):1.CrossRef
50.
go back to reference Powers DM. Evaluation: from precision, recall and F-measure to ROC, informedness, markedness and correlation. arXiv preprint arXiv:2010.16061. 2020. Powers DM. Evaluation: from precision, recall and F-measure to ROC, informedness, markedness and correlation. arXiv preprint arXiv:​2010.​16061. 2020.
51.
Metadata
Title
A comparative study of CNN-capsule-net, CNN-transformer encoder, and Traditional machine learning algorithms to classify epileptic seizure
Authors
Sergio Alejandro Holguin-Garcia
Ernesto Guevara-Navarro
Alvaro Eduardo Daza-Chica
Maria Alejandra Patiño-Claro
Harold Brayan Arteaga-Arteaga
Gonzalo A. Ruz
Reinel Tabares-Soto
Mario Alejandro Bravo-Ortiz
Publication date
01-12-2024
Publisher
BioMed Central
Published in
BMC Medical Informatics and Decision Making / Issue 1/2024
Electronic ISSN: 1472-6947
DOI
https://doi.org/10.1186/s12911-024-02460-z

Other articles of this Issue 1/2024

BMC Medical Informatics and Decision Making 1/2024 Go to the issue