Next Article in Journal
A U-Net Architecture for Inpainting Lightstage Normal Maps
Previous Article in Journal
Implementing Virtualization on Single-Board Computers: A Case Study on Edge Computing
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Electrocardiogram Signals Classification Using Deep-Learning-Based Incorporated Convolutional Neural Network and Long Short-Term Memory Framework †

College of Engineering and Technology, American University of the Middle East, Egaila 54200, Kuwait
*
Author to whom correspondence should be addressed.
This paper is an extended version of our paper published in 5th International Conference on Bio-engineering for Smart Technologies (BioSMART), Paris, France, 7–9 June 2023.
Computers 2024, 13(2), 55; https://doi.org/10.3390/computers13020055
Submission received: 13 December 2023 / Revised: 31 January 2024 / Accepted: 1 February 2024 / Published: 18 February 2024
(This article belongs to the Topic Artificial Intelligence Models, Tools and Applications)

Abstract

:
Cardiovascular diseases (CVDs) like arrhythmia and heart failure remain the world’s leading cause of death. These conditions can be triggered by high blood pressure, diabetes, and simply the passage of time. The early detection of these heart issues, despite substantial advancements in artificial intelligence (AI) and technology, is still a significant challenge. This research addresses this hurdle by developing a deep-learning-based system that is capable of predicting arrhythmias and heart failure from abnormalities in electrocardiogram (ECG) signals. The system leverages a model that combines long short-term memory (LSTM) networks with convolutional neural networks (CNNs). Extensive experiments were conducted using ECG data from both the MIT-BIH and BIDMC databases under two scenarios. The first scenario employed data from five distinct ECG classes, while the second focused on classifying data from three classes. The results from both scenarios demonstrated that the proposed deep-learning-based classification approach outperformed existing methods.

1. Introduction

Artificial intelligence (AI) was invented by John McCarthy, the father of AI, in [1]. AI was developed with the aim of emulating human cognitive processes, fostering the hope that it would not only augment but also significantly assist in human endeavors. While traditional machine learning techniques like support vector machines (SVMs) have been around for a while in medical image and signal classification, they are falling short. First, their accuracy is not quite good enough for real-world use. Second, they have seen slow progress in recent years. On top of that, extracting and selecting features is a time-consuming task and often varies depending on the algorithm used and the type of image being analyzed. Deep neural networks (DNNs), specifically convolutional neural networks (CNNs), have been revolutionizing classification tasks for more than a decade and have reached impressive performance levels [2]. In fact, some CNN-based research in medical image and signal classification has achieved accuracy that rivals even human experts. AI has lately been used in diverse fields such as facial expression recognition [3], cyber security [4], space missions [5], management [6], online education [7], and chip development [8]. Furthermore, the use of AI has developed content-creation software such as Photoshop or Midjourney, in which AI can now generate images or art just from a description of the scene. Moreover, lately many big companies and researchers have been focusing on using AI in biomedical fields such as COVID-19 detection [9,10], cancer detection [11], and arrhythmia detection [12]. Arrhythmia is a kind of heart disease which causes an irregular rhythm within the heart. When it comes to heart diseases, it is necessary to perform what is called an ECG test. The ECG test is a non-invasive procedure where doctors attach several sensors to areas of the patient’s body, such as arms, legs and, most importantly, chest. The main purpose of these sensors is to record the electrical activity of the heart and pass it into the ECG machine where it will be presented to doctors for a diagnosis of the heart condition of the patient. Unfortunately, doctors might sometimes misdiagnose the ECG waveform, which will prevent early-stage treatment and in turn might lead to the patient’s death. Therefore, using an automated system is good practice to effectively increase correct diagnoses without overwhelming the doctors. Only suspicious cases can be referred to highly skilled and experienced doctors for further analysis. To achieve this, training a model on reliable databases for extracting and classifying the relevant information is required. The time domain representation of the signal might not be enough to extract the salient discriminating features. Instead, transforming the ECG signal to the frequency domain using Fourier transform [13] can help in extracting more useful information. Other transform methods such as continuous wavelet transform [14,15] can also be used; this mainly represents signals in the frequency domain as heat map images of either scalograms or spectrograms.
Many researchers have proposed different algorithms and techniques for detecting and predicting the type of arrhythmia in the heartbeat using various arrhythmia datasets such as MIT-BIH and BIDMC databases [13,14,15,16,17,18,19]. Researchers in [20] introduced a federated semi-supervised learning (FSSL) framework named FedECG for ECG abnormality prediction based on the ResNet-9 model. They claimed that their framework managed to solve both challenges of non i.i.d. data [21,22] and heavy labeling while maintaining personal privacy. The development of a generalized model and data imbalance are another two challenges that have been addressed in another study that used a four-layer convolutional neural network (CNN) model [23]. They proposed introducing new data augmentation for the ECG signal using simple identical-length segments and re-arrangement to obtain well-distinguished synthetic signals. In other studies, a combination network of convolutional neural network (CNN) and long short-term memory (LSTM) were used in which the major feature selection and classification steps were merged in the deep network [12,24].
Another system called the spatiotemporal attention-based convolutional recurrent neural network (STA–CRNN), consisting of a CNN subnetwork, spatiotemporal attention modules, and an RNN subnetwork, was developed in [25]. The study claimed that the classification performance could be greatly improved by such a combination, as these networks ignored the fact that different channels and temporal segments of the feature map extracted from the 12-lead ECG signal contribute differently to cardiac arrhythmia detection. Another classifier proposed to transform the ECG heartbeat signals into images before processing them [26]. The proposed ADCGNet (attention-based dual-channel Gabor network) involves using analytical Morlet transform on the obtained ECG images before applying 32 Gabor filters with Sobel edge detection for features enhancement.
Another work proposed an automatic identification and classification of ECG by developing a dense heart rhythm network that combines a 24-layer deep convolutional neural network (DCNN) and bidirectional long short-term memory (BiLSTM) [27]. Their networks deeply extract the hierarchical and time-sensitive features of ECG data using different sizes of convolution kernels. Wavelet transform and median filtering were applied to eliminate the influence of noise on the signal. Other researchers suggested a hybrid approach using two-dimensional CNN–LSTM accompanied by continuous wavelet transform (CWT) as the feature extractor [28]. To predict arrhythmias, one had to transform the ECG signals from 1D into a scalogram image using CWT. They managed to extract the required features and eliminate signal from irrelevant artifacts. The combination of the time–frequency domain provided better understanding of different arrhythmia characteristics. The obtained images are fed to a CNN–LSTM model, where the CNN works by extracting features, using convolutional operations. On the other hand, LSTM can also extract and memorize relevant features to be used for enhancing the prediction.
The researchers in [29] implemented a similar framework using CNN and LSTM for COVID-19 detection. This system takes a time series data, specifically, statistical information from sick people, and tests it against COVID-19 infection. Another system utilized two techniques for detecting COVID-19 by using both speech (voice, coughing, and breathing) and X-ray images [30]. Since detecting COVID-19 symptoms is a challenging task, a combination of CNN and LSTM was used to enhance the prediction of such symptoms. Data augmentation was applied to overcome the problem of small data size when implementing this speech–image-based model. Our research in this study for the ECG classification problem involved extensive experiments on two databases: MIT-BIH and BIDMC. The first scenario focused on decoding five distinct classes in the MIT-BIH database. In the second scenario, we merged both databases, MIT-BIH and BIDMC, into a three-class setting. In both scenarios, our approach uses a CNN–LSTM combination as a DL model for ECG signals classification. FFT extracts features from the ECG signals before feeding them to the DL model. The proposed approach had to be well-trained to separate the subtle differences in the ECG signals and accurately classify each beat into its correct category.
The rest of the paper is organized as follows: Section 2 explains the methodology of database preparation and segmentation, feature extraction, and the proposed approach. Experimental results are shown and discussed in detail in Section 3. Section 4 concludes the paper with proposals for future research directions.

2. Materials and Methods

2.1. Database Preparation

For the experiments conducted in this study, two different heartbeat ECG databases from the freely available medical research PhysioNet repository have been utilized, namely the MIT-BIH and BIDMC databases. The MIT-BIH database, as shown in Figure 1, has 2 main classes, the normal sinus rhythm (NSR) class, and the arrhythmia (ARR) class; meanwhile, the BIDMC database had only one, the congestive heart failure (CHF) class. In addition, the arrhythmia (ARR) class in the MIT-BIH database consists of 4 different sub-classes, namely supraventricular ectopic beat (S), ventricular ectopic beat (V), fused beat (F), and unknown beats (Q).
The data originally had 162 recordings which are divided among the 3 main classes. The ARR class consists of 96 recordings, the CHF class consists of 30 recordings and the NSR class consists of 36 recordings. For consistency, a sampling frequency of 128 Hz was used for all the recordings. The interclass imbalanced data problem was resolved by using only 30 recordings from each class, ending up with 90 recordings.

2.2. Database Segmentation

Segmentation is an important tool that splits the original signal into smaller parts for easier analysis and processing, especially with inputs having a massive number of features. Each one of the recordings consists of a vector of 65,536 features. This vector was segmented into smaller, non-overlapping, and equally sized samples with 500 features. Through the process, the ECG signal recording was segmented into 131 feature vectors (⌊65,536/500⌋). So, each class of the 3 main (ARR, NSR, CHF) classes will have 3930 samples/vectors making a total of 11,790 feature vectors extracted out of the 90 recordings. Figure 2 shows a portion of the original ECG signal (first 2000 values) and a segmented feature vector of the ECG signal with 500 features.

2.3. Feature Extraction

An electrocardiogram (ECG) records the denominated atrial depolarization (P wave), ventral depolarization (QRS complex wave), and repolarization (T wave) of the heart and uses electrodes placed on the body surface to measure the heart’s electrical activity. Based on the intervals between the ECG waves, the heart rate can be calculated. Fast Fourier transform (FFT), a discrete Fourier transform algorithm, solves a wide range of problems, including data filtering, digital signal processing, and partial differential equations. It has been used in many applications such as speech enhancement [31], radar signal processing [32], and ECG classification [12,33]. In this study, fast Fourier transform (FFT), will be used to extract all the frequency components that are contributing to the heartbeat signal including linear and nonlinear components. The electric signal generated from the human heart that creates the cardiac cycle comprises three basic components: P wave, QRS complex, and T wave, as shown in Figure 3. The linear components of the heartbeat signal are represented by the P wave, the T wave, and the QRS complex. There are two nonlinear components, namely the PR segment and the ST segment.

2.4. The Proposed Approach

This research focuses on developing an automated deep learning model that can classify various classes using a convolutional neural network (CNN) and long short-term memory (LSTM). It has been proven that CNNs can be used for complex applications such as ECG classification [12,33,34]. On the other hand, LSTM is an advanced model that was developed from the recurrent neural networks (RNN) by Hochreiter and Schmidhuber [35]. LSTM is a sequential deep learning model that allows the information to be preserved in the memory so that the system remembers the related data and uses them to enhance the classification process [36,37,38]. In addition, fast Fourier transform was used as a feature extraction technique to extract the salient information from the ECG signal. The extracted feature vectors are fed to the CNN–LSTM model for classification. An illustration of the proposed model using CNN–LSTM is shown in Figure 4. The model has five convolution layers. Each of the 5 layers consists of convolution, batch normalization, and max pooling layers. The output of the last convolution layer is fed to the LSTM layer before classification. The output layer has k outputs ( k = 3 or k = 5 ), depending on the number of classes in the applied scenario.
As shown in Figure 5, LSTM works by using the current input xt, the previous cell state of short-term memory Ct−1 and the previous state of the hidden state ht−1 to calculate the current cell state Ct and the current hidden state ht in each computational step.
Figure 4 shows how the proposed approach is composed of 5 main layers. FFT, CNN, and LSTM are the three main components of the model. These components are combined to enhance the classification accuracy. The first layer is the input convolutional layer, which is a 1-dimensional layer. A batch normalization layer normalizes the output after the convolution. Finally, the max pooling layer slides a kernel into the result to obtain the maximum value at each location within the input layer. The outputs will propagate through the next 4 convolutional layers in the same manner. To enhance the learning process, LSTM with 200 units has been chosen to allow the model to remember as many complex features as possible for boosting the performance. The output of the LSTM layer will continue to the output layer, which is a dense layer that has k output neurons based on the number of classes for each scenario. The SoftMax function is used as the activation function. In addition, the model stopping criterion for training was set to 30 epochs. Figure 6 shows the accuracy and the loss of the model for both the training and the validation at each epoch. The training of the model stopped at epoch 10 because no improvement was recorded for three consecutive epochs and to avoid the overfitting problem. Batch size allows the system to take the input data in sequence. This will help the model to learn either at a low rate (slow convergence) or a high rate (Fast convergence). This convergence will affect the error estimation in both training and validation losses and accuracy. It is important to set a proper batch size as it affects the model’s performance. Different batch sizes were tested and a batch size of 40 was found to be the optimal value for our model.

3. Results and Discussion

Our research through the ECG classification problem involved extensive experiments on two databases: MIT-BIH and BIDMC. The first scenario focused on decoding five distinct classes in the MIT-BIH database (see Figure 7). Four of these classes, the S, V, F, and Q, represented various types of arrhythmias, each with their own irregularities in the ECG recording. The fifth, the NSR, represented the normal beat, the baseline against which the other classes were judged. Our approach had to be well-trained to separate these subtle differences and accurately classify each beat into its correct category. In the second scenario, we merged both databases, MIT-BIH and BIDMC, into a three-class setting (see Figure 8). Here, the ARR and NSR classes from MIT-BIH remained, but a new class emerged: CHF, the congestive heart failure from the BIDMC database.

3.1. Results of the First Scenario

Our research delved into classifying five distinct heart rhythm types from the MIT-BIH database, deploying diverse machine learning ML and deep learning DL algorithms. Examples of ML algorithms used here are as follows: principal component analysis (PCA), which scrutinizes the ECG signal’s complexities, identifying key patterns and reducing its dimensionality [39,40]; independent component analysis (ICA) which unmasks hidden or overlapping signals lurking within the ECG [41,42]; random forest (RF) which builds a team of decision trees, each analyzing the ECG signal slightly differently, and then votes for the most likely heart rhythm category [43,44,45]; and K-best algorithm that picks the K most relevant features from the ECG signal, focusing on the distinctive features that matter most for classification [46]. As for deep learning algorithms, both CNN and LSTM were used. The performance comparison among the literature results, implemented algorithms, and the proposed approach are shown in Table 1. In this scenario, the MIT-BIH database had five distinctive classes called normal sinus rhythm (N), supraventricular ectopic beat (S), ventricular ectopic beat (V), fused beat (F), and unknown beats (Q). The results of both approaches from [44] were calculated from the confusion matrices provided in their article. PCA-ICA+RF and FFT+CNN algorithms were implemented for comparison purposes.
As for the proposed approach, FFT+CNN–LSTM, it achieved the highest accuracy (97.4%) among all the compared models. Incorporating the LSTM into the CNN slightly helped improve the performance of the proposed approach. The confusion matrix of the FFT+CNN–LSTM approach is shown in Table 2.

3.2. Results of the Second Scenario

In this scenario, three classes were used in the conducted experiments for classification. Two main classes from the MIT-BIH database were used (normal sinus rhythm, NSR, and arrhythmia, ARR) together with the third class from the BIDMC database (congestive heart failure, CHF). The categories of the main classes from both databases are already shown in Figure 1. The data originally had 162 recordings for the three classes, where ARR had 96 recordings, CHF had 30 recordings, and NSR had 36 recordings. To solve this imbalanced data problem, only 30 recordings from each class were used for extracting the feature vectors making a total of 90 recordings. As mentioned in the data preparation section, each recording was segmented into equally size feature vectors of length 500, making a total of 11,790 feature vectors. Table 3 compares the performance of various existing approaches against the proposed approach. The proposed FFT+CNN–LSTM approach outperformed all the models by achieving 99.2% performance. The result of FFT+CNN–LSTM approach was obtained using 9432 (80%) vectors for training and 2358 (20%) vectors for testing. Table 4 illustrates the confusion matrix of the proposed FFT+CNN–LSTM approach. The recorded execution time for classification of all the test vectors/samples was 213 s using Asus ROG STRIX G17 laptop with CPU: Intel(R) Core(TM) i7-10750H CPU @2.60 GHz; GPU: NIVIDA GeForce RTX 2060 6 GB; RAM: 16 GB.
As can be observed from the provided results in the previous tables, by successfully differentiating between these cardiac heart conditions across different ECG signals, our proposed approach further solidified its potential for real-world application in the diverse area of heart disease diagnosis. Convolutional neural networks (CNNs) and long short-term memory (LSTM) network as examples of artificial intelligence (AI) were shown to be superior algorithms for revolutionizing medical diagnosis, but like any powerful tool, they come with a double-edged sword. On the one hand, Al’s potential to improve accuracy, speed, and accessibility is undeniable. CNNs, for instance, excel in analyzing medical signals such as ECG and EEG signals or medical images like X-rays, MRI scans, and CT scans, detecting subtle patterns that might elude even the most experienced eyes. This translates to earlier diagnoses, better treatment decisions, and ultimately can significantly influence treatment outcomes. AI algorithms, meanwhile, can process vast amounts of clinical data, identifying risk factors and predicting disease progression with amazing precision. This allows doctors to personalize care and prioritize resources efficiently. However, we must be aware of the potential drawbacks and risks. Firstly, AI algorithms are only as good as the data they are trained on. Biased datasets can lead to biased algorithms, disadvantaging people belonging to certain demographics, races, or classes. Secondly, opaque AI models offer little transparency in their decision making, potentially eroding trust between patients and doctors. Thirdly, overreliance on AI could diminish the critical role of human expertise and intuition in diagnosis. The final diagnosis should always be made by a qualified doctor, with AI acting as an assisting tool, not a replacement.
In a paper by Phillips et al., released by NIST, they introduce four principles that are believed to be fundamental properties for explainable AI systems [50]. They recognized that not all AI systems may require explanations. However, for those AI systems that are intended or required to be explainable, they should adhere to four principles: they should provide explanation by evidence or reason for their outputs; they should be meaningful to their users; they should provide explanation accuracy that reflects the system’s process; they should have knowledge limits, where the system should only operate under conditions for which it was designed and when it reaches sufficient confidence in its output.
The ENISA report on securing machine learning algorithms dispels the notion that a single, uniform strategy for security is applicable across the board [51]. Their research findings suggest organizations relying on AI should conduct thorough, individual analyses of their specific systems. Different algorithms have unique vulnerabilities, and applying the same set of controls across the board is not effective because different security measures carry different trade-offs. Some might enhance security, but at the cost of speed. Others might boost performance, but leave vulnerabilities exposed. To strike the right balance between security, privacy, and performance, ENISA emphasizes the importance of targeted risk assessments tailored to each unique AI system. Therefore, the entire cybersecurity and privacy strategies must be meticulously tailored to the context and reality of the individual organization. This way, organizations can make informed decisions about the security controls they implement, ensuring optimal protection without sacrificing performance or privacy.

4. Conclusions

The automatic and accurate diagnosis of the irregularities in the ECG signal is essential and crucial for a patient’s life. A deep-learning-based system using both convolution neural networks (CNNs) and long short-term memory networks (LSTMs) was developed to predict different irregularities in the heartbeats for various heart diseases. Experiments were conducted on ECG data from PhysioNet, the medical research repository. FFT transformation was applied as a preprocessing stage before feeding the results to the deep learning model for classification. The proposed approach was trained and tested in two scenarios: one with five classes (including normal beats and four types of arrhythmias), and another with three classes (normal, arrhythmia, and congestive heart failure). Experimental results showed that the proposed FFT+CNN–LSTM approach outperformed other machine learning and deep learning models in both scenarios, where it achieved an accuracy of 97.6% (five classes) and 99.20% (three classes), respectively. Our deep-learning-based system proved adept at identifying these heart conditions, potentially paving the way for earlier diagnoses and improved patient outcomes. The proposed model uses the actual values of the heartbeat signal as a one-dimensional vector instead of using the statistical readings from the intervals, such as the PR, QT, or QRS intervals (presented in Figure 3) of the ECG signal. This will make the system robust to the change in the acquisition machine where slight changes, shifts, and noise might affect the recorded signals.
In conclusion, it is evident that deep neural networks have the potential to transform medical diagnosis, but their integration requires careful consideration and ethical implementation. Any future work must focus on addressing main drawbacks and issues such as data biases, data privacy, and security, improving explainability, and ensuring responsible use alongside human expertise. Only then, we can truly harness the power of such tools to create a healthier future for mankind.

Author Contributions

Conceptualization, A.E. and E.A.; Methodology, A.E. and E.A.; Software, E.A.; Validation, A.E. and E.A.; Formal Analysis, A.E.; Investigation, A.E.; Resources, A.E.; Data Curation, E.A.; Writing—Original Draft Preparation, E.A.; Writing—Review and Editing, A.E.; Visualization, E.A.; Supervision, A.E.; Project Administration, A.E.; Funding Acquisition, A.E. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Databases used in this research are available at https://physionet.org/about/database/ (accessed on 1 December 2023).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Andresen, S.L.; McCarthy, J. Father of AI. IEEE Intell. Syst. 2002, 17, 84–85. [Google Scholar] [CrossRef]
  2. Rawat, W.; Wang, Z. Deep convolutional neural networks for image classification: A comprehensive review. Neural Comput. 2017, 29, 2352–2449. [Google Scholar] [CrossRef] [PubMed]
  3. Abdulrahman, M.; Gwadabe, T.R.; Abdu, F.J.; Eleyan, A. Gabor wavelet transform based facial expression recognition using PCA and LBP. In Proceedings of the 22nd Signal Processing and Communications Applications Conference (SIU), Trabzon, Turkey, 23–25 April 2014; pp. 2265–2268. [Google Scholar] [CrossRef]
  4. Zhang, Z.; Hamadi, H.A.; Damiani, E.; Yeun, C.Y.; Taher, F. Explainable artificial intelligence applications in cyber security: State-of-the-art in research. IEEE Access 2022, 10, 93104–93139. [Google Scholar] [CrossRef]
  5. Ren, X.; Chen, Y. How Can Artificial Intelligence Help with Space Missions—A Case Study: Computational Intelligence-Assisted Design of Space Tether for Payload Orbital Transfer Under Uncertainties. IEEE Access 2019, 7, 161449–161458. [Google Scholar] [CrossRef]
  6. Schrettenbrunnner, M.B. Artificial-Intelligence-Driven Management. IEEE Eng. Manag. Rev. 2020, 48, 15–19. [Google Scholar] [CrossRef]
  7. Lin, P.-H.; Wooders, A.; Wang, J.T.-Y.; Yuan, W.M. Artificial Intelligence, the Missing Piece of Online Education? IEEE Eng. Manag. Rev. 2018, 46, 25–28. [Google Scholar] [CrossRef]
  8. James, A.P. What and How of Artificial General Intelligence Chip Development. IEEE Trans. Cogn. Dev. Syst. 2022, 14, 333–347. [Google Scholar] [CrossRef]
  9. Bayram, F.; Eleyan, A. COVID-19 detection on chest radiographs using feature fusion based deep learning. Signal Image Video Process. 2022, 16, 1455–1462. [Google Scholar] [CrossRef]
  10. Ismael, A.M.; Sengür, A. Deep learning approaches for COVID19 detection based on chest X-ray images. Expert Syst. Appl. 2021, 164, 114054. [Google Scholar] [CrossRef]
  11. Papageorgiou, E.P.; Boser, B.E.; Anwar, M. Chip-Scale Angle-Selective Imager for In Vivo Microscopic Cancer Detection. IEEE Trans. Biomed. Circuits Syst. 2020, 14, 91–103. [Google Scholar] [CrossRef]
  12. Eleyan, A.; Alboghbaish, E. Multi-Classifier Deep Learning based System for ECG Classification Using Fourier Transform. In Proceedings of the 5th International Conference on Bioengineering for Smart Technologies (BioSMART), Paris, France, 7–9 June 2023; pp. 1–4. [Google Scholar] [CrossRef]
  13. Mironovova, M.; Bíla, J. Fast Fourier transform for feature extraction and neural network for classification of electrocardiogram signals. In Proceedings of the Fourth International Conference on Future Generation Communication Technology (FGCT), Luton, UK, 29–31 July 2015; pp. 1–6. [Google Scholar] [CrossRef]
  14. Sahoo, S.; Kanungo, B.; Behera, S.; Sabut, S. Multiresolution wavelet transform based feature extraction and ECG classification to detect cardiac abnormalities. Measurement 2017, 108, 55–66. [Google Scholar] [CrossRef]
  15. Aravind, S.; Sanjay, M. ECG Classification and Arrhythmia Detection Using Wavelet Transform and Convolutional Neural Network. In Proceedings of the International Conference on Communication, Control and Information Sciences (ICCISc), Idukki, India, 16–18 June 2021; pp. 1–5. [Google Scholar] [CrossRef]
  16. Nahak, S.; Saha, G. A Fusion Based Classification of Normal, Arrhythmia and Congestive Heart Failure in ECG. In Proceedings of the National Conference on Communications (NCC), Kharagpur, India, 21–23 February 2020; pp. 1–6. [Google Scholar] [CrossRef]
  17. Rahuja, N.; Valluru, S.K. A Deep Neural Network Approach to Automatic Multi-Class Classification of Electrocardiogram Signals. In Proceedings of the International Conference on Intelligent Technologies (CONIT), Hubli, India, 25–27 June 2021; pp. 1–4. [Google Scholar] [CrossRef]
  18. Rahuja, N.; Valluru, S.K. A Comparative Analysis of Deep Neural Network Models using Transfer Learning for Electrocardiogram Signal Classification. In Proceedings of the International Conference on Recent Trends on Electronics, Information, Communication & Technology (RTEICT), Bangalore, India, 27–28 August 2021; pp. 285–290. [Google Scholar] [CrossRef]
  19. Ebrahimi, Z.; Loni, M.; Daneshtalab, M.; Gharehbaghi, A. A review on deep learning methods for ECG arrhythmia classification. Expert Syst. Appl. X 2020, 7, 100033. [Google Scholar] [CrossRef]
  20. Ying, Z.; Zhang, G.; Pan, Z.; Chu, C.; Liu, X. FedECG: A federated semi-supervised learning framework for electrocardiogram abnormalities prediction. J. King Saud Univ.—Comput. Inf. Sci. 2023, 35, 101568. [Google Scholar] [CrossRef]
  21. van Engelen, J.E.; Hoos, H.H. A survey on semi-supervised learning. Mach. Learn. 2020, 109, 373–440. [Google Scholar] [CrossRef]
  22. Kachuee, M.; Fazeli, S.; Sarrafzadeh, M. ECG Heartbeat Classification: A Deep Transferable Representation. In Proceedings of the IEEE International Conference on Healthcare Informatics (ICHI), New York, NY, USA, 4–7 June 2018; pp. 443–444. [Google Scholar] [CrossRef]
  23. Safdar, M.F.; Pałka, P.; Nowak, R.M.; AlFaresi, A. A novel data augmentation approach for enhancement of ECG signal classification. Biomed. Signal Process. Control 2023, 86, 105114. [Google Scholar] [CrossRef]
  24. Chen, C.; Hua, Z.; Zhang, R.; Liu, G.; Wen, W. Automated arrhythmia classification based on a combination network of CNN and LSTM. Biomed. Signal Process. Control 2020, 57, 101819. [Google Scholar] [CrossRef]
  25. Zhang, J.; Liu, A.; Gao, M.; Chen, X.; Zhang, X.; Chen, X. ECG-based multi-class arrhythmia detection using spatio-temporal attention-based convolutional recurrent neural network. Artif. Intell. Med. 2020, 106, 101856. [Google Scholar] [CrossRef]
  26. Arhin, J.R.; Zhang, X.; Coker, K.; Agyemang, I.O.; Attipoe, W.K.; Sam, F.; Adjei-Mensah, I.; Agyei, E. ADCGNet: Attention-based dual channel Gabor network towards efficient detection and classification of electrocardiogram images. J. King Saud Univ.—Comput. Inf. Sci. 2023, 35, 101763. [Google Scholar] [CrossRef]
  27. Cheng, J.; Zou, Q.; Zhao, Y. ECG signal classification based on deep CNN and BiLSTM. BMC Med. Inform. Decis. Mak. 2021, 21, 365. [Google Scholar] [CrossRef]
  28. Madan, P.; Singh, V.; Singh, D.P.; Diwakar, M.; Pant, B.; Kishor, A. A Hybrid Deep Learning Approach for ECG-Based Arrhythmia Classification. Bioengineering 2022, 9, 152. [Google Scholar] [CrossRef]
  29. Khan, S.D.; Alarabi, L.; Basalamah, S. Toward Smart Lockdown: A Novel Approach for COVID-19 Hotspots Prediction Using a Deep Hybrid Neural Network. Computers 2020, 9, 99. [Google Scholar] [CrossRef]
  30. Nassif, A.B.; Shahin, I.; Bader, M.; Hassan, A.; Werghi, N. COVID-19 Detection Systems Using Deep-Learning Algorithms Based on Speech and Image Data. Mathematics 2022, 10, 564. [Google Scholar] [CrossRef]
  31. Zhu, C.; Sun, Y.; Pan, C. Speech Enhancement with Fractional Fourier Transform. In Proceedings of the International Symposium on Communications and Information Technologies (ISCIT), Xi’an, China, 27–30 September 2022; pp. 296–302. [Google Scholar] [CrossRef]
  32. Shutko, V.; Tereshchenko, L.; Shutko, M.; Silantieva, I.; Kolganova, O. Application of Spline-Fourier Transform for Radar Signal Processing. In Proceedings of the IEEE 15th International Conference on the Experience of Designing and Application of CAD Systems (CADSM), Polyana, Ukraine, 26 February–2 March 2019; pp. 1–4. [Google Scholar] [CrossRef]
  33. Wang, B.; Chen, G.; Rong, L.; Liu, Y.; Yu, A.; He, X.; Wen, T.; Zhang, Y.; Hu, B. Arrhythmia Disease Diagnosis Based on ECG Time–Frequency Domain Fusion and Convolutional Neural Network. IEEE J. Transl. Eng. Health Med. 2023, 11, 116–125. [Google Scholar] [CrossRef]
  34. Thalluri, L.N.; Koripalli, H.; Nukala, P.K.N.; Mandava, V.N.S.R.; Gudapati, G.; Yaswanth, V.V.N. ECG Signal Classification using Deep Neural Networks with Ensemble Techniques. In Proceedings of the 7th International Conference on Communication and Electronics Systems (ICCES), Coimbatore, India, 22–24 June 2022; pp. 273–280. [Google Scholar] [CrossRef]
  35. Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
  36. Vyas, P.; Liu, J.; El-Gayar, O. Fake New Detection on the Web: An LSTM-based Approach. In Proceedings of the AMCIS 2021 Proceedings, Virtual, 9–13 August 2021; p. 5. [Google Scholar]
  37. Yang, S.; Zhang, Y.; Cho, S.-Y.; Correia, R.; Morgan, S.P. Non-invasive cuff-less blood pressure estimation using a hybrid deep learning model. Opt. Quantum Electron. 2021, 53, 1–20. [Google Scholar] [CrossRef]
  38. Ji, X.; Dong, Z.; Han, Y.; Lai, C.S.; Zhou, G.; Qi, D. EMSN: An Energy-Efficient Memristive Sequencer Network for Human Emotion Classification in Mental Health Monitoring. IEEE Trans. Consum. Electron. 2023. [Google Scholar] [CrossRef]
  39. Turk, M.; Pentland, A. Eigenfaces for Recognition. J. Cogn. Neurosci. 1991, 3, 71–86. [Google Scholar] [CrossRef] [PubMed]
  40. Eleyan, A.; Demirel, H. Face Recognition System Based on PCA and Feedforward Neural Networks. In Computational Intelligence and Bioinspired Systems; IWANN. Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3512. [Google Scholar] [CrossRef]
  41. Bartlett, M.S.; Movellan, J.R.; Sejnowski, T.J. Face recognition by independent component analysis. IEEE Trans. Neural Netw. 2002, 13, 1450–1464. [Google Scholar] [CrossRef] [PubMed]
  42. Huang, G.; Hu, Z.; Zhang, L.; Li, L.; Liang, Z.; Zhang, Z. Removal of eye-blinking artifacts by ICA in cross-modal long-term EEG recording. In Proceedings of the 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Montreal, QC, Canada, 20–24 July 2020; pp. 217–220. [Google Scholar] [CrossRef]
  43. Bhattacharyya, S.; Majumder, S.; Debnath, P.; Chanda, M. Arrhythmic Heartbeat Classification Using Ensemble of Random Forest and Support Vector Machine Algorithm. IEEE Trans. Artif. Intell. 2021, 2, 260–268. [Google Scholar] [CrossRef]
  44. Zou, C.; Muller, A.; Wolfgang, U.; Ruckert, D.; Muller, P.; Becker, M.; Steger, A.; Martens, E. Heartbeat Classification by Random Forest with a Novel Context Feature: A Segment Label. IEEE J. Transl. Eng. Health Med. 2022, 10, 1–8. [Google Scholar] [CrossRef] [PubMed]
  45. Chumachenko, D.; Butkevych, M.; Lode, D.; Frohme, M.; Schmailzl, K.J.G.; Nechyporenko, A. Machine Learning Methods in Predicting Patients with Suspected Myocardial Infarction Based on Short-Time HRV Data. Sensors 2022, 22, 7033. [Google Scholar] [CrossRef] [PubMed]
  46. Yakut, Ö.; Bolat, E.; Hatice, E.F.E. K-Means Clustering Algorithm Based Arrhythmic Heartbeat Detection in ECG Signal. Balk. J. Electr. Comput. Eng. 2021, 9, 53–58. [Google Scholar] [CrossRef]
  47. Rahman Khan, M.M.; Bakr Siddique, M.A.; Sakib, S.; Aziz, A.; Tanzeem, A.K.; Hossain, Z. Electrocardiogram Heartbeat Classification Using Convolutional Neural Networks for the Detection of Cardiac Arrhythmia. In Proceedings of the 2020 Fourth International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), Palladam, India, 7–9 October 2020; pp. 915–920. [Google Scholar]
  48. Wang, T.; Lu, C.; Ju, W.; Liu, C. Imbalanced heartbeat classification using Easy Ensemble technique and global heartbeat information. Biomed. Signal Process. Control 2022, 71, 103–105. [Google Scholar] [CrossRef]
  49. Kumari, C.U.; Ankita, R.; Pavani, T.; Vignesh, N.A.; Varma, N.T.; Manzar, M.A.; Reethika, A. Heart Rhythm Abnormality Detection and Classification using Machine Learning Technique. In Proceedings of the 4th International Conference on Trends in Electronics and Informatics (ICOEI) (48184), Tirunelveli, India, 15–17 June 2020; pp. 580–584. [Google Scholar] [CrossRef]
  50. Phillips, P.; Hahn, C.; Fontana, P.; Yates, A.; Greene, K.; Broniatowski, D.; Przybocki, M. Four Principles of Explainable Artificial Intelligence; National Institute of Standards and Technology (NIST) Report; NIST: Gaithersburg, MD, USA, 2021. [CrossRef]
  51. Adamczyk, M.; Malatras, A.; Agrafiotis, I. Cybersecurity and Privacy in AI—Medical Imaging Diagnosis; European Union Agency for Cybersecurity (ENISA) Report; ENISA: Athens, Greece, 2023. [Google Scholar]
Figure 1. The used databases with corresponding classes.
Figure 1. The used databases with corresponding classes.
Computers 13 00055 g001
Figure 2. Part of the original ECG signal (top) vs. example of the segmented ECG signal (bottom).
Figure 2. Part of the original ECG signal (top) vs. example of the segmented ECG signal (bottom).
Computers 13 00055 g002
Figure 3. The characteristics of a normal heartbeat.
Figure 3. The characteristics of a normal heartbeat.
Computers 13 00055 g003
Figure 4. The architecture of the proposed approach.
Figure 4. The architecture of the proposed approach.
Computers 13 00055 g004
Figure 5. The architecture of long short-term memory (LSTM) network.
Figure 5. The architecture of long short-term memory (LSTM) network.
Computers 13 00055 g005
Figure 6. Model’s accuracy and loss for the training and validation processes.
Figure 6. Model’s accuracy and loss for the training and validation processes.
Computers 13 00055 g006
Figure 7. Examples of the 5 classes (4 arrhythmias and normal ECG signals) used in the first scenario’s experiments.
Figure 7. Examples of the 5 classes (4 arrhythmias and normal ECG signals) used in the first scenario’s experiments.
Computers 13 00055 g007
Figure 8. Examples of the 3 classes (arrythmia (top), congestive heart failure (middle), and normal (bottom) ECG signals) used in the second scenario’s experiments.
Figure 8. Examples of the 3 classes (arrythmia (top), congestive heart failure (middle), and normal (bottom) ECG signals) used in the second scenario’s experiments.
Computers 13 00055 g008
Table 1. Different approaches performance results compared to the proposed approach for the first scenario.
Table 1. Different approaches performance results compared to the proposed approach for the first scenario.
Proposed ApproachAccuracyPrecisionRecallF1-Score
RFSb (ResNet) [44]96.696.696.696.6
RFSc (CNN) [44]96.896.796.796.7
CNN [47]95.295.295.495.3
ADA-Boost [48]95.666.280.166.2
PCA-ICA+RF96.996.896.896.8
FFT+CNN97.397.297.397.2
FFT+CNN–LSTM97.497.397.497.3
Table 2. Confusion matrix result for the proposed FFT+CNN–LSTM approach for the first scenario.
Table 2. Confusion matrix result for the proposed FFT+CNN–LSTM approach for the first scenario.
Actual
NSVFQ
PredictedN17,99631631018
S1883521501
V9721334105
F370201050
Q2602001532
Table 3. Comparison between different approaches for the second scenario.
Table 3. Comparison between different approaches for the second scenario.
Approach# Used
Recordings
(ARR/CHF/NSR)
Feature
Vector Length
Train/TestAccuracyPrecisionRecallF1-Score
Fusion+SVM [16] 30/30/30- - 93.33 - -
Fusion+RF [16] 30/30/30--92.75--
CWT+SVM [49] 96/30/36 190 70/30 95.92 96.11 92.59 93.82
CWT+AlexNet [17] 96/30/36 500 80/20 97.3 97.3 96.6 96.9
CWT+SqueezeNet [18] 30/30/30 500 80/20 97.22 97.3 97.2 97.3
CWT+GoogLeNet [18] 30/30/30 500 80/20 97.78 97.8 97.7 97.7
CWT+AlexNet [18] 30/30/30 500 80/20 97.8 97.7 97.8 97.7
CWT+CNN–LSTM [28]30/30/3050075/2598.9%98%98%97.3%
FFT+CNN–LSTM 30/30/30 500 80/20 99.299.299.299.2
Table 4. Confusion matrix results for the proposed FFT+CNN–LSTM approach for the second scenario.
Table 4. Confusion matrix results for the proposed FFT+CNN–LSTM approach for the second scenario.
Actual
ARRCHFNSR
PredictedARR76134
CHF07691
NSR64810
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Eleyan, A.; Alboghbaish, E. Electrocardiogram Signals Classification Using Deep-Learning-Based Incorporated Convolutional Neural Network and Long Short-Term Memory Framework. Computers 2024, 13, 55. https://doi.org/10.3390/computers13020055

AMA Style

Eleyan A, Alboghbaish E. Electrocardiogram Signals Classification Using Deep-Learning-Based Incorporated Convolutional Neural Network and Long Short-Term Memory Framework. Computers. 2024; 13(2):55. https://doi.org/10.3390/computers13020055

Chicago/Turabian Style

Eleyan, Alaa, and Ebrahim Alboghbaish. 2024. "Electrocardiogram Signals Classification Using Deep-Learning-Based Incorporated Convolutional Neural Network and Long Short-Term Memory Framework" Computers 13, no. 2: 55. https://doi.org/10.3390/computers13020055

APA Style

Eleyan, A., & Alboghbaish, E. (2024). Electrocardiogram Signals Classification Using Deep-Learning-Based Incorporated Convolutional Neural Network and Long Short-Term Memory Framework. Computers, 13(2), 55. https://doi.org/10.3390/computers13020055

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