Professional Documents
Culture Documents
TS Final
TS Final
A
Technical Seminar
Report On
Dr. Prakruthi M K
Associate Professor
SJBIT
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
SJB INSTITUTE OF TECHNOLOGY
No.67, BGS Health & Education City, Dr.Vishnuvardhan Rd, Kengeri, Bengaluru, Karnataka
560060 Approved by AICTE - New Delhi, Accredited by NAAC A+, Accredited by NBA
2023 - 2024
|| Jai Sri Gurudev ||
Sri Adichunchanagiri Shikshana Trust ®
SJB INSTITUTE OF TECHNOLOGY
No.67, BGS Health & Education City, Dr.Vishnuvardhan Rd, Kengeri, Bengaluru, Karnataka
560060 Approved by AICTE - New Delhi, Accredited by NAAC A+, Accredited by NBA
CERTIFICATE
Certified that the Seminar report entitled “Multitier Machine Learning Approaches for
Enhanced Arrhythmia Detection and Cardiovascular Disease Diagnosis in ECG Images”
carried out by SHUBHAM ARORA [1JB20CS120] bonafide student of SJB Institute of
Technology in partial fulfilment for the award of “BACHELOR OF ENGINEERING” in
Computer Science and Engineering prescribed by VISVESVARAYA TECHNOLOGICAL
UNIVERSITY, BELAGAVI during the academic year 2023-24. It is certified that all
corrections/suggestions indicated for Internal Assessment has been incorporated in the report deposited in
the departmental library. This report has been approved as it satisfies the academic requirements in respect
of the Technical Seminar prescribed for the said degree.
Signature of Guide
Dr. Prakruthi M K Signature of HOD
Associate Professor Dr. Krishna AN
Dept. of CSE Professor and Head
Dept. of CSE
ACKNOWLEDGEMENT
I would like to express our profound grateful to His Divine Soul Jagadguru Padmabhushan Sri
Sri Sri Dr. Balagangadharanatha Mahaswamiji and His Holiness Jagadguru Sri Sri Sri Dr.
Nirmalanandanatha Mahaswamiji for providing us an opportunity to complete our academics
in this esteemed institution.
I would also like to express our profound thanks to Revered Sri Sri Dr. Prakashnath Swamiji,
Managing Director, SJB Institute of Technology, for his continuous support in providing
amenities to carry out this Technical Seminar in this admired institution.
I express our gratitude to Dr. K. V. Mahendra Prashanth, Principal, SJB Institute of Technology,
for providing us an excellent facilities and academic ambience; which have helped us in
satisfactory completion of Technical Seminar.
I extend our sincere thanks to Dr. Krishan A N, Head of the Department, Computer Science and
Engineering for providing us an invaluable support throughout the period of Technical Seminar
work.
I wish to express our heartfelt gratitude to our guide Dr. Prakruthi M K, Associate Professor
for her valuable guidance, suggestions and cheerful encouragement during the entire period of
Technical Seminar.
Finally, I take this opportunity to extend our earnest gratitude and respect to our parents,
Teaching & Non teaching staffs of the department, the library staff and all my friends, who have
directly or indirectly supported me during the period of Technical Seminar.
Regards,
Shubham Arora
1JB20CS120
ABSTRACT
The study endeavors to revolutionize the field of cardiovascular disease (CVD) detection and
prediction by harnessing the power of machine learning (ML) and artificial intelligence (AI)
techniques. Recognizing the pressing need for accurate and timely identification of CVD, the
research explores a multifaceted approach encompassing feature selection, ensemble methods,
and deep learning methodologies. By leveraging these advanced techniques, the study aims to
enhance predictive models and diagnostic accuracy, thereby significantly impacting patient
outcomes and mortality rates associated with CVD. Specifically, the investigation delves into the
effectiveness of various feature selection methods in identifying informative features crucial for
CVD prediction. Additionally, novel ensemble methods are developed to enhance diagnostic
precision and confidence in predicting heart disease. Moreover, the research pioneers the use of
convolutional neural networks (CNNs) for the classification of electrocardiogram (ECG) images,
enabling early detection of CVD. Overall, the study represents a comprehensive effort to harness
the potential of ML and AI in transforming cardiovascular healthcare and improving patient care
outcomes.
List of Figures
Figure No Figure Name Page No.
1. Introduction 1
2. Literature Survey 6
3. Proposed Methodology 8
3.1 Method 1 8
3.2 Method 2 12
4. Results and Discussions 17
5. Conclusion 22
Multitier Machine Learning Approaches for Enhanced Arrhythmia Detection and
Cardiovascular Disease Diagnosis in ECG Images
CHAPTER 1
INTRODUCTION
One of the most serious problems in the world today is public health. The World Health
Organization (WHO) claims that the pursuit of health is a basic human right. Sev eral epidemic
diseases are currently posing a threat to the world’s population, causing a fatal outcome.
Consequently, chronic illnesses (CDs) impact a sizable percentage of the population and account
for a considerable share of overall mortality. CDs are not only incurable but also have a far
longer half-life in the body than diseases including cancer, diabetes, stroke, Parkinson’s disease,
and cardiovascular The associate editor coordinating the review of this manuscript and approving
it for publication was Md. Kafiul Islam . disease (CVD). Unhealthy eating habits, smoking
cigarettes, drinking too much alcohol, and living in general are major contributors to these
disorders. Half of all Americans suffer from at least one chronic health condition, and more than
80% of the population has financial concerns related to healthcare [1]. Improved lifestyle choices
have a direct impact on reducing the prevalence of chronic diseases. Among nations, the United
States (US) bears the greatest burden of chronic dis eases. The US allocates approximately $2.70
trillion each year for the treatment of these diseases, which constitutes 18.0% of the nation’s
gross domestic product. In particular, cardiovascular disease (CVD) stands out as the primary
cause of death in the Americas [2]. This work is licensed under a Creative Commons Attribution-
NonCommercial- 4.0 License. In a comparable way, other nations around the world are dealing
with the issues associated with CVD. According to studies that were just recently made public,
chronic diseases are responsible for 86.5% of deaths in
Dept. of CSE, SJBIT 2023-2024 Page 1
Multitier Machine Learning Approaches for Enhanced Arrhythmia Detection and
Cardiovascular Disease Diagnosis in ECG Images
China [3]. Cardiovascular diseases (CVD) have emerged as a major global cause of mortality,
claiming a substantial number of lives annually. The underlying pathology of cardiac diseases is
the inability of the heart to effectively circulate an adequate amount of blood to various organs.
This condition poses a significant threat to life and is recognized as one of the most lethal and
life-threatening chronic diseases worldwide. By affecting the heart or blood vessels, CVD
disrupts the normal supply of blood, impairing the proper functioning of essential body organs
[4]. Cardiovascular disease (CVD) is a leading cause of mor tality worldwide, affecting both
developed and developing nations. According to the World Health Organization (WHO), in
2022, CVD claimed the lives of approximately 19.1 mil lion people, accounting for 33% of
global fatalities. In the United States alone, CVD causes the death of around 647,000 individuals
each year. Similarly, in Pakistan, CVD claims the lives of approximately 200,000 people
annually, with mor tality rates on the rise. The European Society of Cardiology (ESC) estimates
that 26.5 million Europeans are currently living with CVD, and each year, 3.8 million new cases
are diagnosed. Shockingly, 50% to 55% of CVD patients do not survive beyond a year, placing a
significant bur den on healthcare systems. Moreover, approximately 4% of healthcare spending
is allocated to the treatment of CVD patients [5]. The symptoms associated with CVD
encompass physi cal fragility, shortness of breath, inflammation in the feet, lethargy, and other
related manifestations [6]. Cardiovascular disease (CVD) is a significant global health issue that
can be attributed to various risk fac tors including hypertension, high cholesterol levels,
smok ing, sedentary lifestyle, and obesity. CVD encompasses a range of conditions such as
congenital heart disease, congestive heart failure, and cardiac arrhythmias. Tradi tional
approaches to predicting and diagnosing CVD were complex and often led to complications that
impacted individuals’ overall well-being. This disease remains the leading cause of mortality in
both developed and developing countries, necessitating effective preventive and diagnostic
measures [7]. In developing countries, clinicians face challenges in accu rately diagnosing and
treating cardiovascular disease (CVD) due to limited resources. Computer technology and
machine learning have been introduced as aids in clinical decision making, enabling early
detection and assessment of CVD risk. Medical data mining technologies can extract useful
information from the massive amounts of data in healthcare, which is vital due to the complexity
of medical data. Our technology for CVD prediction could potentially save mil lions of lives by
enabling more people to receive treatment faster [8].
There is great potential to benefit from advances in artificial intelligence in healthcare to reduce
medical errors. In particular, the use of machine learning and deep learning techniques for
automatic prediction of heart diseases [3], [6]–[10]. The machine learning methods require an
expert entity for features extraction and selection to identify the appropriate features before
apply ing the classification phase. Feature extraction is a process of reducing the number of
features in a data set by transforming or projecting the data into a new lower-dimensional feature
space preserving the relevant information of the input data.
The concept of feature extraction is concerned with creating a new set of features (different from
the input feature) that are a combination of original features into a lower-dimensional space that
extract most, if not all, of the information in input data. The most well-known feature extraction
method is a principal component analysis [13], [14]. However, feature selection is a process of
removing irrelevant and redundant features from the data set in the training process of machine
learning algorithms. Various methods can be used for feature selection, classified as
unsupervised, which refers to the method that does not need the output label for feature selection,
and supervised, which refers to the methods that use output label for feature selection. Under
supervised feature selection, there are three methods: the filter method, the wrapper method, and
the embedded method.
Artificial intelligence plays an important role in improving the quality of life. In particular, early
detection of diseases can help save lives. In this work, the proposed new lightweight CNN
architecture has improved the accuracy rate of cardiovascular disease classification to 98.23%
compared with the existing state-of-the-art methods, using the dataset of ECG images of cardiac
patients, and can be performed on a single CPU, overcoming the limitation of computational
power. In addition, the classification accuracy has significantly improved after applying the
proposed method as a feature extraction tool for traditional machine learning algorithms. For
example, an accuracy of 99.79% has been achieved using the Naïve Bayes algorithm. Thus, this
method could be integrated into the IoT ecosystem in healthcare. This will encourage other AI
researchers to explore other methods for cardiovascular disease detection.
Deep learning, which is a subfield of machine learning, automatically extracts important features and
patterns from the training datasets for the classification phase without the intervention of separate entities
for features ex traction and selection. Fig. 1 illustrates the abstract concept of machine learning and deep
learning. In deep learning, a model is created by constructing multiple hidden layers of NNs.
Convolutional neural network (CNN) is a deep learning method, which has achieved satisfactory results
on image classification tasks. The power of deep learningand pretrained networks can be used for feature
extraction without having to retrain the whole network, transfer learning, and classification [19]. In this
article, the pretrained networks Machine learning and deep learning are both subsets of artificial
intelligence (AI) that aim to enable computers to learn from data and make predictions or
decisions. However, they differ in their approach, complexity, and the types of problems they are
best suited for.
On the other hand, deep learning is a specialized field within machine learning that focuses on
using deep neural networks to automatically learn hierarchical representations of data.
While machine learning algorithms can achieve impressive results in various domains, their
performance may plateau when faced with extremely large or complex datasets, or when
dealing with high-dimensional data such as images or text.
Deep learning models, composed of multiple layers of interconnected nodes (neurons), can
automatically extract features from raw data, eliminating the need for manual feature
engineering. This ability to learn intricate patterns and representations makes deep learning
particularly effective for tasks such as image recognition, natural language processing, and speech
recognition. Deep learning has achieved ground-breaking results in recent years, outperforming
traditional machine learning approaches in many domains, especially those with large amounts of
data and complex patterns.
While machine learning offers a diverse set of techniques for learning from data, deep learning,
with its focus on deep neural networks and automated feature learning, represents a powerful
subset of machine learning that has revolutionized various fields with its ability to handle large-
scale, complex problems and extract meaningful insights from vast amounts of data.
Chapter 2
LITERATURE SURVEY
Gist: This paper focuses on the machine learning-based architecture for early detection of
cardiovascular disease (CVD) using optimal feature selection techniques. It utilizes data
collection, storage, and processing components, along with machine learning classifiers trained on
selected features extracted from ECG signals. The performance of the proposed model may be
limited by its reliance on a single dataset, raising concerns about its generalizability to different
populations or data distribution.
2. Title: "Detection of Cardiovascular Diseases in ECG Images Using Machine Learning and
Deep Learning Methods"
Author: Bilal Babayi˘git
Gist: This paper explores the use of machine learning methods for predicting cardiovascular
diseases, specifically focusing on the analysis of ECG images. The study compares several
machine learning and deep learning methods for detecting cardiovascular diseases, highlighting
the significance of leveraging advanced computational techniques for early disease detection and
diagnosis. The author emphasizes the potential of ECG image analysis in improving the accuracy
and efficiency of cardiovascular disease prediction.
Gist: This review paper provides an extensive overview of deep learning approaches for
diagnosing cardiovascular diseases. It covers various deep learning architectures, including
convolutional neural networks (CNNs), recurrent neural networks (RNNs), and hybrid models,
and their applications in analyzing medical imaging data, electrocardiograms (ECGs), and
patient records. The paper discusses the challenges and opportunities associated with using deep
learning in cardiovascular disease diagnosis, such as data scarcity, interpretability of results, and
model generalization. Additionally, it highlights recent advancements, promising trends, and
future directions in this rapidly evolving field.
5. Title: "Feature Selection and Machine Learning Techniques for Cardiovascular Risk
Prediction: A Review"
Gist: This review paper investigates the application of feature selection and machine learning
techniques for predicting cardiovascular risk. It examines various feature selection methods,
including filter, wrapper, and embedded approaches, and their impact on the performance and
interpretability of predictive models. Moreover, the paper discusses different machine learning
algorithms employed in cardiovascular risk prediction, such as logistic regression, support
vector machines (SVMs), decision trees, and ensemble methods. It synthesizes findings from
existing studies, identifies common challenges, and proposes recommendations for improving
the accuracy and reliability of cardiovascular risk prediction models in clinical practice.
Many research works have been conducted for automatically predicting cardiovascular diseases using
machine learning and deep learning methods by utilizing ECG as digital or images data representation.
Bharti et al. compared machine learning and deep learning methods on the UCI heart disease dataset to
predict two classes. The deep learning method achieved the highest accuracy rate of 94.2%. In their
architecture of deep learning model, they used three fully connected layers: the first layer consists of
128 neurons followed by a dropout layer with 0.2 rate, the second layer consists of 64 neurons followed
by a dropout layer with 0.1 rate, and the third layer consists of 32 neurons.
The machine learning methods with features selection and outliers’ detection achieved accuracy rates
as: RF is 80.3%, LR is 83.31%, K-NN is 84.86%, SVM is 83.29%, DT is 82.33%, and XGBoost is
71.4%. The research in concluded that deep learning has proven to be a more accurate and effective
technology for a variety of medical problems such as prediction. Deep learning methods will replace the
traditional machine learning based on feature engineering. Kiranyaz et al. proposed a CNN that
consisted of three layers of an adaptive implementation of one-dimensional (1-D) convolution layers.
This network wastrained on the MIT-BIHarrhythmia dataset to classify long ECG data stream. They
achieved accuracy rates of 99% and 97.6% in classifying ventricular ectopic beats and supraventricular
ectopic beats, respectively. Also, the work in [3 proposed a CNN that consisted of three1-D convolution
layers,three max-pooling layers, one fully connected layer, and one softmax layer. The filter size for the
first and second convolutional layers was set to 5 andastride of 2 was used for the first two max-pooling
layers.They achieved an accuracy rate of 92.7% in classifying ECG heartbeats using the MIT-BIH
arrhythmia dataset.
Khan et al. applied transfer learning approach using the pretrained single shot detector (SSD)-
MobileNet-v2 to detect cardiovascular diseases from the ECG images dataset of cardiac patients by
predicting the four major heart abnormalities:abnormalheartbeat(AH),MI,historyofMI(H.MI),andnormal
person (NP) classes. As preprocessing steps, the data size was adjusted and the 12 leads of each
ECGimagewerelabeled.SSD is used to classify and localize the objects inone step.The dataset was split
80% for training and 20% fortesting.They used a batch size of 24, 200K training iterations for the
training step, and a learning rate of 0.0002 to train their model. Their training phase lasted almost 4
days. They achieved a high precision rate for the MI class, i.e., 98.3%. Rahman et al. [33] provided a
deep CNN transfer learning approach to predict COVID-19 and four major cardiac abnormalities using
ECG images. The dataset containedfive classes: COVID-19, AH, MI, H. MI, and NP classes.
Six different pretrained deep CNN models, i.e., ResNet18,ResNet50, ResNet101, DenseNet201 ,
Inception-V3 ,and MobileNet-v2, were used for classification. Gamma correction, image resizing, and
z-score normalization were used as preprocessing steps for the ECG images. As a result, for two-class
classification (COVID-19 andnormal)andthree-class classification (COVID-19, normal,andother cardiac
abnormalities), Dense Net 201 outperformed the other networks with accuracy rates of 99.1% and
97.36%, respectively. For the five-class classification, Inception-V3 outperformed the other networks
with an accuracy rate of 97.83%.
Chapter 3
PROPOSED METHODOLOGY
3.1 METHOD 1
The accuracy of classification metrics is heavily dependent on the quality of the dataset used for
statistical predictions. For our research, we have picked the following datasets to both highlight
the significance of the dataset and to assess its generalizability. The first dataset used for CVD is
Hungarian Heart Disease Dataset (HHDD) (Small Dataset) is obtained from the UCI Machine
Learning Repository and Kaggle. It is an older and standard dataset developed in 1988. It
comprises mul tiple databases, including those from Cleveland, Hungary, Switzerland, and
Long Beach V. The dataset consists of 14 attributes and a total of 1025 instances. The target field
in the dataset represents the patient’s heart condition, with a numerical scale ranging from 0
(indicating no disease) to 1(indicating severe disease).
Despite excelling in suppressing classification errors, in the face of big data of ECG records, the
reported ML methods might be less effective.
1) Unlike the focus of most of the highlighted on designing preprocessing of ECG signals, feature
extraction, feature selection, and classification protocols, this work proposes a DNN model
optimized using genetic algorithm (GA) to aggregate the best combination of feature extraction and
classification.
2) As widely established, data inadequacy is crucial for the learnability of machine and deep
learning models (DLMs) .Unlike the reported use of average-sized data sets in which manifests in
their validation on big data sets, the proposed study exhibits the same performance on both small
and big data sets.
3) Although with its own merits, some of the highlighted methods employed multiple ECG
recordings, which increases the complexity of the respective methods .To overcome this, the
proposed employs only one lead ECG.
4) Unlike where classification was confined to one or two types of arrhythmia, our proposed model
is employed to classify five arrhythmia categories.
Integrating LSTM-based features with a k-nearest neighbor (k-NN) classifier to improve the
classification efficacy;
Design of a new DNN method based on the cross validation combined with GA for
optimization of features and parameters.
Different widely used machine learning algorithms are used in this study for the classification of
CVD including Gradient Boosting, Logistic regression, extra tree etc. These classifiers have
shown high performance in the detection of heart diseases.
Transforms feature map from LFL unit into a global vector for classification.
Utilizes LSTM, a type of recurrent neural network (RNN), to characterize properties of the
global vector.
3) Classification Unit:
Classifies ECG recordings based on global feature vector extracted from preceding units.
Consists of two fully connected (dense) layers followed by ReLU and SoftMax activation
layers.
2) SVM Classifier:
The SVM is another type of supervised learning algorithm that is employed for regression and
classification problems by finding a hyperplane that splits the features into diverse domains [28].
When employed in classification tasks, the SVM is called support vector classification (SVC).
Similarly, when SVM is used in regression problems, the SVM is called support vector regression
(SVR). Irrespective of where it is used, SVM can be broadly classified into two main types: linear
SVM (L-SVM) for two-class problems and non-L-SVM (N-SVM) for multiclass problems. This
study is built on the N-SVM, where the classification is accomplished via a kernel function to map
the data into a different space with a hyperplane. A Kernel function can be chosen from the
different types available, such as linear, polynomial, and radial basis function (RBF).
4) MLP Classifier:
Multilayer perceptron (MLP) is a class of feed-forward artificial neural networks that consist of
three layers, the input layer, a hidden layer, and an output layer. Except for the input nodes, each
node is a neuron that uses a nonlinear activation function (e.g., sigmoid function). In this study, an
MLP classifier with one hidden layer and five output nodes is used for arrhythmia detection used.
Layers in the network are completely connected to each other and trained in a way that each input
vector results in an output vector with one nonzero element corresponding to the estimated class
label. For training, the Levenberg–Marquardt backpropagation algorithm is used.
3.2 METHOD 2
Figure 3.3 Schematic Representation of the proposed CNN model for ECG images ofcardiac
patients’ classification
Deep learning represents a cutting-edge approach for extracting complex patterns and features
from large-scale biomedical datasets, including electrocardiogram (ECG) images, for
cardiovascular disease prediction. In this phase of the methodology, a novel convolutional neural
network (CNN) architecture is developed specifically for the classification of ECG images,
enabling early detection of cardiovascular diseases.
Convolutional Neural Networks (CNN) In deep learning, a CNN is a type of deep artificial NN
specifically designed for image classification and processing [40]. The neurons in CNNs are
arranged in three dimensions: height, width, and depth (channel). For example, an input image is
227 × 227 × 3, which means that the width and height of the input image are 227 and the depth
(channel) is 3. The main task of CNNs is to extract important features from the input images.
The two main components of CNNs are convolutional layers and pooling layers. The higher
layers in CNNs can be fully connected layers and the last layer is a sigmoid or softmax activation
func tion layer to get the predicted output. The convolution process is performed with
convolutional layers on the input data using a filter or kernel to create a feature map representing
the detected features of the input. Convolution is performed by sliding the filter over the input.
At each position, matrix multiplication is performed and the result is summed onto the feature
map. Fig. 2 shows a simple example of a convolution process for an input with a depth of 1
Figure 3.2 shows the CNN model comprises multiple layers, including convolutional, max-
pooling, fully connected, leaky ReLU, batch normalization, and dropout layers, organized in a
hierarchical fashion to capture hierarchical features and spatial dependencies inherent in ECG
images. By leveraging the hierarchical representations learned by the CNN model, the goal is to
accurately classify ECG images into different disease categories, such as arrhythmias,
myocardial infarction, and heart failure, thereby facilitating early diagnosis and intervention.
Figure 3.4. Sample from the ECG images dataset. (a) NP. (b) AH. (c) MI. (d) HMI.
First, the input images are preprocessed by cropping, resizing, and augmenting them. Then, the
preprocessed images are stored in the image datastore. The proposed model is trained with the
above-mentioned training parameters using the ECG images stored in the image datastore. The
model learns the features and adjusts its learnable parameters accordingly. After training, the
model is ready to test ECG images for classifying cardiac abnormalities as one of the four
classes: NP, AH, MI, and H. MI.
The first layer in the full branch of our proposed CNN model is a fully connected layer, hence its
name. In our model, the fully connected layer contains 16 neurons. Each neuron in a fully
connected layer is connected to each neuron in the previous layer. This is in contrast to a neuron in
a convolutional layer, which is connected to some neurons in the previous layer defined by the
size of the convolutional filter. Although most of the parameters in the CNN come from the fully
connected layers, the number of calculations in the convolutional layer requires much more
memory. A batch normalization layer, and a dropout layer, which helps to reduce overfitting and
emphasize the generalization capability of the model. As can be seen in Fig. 3.4, the two
convolutional layers, named conv04 and conv05, are located at the same level after the block of
the fully connected layer to help extract broader features.
Convolution, max-pooling, depth concatenation, spatial pyramid pooling (SPP), and fully
connected layers are fundamental components of convolutional neural networks (CNNs), a class of
deep learning models commonly used for tasks like image recognition and object detection.
Finally, fully connected layers integrate high-level features extracted by earlier layers andperform
classification or regression tasks by learning complex relationships between features and target
labels.
The CNN model provides predictive outputs that categorize individuals into four distinct
categories based on their electrocardiogram (ECG) readings:
Normal Person: This category encompasses individuals whose ECG readings display no
significant abnormalities or irregularities. The model identifies ECG patterns within
normal ranges, indicating a healthy cardiac function and no evidence of cardiovascular
disease.
Abnormal Heartbeat: Individuals classified under this category exhibit irregularities in
their ECG signals that deviate from typical patterns but do not necessarily indicate a
specific diagnosis, such as myocardial infarction. These abnormalities may include
arrhythmias, conduction disorders, or other cardiac rhythm disturbances.
Myocardial Infarction (MI): Individuals categorized under this class exhibit ECG
patterns indicative of myocardial infarction, commonly known as a heart attack. The
model identifies specific abnormalities in the ECG signal associated with ischemic heart
disease, such as ST-segment elevation or depression and pathological Q waves.
History of Myocardial Infarction: This category identifies individuals who have a
documented history of myocardial infarction based on their ECG patterns. The model
recognizes specific abnormalities consistent with prior cardiac events, providing valuable
information for risk stratification and ongoing management of cardiovascular health.
Chapter 4
Figure 4.1. Samples of normal and abnormal classes from the MIT-BIH dataset
Performance Metrics:
• Evaluation metrics include Accuracy (Acc), Sensitivity (SEN), Positive Predictivity (PPV),
Specificity (SPE), and F1-score.
• F1-score is used for classification evaluation
• Other metrics defined include PPV, SEN, SPE, and Acc,
Preprocessing and Implementation Details:
• ECG recordings in the dataset have varying lengths, requiring preprocessing to standardize
length for DNN training.
• Preprocessing involves converting recordings to the same length by padding or truncating
for consistency in training.
Figure 4.2 Plot of the proposed ResNet-LSTM with GA when using k-NN as a classifier (the best classifier)
and Plot of the proposed ResNet-LSTM with GA when using k-NN as a classifier (the best classifier)
Figure 4.2 as it presents with GA and 4b as it presents without GA presents the graphs showing the
validation of the proposed k-NN ML model with and without using GA-based optimization.
A reading of the two plots confirms the choice of the GA-optimized strategy as more efficient.
From the results that the comparison presented it can be concluded that the proposed method
matches or betters the other methods in terms of robustness for the data set reported. As noted
earlier, as a motivation for embarking on this study, while it was observed that there are a good
number of machine or deep learning approaches for detecting heart disorders (such as arrhythmia),
most of them are encumbered by the computational overhead associated with the complex
frameworks utilized in their detection models .
Precision expresses the ratio of positively predicted to all observations in the predicted class
(should be positively predicted). The F1 score is the weighted average of both Recall and
Precision. Thus, it takes into account both the false negatives and the false positives values
Figure 4.3 shows the performance measures of the pretrained models (SqueezeNet and AlexNet)
used as the transfer learning approach and our proposed CNN model for the ECG images dataset.
Each model was trained with different values for learn ing rate LR (0.01, 0.001, and 0.0001).
As noticed, the most successful result with an average accuracy rate of 98.23% was obtained by
our proposed CNN model when the RL was 0.0001.
The power of deep learning can be used to extract image features without re-training the entire
network. The activations of the network are computed by forward propagation of the input
images up to the specific feature layer
The performance measures are calculated and presented in Figure 4.3. As can be seen, the most
successful result was obtained with a rate of 99.79% for the accuracy, recall, precision, and F1-
score of the NB algorithm when our proposed CNN model was used as the feature extractor. The
accuracy rates of 99.47%, 97.87%, and 97.66% were obtained by the SVM algorithm when our
proposed CNN model, SqueezeNet, and AlextNet, respectively, were used to extract the features.
As a result, the best achievements for all performance measures were obtained when using our
proposed CNN model as the feature extractor
Figure 4.4 Calculated Performance Measurements for ML Algorithms that use different Feature Extractors
Although the extracted feature size of our proposed CNN model is the smallest, it achieved the
best results on all performance measures, as shown in figure 4.4. Therefore, this is an indication
that our proposed model is built to learn the key features of the ECG images dataset. Thus, the
advantages of the proposed model are not only the better accuracy rates but also the lower
computational costs compared to the works in the literature.
Relief showcased promising results in feature selection for CVD prediction, performing notably
well alongside FCBF. By evaluating feature relevance based on instance-level comparisons,
Relief enhanced the diagnostic accuracy of predictive models and complemented the
contributions of FCBF.
This synergistic approach resulted in a refined feature subset, significantly enhancing diagnostic
accuracy beyond what each technique achieved individually.
The performance measures are calculated and presented in Figure 4.3. As can be seen, the most
successful result was obtained with a rate of 99.79% for the accuracy, recall, precision, and F1-
score of the NB algorithm when our proposed CNN model was used as the feature extractor.
Theaccuracy rates of 99.47%, 97.87%, and 97.66% were obtained by the SVM algorithm when
our proposed CNN model, SqueezeNet, and AlextNet, respectively, were used to extract the
features. As a result, the best achievements for all performance measures were obtained when
Although the extracted feature size of our proposed CNN model is the smallest, it achieved the
best results on all performance measures, as shown in figure 4.3. Therefore, this is an indication
that our proposed model is built to learn the key features of the ECG images dataset. Thus, the
advantages of the proposed model are not only the better accuracy rates but also the lower
computational costs compared to the works in the literature.
This highlights the superior performance of a proposed convolutional neural network (CNN)
model for analyzing electrocardiogram (ECG) images. Despite having the smallest extracted
feature size, the model achieved the best results across all performance measures. When
coupled with traditional machine learning algorithms such as Naive Bayes and k-Nearest
Neighbors (kNN), the CNN-based approach yielded impressive accuracies of up to 98-99
percent.
Each model was trained with different values for learning rate LR (0.01, 0.001, and 0.0001). As
noticed, the most successful result with an average accuracy rate of 98.23% was obtained by our
proposed CNN model when the RL was 0.0001.
The power of deep learning can be used to extract image features without re-training the entire
network. The activations of the network are computed by forward propagation of the input
images up to the specific feature layer.The performance measures are calculated and presented
in Figure 4.3. As can be seen, the most successful result was obtained with a rate of 99.79% for
the accuracy, recall, precision, and F1- score of the NB algorithm when our proposed CNN
model was used as the feature extractor.
Chapter 5
CONCLUSION
The study's exploration of machine learning (ML) and artificial intelligence (AI) techniques in
cardiovascular disease (CVD) prediction and management represents a significant step towards
transforming cardiovascular healthcare. Through the evaluation of feature selection techniques
and the development of a convolutional neural network (CNN) model for ECG image
classification, the study has demonstrated the potential of ML and AI to enhance diagnostic
accuracy and improve patient outcomes in the context of CVD.
The study proposes a novel framework for detecting and classifying cardiovascular disease
(CVD) using machine learning algorithms and optimal feature selection techniques. It
emphasizes the significant impact of feature selection on enhancing the performance of machine
learning algorithms in CVD prediction. Evaluating five different feature selection techniques,
including MRMR, FCBF, LASSO, Relief, and ANOVA, the study finds that FCBF exhibits
superior performance. When combined with Extra Tree and Random Forest models, FCBF
achieves an impressive accuracy of 78%, highlighting its effectiveness in selecting relevant
features from large-scale CVD datasets. Moreover, the study underscores the importance of
selecting appropriate feature selection and optimization techniques based on dataset
characteristics, especially for datasets with predominantly categorical features.
In addition to the feature selection framework, the research article proposes a lightweight CNN-
based model for classifying major cardiac abnormalities using a public ECG images dataset. The
proposed CNN model demonstrates remarkable results in CVD classification and can serve as a
feature extraction tool for traditional machine learning classifiers. This CNN model offers
potential as an assistance tool for clinicians in detecting cardiac diseases from ECG images,
bypassing the manual process that can lead to inaccurate and time-consuming results. Future
work could focus on optimizing hyperparameters of the CNN model and exploring its
application in predicting other types of problems, especially in domains like the Industrial
Internet of Things, where low-scale deep learning methods may find practical utility.
Abstract—Cardiovascular diseases (heart diseases) are the Digital Object Identifier 10.1109/TAI.2022.3159505
lead- ing cause of death worldwide. The earlier they can be
predicted and classified; the more lives can be saved.
Electrocardiogram (ECG) is a common, inexpensive, and
noninvasive tool for measuring the electrical activity of the heart
and is used to detect cardiovascular disease. In this article, the
power of deep learning techniques was used to predict the four
major cardiac abnormalities: abnormal heartbeat, myocardial
infarction, history of myocardial infarction, and normal person
classes using the public ECG images dataset of cardiac patients.
First, the transfer learning approach was in- vestigated using the
low-scale pretrained deep neural networks SqueezeNet and
AlexNet. Second, a new convolutional neural net- work (CNN)
architecture was proposed for cardiac abnormality prediction.
Third, the aforementioned pretrained models and our proposed
CNN model were used as feature extraction tools for traditional
machine learning algorithms, namely support vector machine, K-
nearest neighbors, decision tree, random forest, and Naïve Bayes.
According to the experimental results, the perfor- mance metrics
of the proposed CNN model outperform the exiting works; it
achieves 98.23% accuracy, 98.22% recall, 98.31% pre- cision,
and 98.21% F1 score. Moreover, when the proposed CNN model
is used for feature extraction, it achieves the best score of 99.79%
using the NB algorithm.
Impact Statement—Artificial intelligence plays an important role
in improving the quality of life. In particular, early detection
of diseases can help save lives. In this work, the proposed new
lightweight CNN architecture has improved the accuracy rate
of cardiovascular disease classification to 98.23% compared with
the existing state-of-the-art methods, using the dataset of ECG
images of cardiac patients, and can be performed on a single
CPU, overcoming the limitation of computational power. In
addition, the classification accuracy has significantly improved
after applying the proposed method as a feature extraction tool
for traditional machine learning algorithms. For example, an
accuracy of 99.79% has been achieved using the Naïve Bayes
algorithm. Thus, this method could be integrated into the IoT
ecosystem in healthcare. This will encourage other AI
researchers to explore other methods for cardiovascular disease
detection.
Index Terms—Cardiovascular, deep learning, electrocar
diogram (ECG) images, feature extraction, machine learning,
transfer learning.
I. INTRODUCTION [10]. The machine learning methods require an expert entity for
features extraction and selection to identify the appropriate
CCORDING to the World Health Organization,
cardio- vascular diseases (heart diseases) are the leading
cause of death worldwide. They claim an estimated 17.9
A
features before apply- ing the classification phase. Feature
extraction is a process of reducing the number of features in a
data set by transforming or projecting the data into a new
million lives each year, accounting for 32% of all deaths
lower-dimensional feature space preserving the relevant
worldwide. About 85% of all deaths from heart disease are
information of the input data [11], [12].
due to heart attacks, also known as myocardial infarctions
The concept of feature extraction is concerned with creating
(MI) [1]. Many lives can be saved if an efficient diagnosis
a new set of features (different from the input feature) that are
of cardiovascular disease is detected at an earlier stage [1].
a combination of original features into a lower-dimensional
Different techniques are used in the healthcare system to
space that extract most, if not all, of the information in input
detect heart diseases, such as electro- cardiogram (ECG),
data. The most well-known feature extraction method is a
echocardiography (echo), cardiac magnetic resonance
principal component analysis [13], [14]. However, feature
imaging, computed tomography, blood tests, etc. [2], [3].
selection is a process of removing irrelevant and redundant
The ECG is a common, inexpensive, and noninvasive tool
features (di- mensions) from the data set in the training
for measuring the electrical activity of the heart [4]. It is
process of machine learning algorithms. Various methods can
used to identify heart-related cardiovascular diseases [4],
be used for feature selection, classified as unsupervised, which
[5]. A highly skilled clinician can detect heart disease from
refers to the method that does not need the output label for
the ECG waves.
feature selection, and supervised, which refers to the methods
However, this manual process can lead to inaccurate results
that use output label for feature selection. Under supervised
and is very time-consuming [5].
feature selection, there are three methods: the filter method,
There is great potential to benefit from advances in
the wrapper method, and the embedded method [11], [12].
artificial intelligence in healthcare to reduce medical errors.
Many machine learning methods have been used for
In particular, the use of machine learning and deep learning
predict- ing cardiovascular diseases. Soni et al. [15]
techniques for automatic prediction of heart diseases [3], [6]–
compared several
2691-4581 © 2022 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: VTU Consortium. Downloaded on February 29,2024 at 19:24:23 UTC from IEEE Xplore. Restrictions apply.
374 IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 4, NO. 2, APRIL
2023
Authorized licensed use limited to: VTU Consortium. Downloaded on February 29,2024 at 19:24:23 UTC from IEEE Xplore. Restrictions apply.
ABUBAKER AND BABAYIG˘ IT: DETECTION OF CARDIOVASCULAR DISEASES IN ECG IMAGES USING MACHINE 375
LEARNING
Authorized licensed use limited to: VTU Consortium. Downloaded on February 29,2024 at 19:24:23 UTC from IEEE Xplore. Restrictions apply.
ABUBAKER AND BABAYIG˘ IT: DETECTION OF CARDIOVASCULAR DISEASES IN ECG IMAGES USING MACHINE 377
LEARNING
TABLE I
LAYERS ANALYSIS OF THE PROPOSED CNN MODEL
leakyReLU: scale=0.1, batch normalization: MeanDecay=0.1, VarianceDecay=0.1, Epsilon=0.00001, total number of learnable parameters=3430308
Authorized licensed use limited to: VTU Consortium. Downloaded on February 29,2024 at 19:24:23 UTC from IEEE Xplore. Restrictions apply.
378 IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 4, NO. 2, APRIL
2023
TABLE II
PUBLIC ECG IMAGES DATASET DESCRIPTION
Fig. 7. Sample from the ECG images dataset after performing cropping as a
preprocessing.
TABLE III
TRAINING PARAMETERS AND VALUES FOR DEEP LEARNING METHODS
Authorized licensed use limited to: VTU Consortium. Downloaded on February 29,2024 at 19:24:23 UTC from IEEE Xplore. Restrictions apply.
ABUBAKER AND BABAYIG˘ IT: DETECTION OF CARDIOVASCULAR DISEASES IN ECG IMAGES USING MACHINE 379
LEARNING
TABLE IV
TABLE VI
PERFORMANCE MEASURES
CALCULATED PERFORMANCE MEASUREMENTS FOR SQUEEZE-NET, ALEXNET,
AND THE PROPOSED CNN MODEL FOR DIFFERENT RL VALUES
TABLE V
NETWORKS PROPERTIES2
LR: initial learning rate, A.: accuracy, R.: recall, P.: precision, F1: F1 score, T1: training
time, T2: testing time.
The bold values indicate the best results.
For all networks, input image size is 227×227×3.
TABLE VII
PERFORMANCE MEASUREMENTS VALUES OBTAINED FOR EACH FOLD OF THE
PROPOSED MODEL
Authorized licensed use limited to: VTU Consortium. Downloaded on February 29,2024 at 19:24:23 UTC from IEEE Xplore. Restrictions apply.
380 IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 4, NO. 2, APRIL
2023
Fig. 9. Training Progress for our proposed CNN model on the ECG images
dataset in fold-1 (LR: 0.0001 and other hyperparameters are as in Table III).
TABLE VIII
MODELS COMPARISON
NP: normal person, AH: abnormal heartbeat, MI: myocardial infarction, H. MI: history
of myocardial Infarction classes.
well
Authorized licensed use limited to: VTU Consortium. Downloaded on February 29,2024 at 19:24:23 UTC from IEEE Xplore. Restrictions apply.
ABUBAKER AND BABAYIG˘ IT: DETECTION OF CARDIOVASCULAR DISEASES IN ECG IMAGES USING MACHINE 381
LEARNING
TABLE X
CALCULATED PERFORMANCE MEASUREMENTS FOR MACHINE LEARNING ALGORITHMS THAT USE PRETRAINED NETWORKS SQUEEZENET, ALEXNET, AND
PROPOSED CNN AS FEATURES EXTRACTOR APPLIED ON ECG IMAGES DATASET
as, our proposed CNN model was used as a feature extractor VI. CONCLUSION
and the results were compared. The power of deep learning
can be used to extract image features without re-training the In this article, we propose a lightweight CNN-based model
entire network. The activations of the network are computed to classify the four major cardiac abnormalities, i.e., AH, MI,
by forward propagation of the input images up to the specific H. MI, and NP classes, using public ECG images dataset of
feature layer. The activation feature layers used are conv10 (layer cardiac patients. According to the results of the experiments,
number 64), fc7 (layer number 20) and fc02 (layer number the proposed CNN model achieves remarkable results in cardio-
32) for SqueezeNet, AlexNet and our proposed CNN model, vascular disease classification and can also be used as a
respectively. Table IX illustrates the characteristics of the ex- feature extraction tool for the traditional machine learning
tracted features. Then, these extracted features were used to classifiers. Thus, the proposed CNN model can be used as an
train the machine learning algorithms: SVM, k-NN, DT, RF, assistance tool for clinicians in the medical field to detect
and NB. cardiac diseases from ECG images and bypass the manual
The performance measures are calculated and presented in process that leads to inaccurate and time-consuming results.
Table X. As can be seen, the most successful result was obtained In the future work, optimization techniques can be used to
with a rate of 99.79% for the accuracy, recall, precision, and obtain optimized values for the hyperparameters of the proposed
F1-score of the NB algorithm when our proposed CNN model CNN model. The proposed model can also be used for predicting
was used as the feature extractor. The accuracy rates of other types of problems. Since, the proposed model belongs to
99.47%, 97.87%, and 97.66% were obtained by the SVM the family of low-scale deep learning methods in terms of the
algorithm when our proposed CNN model, SqueezeNet, and number of layers, parameters, and depth. Therefore, a study
AlextNet, respectively, were used to extract the features. As a on using the proposed model in the Industrial Internet of
result, the best achievements for all performance measures Things domain for classification purposes can be explored.
were obtained when using our proposed CNN model as the
feature extractor. When comparing SqueezeNet and AlexNet, we REFERENCES
almost achieved better accuracy rates for SVM, RF and NB [1] World Health Organization (WHO), “Cardiovascular diseases,” Jun. 11,
algorithms using the features extracted from SqueezeNet than 2021. Accessed: Dec. 27, 2021. [Online]. Available: https://www.who.
int/health-topics/cardiovascular-diseases
those from AlexNet. However, the training and testing times [2] Government of Westren Australia, Department of Health, “Com-
for SqueezeNet-based algorithms were longer due to the larger mon medical tests to diagnose heart conditions,” Accessed: Dec. 29,
size of the extracted features. Although the extracted feature 2021. [Online]. Available: https://www.healthywa.wa.gov.au/Articles/A_
E/Common-medical-tests-to-diagnose-heart-conditions
size of our proposed CNN model is the smallest, it achieved [3] M. Swathy and K. Saruladha, “A comparative study of classification
the best results on all performance measures, as shown in and prediction of cardio-vascular diseases (CVD) using machine
Table X. Therefore, this is an indication that our proposed learning and deep learning techniques,” ICT Exp., to be published,
2021. [Online].
model is built to learn the key features of the ECG images Available: https://doi.org/10.1016/j.icte.2021.08.021
dataset. Thus, the advantages of the proposed model are not [4] R. R. Lopes et al., “Improving electrocardiogram-based detection of
only the better accuracy rates but also the lower computational rare genetic heart disease using transfer learning: An application to
phos- pholamban p.Arg14del mutation carriers,” Comput. Biol. Med.,
costs compared to the works in the literature. However, the vol. 131, 2021, Art. no. 104262. [Online]. Available:
proposed model could achieve better results if optimization https://doi.org/10.1016/j. compbiomed.2021.104262
algorithms are used to determine the values of its [5] R. J. Martis, U. R. Acharya, and H. Adeli, “Current methods in electro-
cardiogram characterization,” Comput. Biol. Med., vol. 48, pp. 133–149,
hyperparameters. 2014. [Online]. Available: https://doi.org/10.1016/j.compbiomed.2014.
02.012
Authorized licensed use limited to: VTU Consortium. Downloaded on February 29,2024 at 19:24:23 UTC from IEEE Xplore. Restrictions apply.
382 IEEE TRANSACTIONS ON ARTIFICIAL INTELLIGENCE, VOL. 4, NO. 2, APRIL
2023
Abstract— An electrocardiograph (ECG) is employed as a main cause of deaths globally [1]. An estimated 17.9 million
primary tool for diagnosing cardiovascular diseases (CVDs). succumbed to CVD-related ailments, representing 31% of all
ECG signals provide a framework to probe the underlying deaths worldwide in the same year. Two-thirds of these deaths
properties and enhance the initial diagnosis obtained via
traditional tools and patient–doctor dialogs. Notwithstanding its occurred in low-income countries [1] where medical facilities
proven utility, deciphering large data sets to determine for early detection and supports for patients of CVD are
appropriate information remains a challenge in ECG-based CVD deemed generally poor.
diagnosis and treatment. Our study presents a deep neural Arrhythmia is a situation that arises when a person’s
network (DNN) strategy to ameliorate the aforementioned heart pacemaker does not work properly, or its functions are
difficulties. Our strategy consists of a learning stage where
classification accuracy is improved via a robust feature impaired by ectopic focuses [2]. There are several diagnostic
extraction protocol. This is followed by using a genetic methods available to detect CVDs. Electrocardiography (ECG)
algorithm (GA) process to aggregate the best combination of is the most well-known and widely applied method for the
feature extraction and classification. Comparison of the detection of various heart diseases [3]. ECG is an affirmed
performance recorded for the proposed technique alongside
method for the detection of acute coronary syndromes, intra-
state-of-the-art methods reported the area shows an increase
of 0.94 and 0.953 in terms of average accuracy and F1 score, ventricular conduction disturbances, and arrhythmias [4].
respectively. The outcomes suggest that the proposed model ECG lead refers to an imaginary line between two ECG elec-
could serve as an analytic module to alert users and/or medical trodes [5]. The standard ECG has 12 leads, of which six leads
experts when anomalies are detected. are placed on the arms and/or legs of the individual, and called
Index Terms— Advancement of medical instrumentation limb leads, while the remaining leads are placed on the torso
(AAMI) standard, arrhythmia detection, cardiovascular diseases and are referred to as precordial leads. The limb leads are
(CVDs), deep neural network (DNN), E-healthcare devices, elec- labeled as I, II, III, aVL, aVR, and aVF, while the precordial
trocardiograph (ECG), genetic algorithm (GA).
leads are similarly labeled as V1, V2, V3, V4, V5, and V6.
Overall, ECG has valuable potential to reveal hidden
disease features. However, the manual analysis of the long-
I. INTRODUCTION term ECG signals is a tiresome task even for an expert. Hence,
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
2502809 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 70, 2021
via unitwise calculation of the probability of each output [22]. ReLU activation layer
Each mathematical manipulation is considered a layer of the
neural network and so, in the case of complex architectures,
the network requires a deep layer of computations, hence the
name DNN.
As the features for ECG classification are usually mani-
fested in the morphology of the ECG waveforms, algorithms
for feature extraction should be crafted to characterize ECG
waveforms by a set of parameters. The convolution operation
in a CNN model has been proven effective in the extraction of
features from 1-D or 2-D data that exhibit good robustness to
noise [23]. The residual CNN (ResNet), which is an improved
version of CNN, augment a known drawback regarding the
problem of degradation associated with DNNs by adding
shortcut links between its layers. Therefore, a ResNet is
potentially viable for extraction of the features from the raw
ECG waveforms.
However, an ECG recording used to diagnose CVD
ailments could extend to tens of seconds in duration. As a
result, mor- phological features of ECG recordings can be
very complex and hard to characterize. Moreover, an average
segment of ECG recording is considered enough to make a
diagnosis since parts of it are either irrelevant or redundant.
Consequently, it is neither effective nor expedient to rely
solely on ResNet. In view of this, the proposed DLM utilizes
ResNet for local feature extraction from the raw ECG signals
while using other network components, such as long short-
term memory (LSTM) layer to summarize the local feature
series. Further- more, the proposed DLM ResNet-LSTM
network, whose main function is to extract ECG features, is
structurally composed of three parts: local features learning,
global features learning, and classification units. Fig. 3
presents the detailed structure of the proposed ResNet-LSTM
DLM, and the details of its three units are presented in the
sequel.
1) Local Feature Learning (LFL) Unit: This part of the
proposed DLM is focused on the raw ECG signals. A local
feature vector manifests the morphological information of a
short period in an ECG recording. The resulting feature map
is composed of a sequence of local features ordered by time.
As discussed earlier, in this study, the LFL unit is
implemented using ResNet. It consists of a few initial layers,
while its main body is made up of repeating substructures. As
presented in Fig. 2, each substructure consists of one max-
pooling layer whose size is present at 2 and a residual module.
The length of the feature map will be split through each of the
substructures whose number depends in part on the input
length such that a longer input requires more pooling layers to
compress the feature map to a certain length. Each residual
module contains two convolutional layers, each preceded by
two layers: a rectified linear unit (ReLU) activation layer and
a dropout layer. Through a shortcut connection, the input of a
residual module is merged by combining it with the output of
its second convolutional layer. As required by the merge
operation and to ensure equal input and output length, feature
maps are padded before input into each convolutional layer.
The kernel size of the first convolutional layer in the network
is set at 32, and through every four substructures, the kernel
size is reduced by half. The LFL unit terminates with a
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
HAMMAD et al.: MULTITIER DLM FOR ARRHYTHMIA DETECTION 2502809
where the feature maps are fed as input to the global features
learning part.
2) Global Feature Learning Unit: The global feature
learn- ing (GFL) unit transforms the feature map from the
preceding LFL unit into a global vector that is subsequently
used in the classification unit. The LSTM, which is a kind of
recurrent neural network (RNN), is used to characterize the
properties of the global vector that emanates from the final
layer of the LSTM. This vector’s length is determined by the
hidden units in LSTM layers (preset at 64 in this study);
at that stage, the test samples achieved the minimum
classification error using this number.
3) Classification Unit: The classification process is the
final step of the proposed DLM, whence classification
process is done based on the global feature vector extracted
from preceding units. Classification is accomplished using
two fully connected (i.e., dense) layers that are each followed
by a ReLU activation layer and a SoftMax activation layer,
respectively. In the case of multiclass classification, the
number of cells in the last dense layer is the same as the
number of classes. However, in the two-class classification,
the last dense layer usually has just one cell. The outputs
of the last layer are the predicted probabilities showing the
class that each ECG recording belongs to. Although
traditional DNN models can make predictions in an end-to-
end fashion, to improve classification performance, an
optimization layer is integrated into the proposed DLM,
whose details are discussed in Section II-B.
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
2502809 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 70, 2021
TABLE I
DEFAULT CHOICE OF BEST PARAMETERS FOR GA-BASED OPTIMIZATION
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
HAMMAD et al.: MULTITIER DLM FOR ARRHYTHMIA DETECTION 2502809
Fig. 4. Samples of normal and abnormal classes from the MIT-BIH data set [21].
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
2502809 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 70, 2021
TABLE III
COMPARISON OF INTRAPATIENT’S CLASSIFICATION PERFORMANCE OF USING THE MIT-BIH DATABASE
of a padding method can increase the computing complex- D. Results and Performance Analysis
ity of the model, while the truncation method can damage
the recording integrity. Moreover, 90% of recordings in the In this section, the results of experiments and performance
selected database are no longer than 30 s in length. In view of of the proposed model are presented and discussed.
this, as a tradeoff between computing efficiency and recording Especially, the proposed models are validated via three
integrity, 30-s-long recordings are chosen as the target length. experiments. In the first experiment, the proposed end-to-end
Furthermore, a zero-padding value was used because it is the model is employed without any ML stages. In the second
baseline value of the ECG signals. The padding was experiment, the proposed deep model is used for feature
positioned at the head of each recording because LSTM is extraction, and an external classifier (k-NN classifier) is
considered more sensitive to values in the recording tail. employed for classifica- tion. In the last experiment, a
Meanwhile, for the truncation, the model uses the same comparison of the two proposed models (i.e., end-to-end and
method that truncates a segment randomly from the original DLM with external classifier) alongside state-of-the-art
signal. In addition, other fixed-length recordings (such as 10 approaches reported in the literature. As discussed earlier,
and 20 s) were considered, but the 30-s-length recordings based on the AAMI specification EC 57 [33], using the
remained the optimal choice. MIT-BIH database [21], arrhythmia is con- sidered as the beat
The randomness involved in the padding/truncation methods level that can be classified as N, S, V, F, and Q classes. Each
augments and balances the data set during this process. How- beat contains 300 sampling points: 100 = before and 200 after
ever, considering the additional memory requirements the R peak (with Fs 360 Hz). The lead II
imposed by the augmentation, the data augmentation and data are used for the classification, so the channel number for
balancing are done in batches. For each model training, a the input is 1. Four residual substructures in the DLM (i.e.,
batch is generated by randomly selecting a certain number of ResNet-LSTM) model produce a local feature map of length
recordings from each class and then padding or truncating 18. Since this is a multiclass and single-label classification
these recordings as the case may demand. For example, for an problem, SoftMax is used as the final activation function.
adopted batch size of 63 and a class numbers of 5, a batch Furthermore, both intrapatient and interpatient models are
contains seven record- ings from each class. The randomness trained for this problem. For the training of intrapatient mod-
in the padding (except that for the ResNet-LSTM) and els, the beats from all recordings are first shuffled and divided
truncation ensure that, with the exception of the ResNet- into five segments for the cross-validation, whereas, for the
LSTM, no two training samples are the same. Furthermore, no training of intrapatient models, the beats from 22 recordings
additional memory is required for the augmented recordings are used for training and another 22 recordings for validation,
because they are generated just prior to preparing a batch and as stipulated in the AAMI standards. However, since the beat
discarded immediately after processing of the batch. numbers of classes F and Q are small, only the other three
As stated earlier, the recordings are padded or truncated classes (i.e., N, S, and V) are involved in the interpatient
to 30 s, which adds up to 15 000 sampling points. The local classifications. The results of the intrapatient and interpatient
features learning pipeline of the proposed ResNet-LSTM has models are presented in Tables III and IV, respectively.
seven residual substructures. As each substructure has a max- From Tables III and IV, it can be deduced that GA optimized
pooling layer with a pool size of 2, the resulting output length the features of the proposed DLM better than other methods.
of the local features learning pipeline is set at 117. Since a Similarly, it can be inferred that k-NN is better suited for
recording may have more than one label, the resulting task GA optimization since it produced better accuracy relative to
is a multilabel classification problem. Consequently, as out- other classifiers. Figs. 5 and 6 present the graphs showing
lined in Section III, SoftMax is used as the final activation the validation of the proposed k-NN ML model with and
function that generates the predicted probability for each class without using GA-based optimization. A reading of the two
independently. plots confirms the choice of the GA-optimized strategy as
The models are implemented on the Keras framework more efficient.
with a Tensorflow back end. The hardware environment is
a workstation equipped with an Intel Core i7-6800K CPU, E. Comparison With Similar State-of-the-Art Methods
an Nvidia GTX 1080ti GPU, and 16-GB memory, while the In this section, the performance of the proposed techniques
training time of each batch for ResNet-LSTM is 307 ms. is evaluated alongside longstanding methods in the area. For
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
HAMMAD et al.: MULTITIER DLM FOR ARRHYTHMIA DETECTION 2502809
TABLE IV
COMPARISON OF INTERPATIENT’S CLASSIFICATION PERFORMANCE OF USING THE MIT-BIH DATABASE
TABLE V
COMPARISON OF PERFORMANCE PROPOSED MODEL ALONGSIDE
REPORTED STUDIES THAT USE THE MIT-BIH DATABASE
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
HAMMAD et al.: MULTITIER DLM FOR ARRHYTHMIA DETECTION 2502809
TABLE IV
COMPARISON OF INTERPATIENT’S CLASSIFICATION PERFORMANCE OF USING THE MIT-BIH DATABASE
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
2502809 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 70, 2021
TABLE VI
with ML and GA-based optimization for effective discrimi-
COMPARISON BETWEEN COMPUTATIONAL COMPLEXITY OF LSTM AND
BILSTM DLMS IN ECG-BASED ARRHYTHMIA DETECTION nation of cardiac abnormalities in the ECG signal. The pro-
posed techniques fuse the adaptability and flexibility in input–
output relationships of DNN models with the “learnability”
of classical ML methods and repeatability inherent to the
mutation, crossover, and other properties of GA and other
optimization techniques to realize a prodigious yet efficient
strategy for early detection of different CVD ailments. These
properties ensure that the proposed approach alleviates many
of the shortcomings that encumber traditional approaches. The
capable of detecting more than one type of signal is proposed.
outcomes show that the proposed model matches and outper-
Its use in detecting heart disorders, such as arrhythmia, is
forms many of the competing approaches in either or both
demonstrated.
the data sets used. Moreover, with average accuracy values
In addition, the bidirectional long-short term memory net-
of 98%, the proposed technique is efficient in arrhythmia
work (BiLSTM) method is reported to perform creditably for
detection on the MIT-BIH data set. Furthermore, the perfor-
arrhythmia detection [35], [36]. Compared with our proposed
mance was reported in terms of specificity (98.9%), sensitivity
model (see Table V), the BiLSTM method in [35] offers
(99.7%), and positive predictivity (95.8%) for the fivefold
marginally better performance in detection accuracy.
cross-validation. The metrics validate the potentials for incor-
However, Li et al. [35] report detecting RR intervals, which
porating the proposed model in state-of-the-art applications
increases computational overhead. Furthermore, the method is
for CVD detection, as well as its subsequent diagnosis,
more susceptible to noisy signals, and its accuracy is data-
treatment, and management. In ongoing work, we are
intensive since large amounts of ECG data are required. In
exploring effective techniques to fuse the proposed method
addition, it requires double LSTM cells, which makes it
into other aspects of the e-health framework. In future work,
costlier. Con- sequently, the time complexity of [35] is
we intend to exploit the potency of the BiLSTM method to
potentially prohibitive because of the complexity of
enhance other aspects of CVD detection.
BiLSTM.
Meanwhile, the intuition to suffuse GA-based optimization
into the proposed DLM ensures that (the best) lower features REFERENCES
are extracted from the ECG signals of more than one lead, [1] V. K. Sudarshan, U. R. Acharya, and S. L. Oh, “Automated diagnosis of
despite the use of the lead II ECG signals. This suggests that congestive heart failure using dual tree complex wavelet transform and
statistical features extracted from 2, s of ECG signals,” Comput. Biol.
the proposed method is less complex than other competing Med., vol. 83, pp. 48–58, May 2011.
techniques. The proposed model requires four hours for train- [2] N. Singh and P. Singh, “Cardiac arrhythmia classification using
ing with a computational complexity (defined in terms of the machine learning techniques,” in Engineering Vibration,
Communication and Information (Lecture Notes in Electrical
decision time for each recording) of 10 ms. Engineering), vol. 478. Singapore: Springer-Verlag, 2019, pp. 469–
Finally, as presented in Table V, for the data sets employed, 480.
the proposed technique outperforms similar ones in terms of [3] M. Liu and Y. Kim, “Classification of heart diseases based on ECG
classification accuracy, which is an important precursor for signals using long short-term memory,” in Proc. 40th Annu. Int. Conf.
IEEE Eng. Med. Biol. Soc. (EMBC), Jul. 2018, pp. 2707–2710.
arrhythmia detection and subsequent diagnosis. [4] P. Kligfield et al., “Recommendations for the standardization and inter-
pretation of the electrocardiogram: Part I: The electrocardiogram and its
technology: A scientific statement from the American Heart Association
F. Complexity Analysis Electrocardiography and Arrhythmias Committee, Council on Clinical
Cardiology; the American College of Cardiology Foundation; and the
To evaluate the complexity of our proposed model, the Heart Rhythm Society,” Circulation, vol. 115, no. 10, pp. 1306–1324,
CPU time required to execute each phase is computed, as Mar-2007.
presented in Table VI. Therefore, we note that, in the worst [5] Lewis Potter. (Mar. 5, 2011). Understanding an ECG.
Accessed: Jul. 13, 2020. [Online]. Available: https://geekymedics.
case, the cost of the LSTM amounts to (O(n2)). com/understanding-an-ecg/
Meanwhile, this cost is half that expected for the BiLSTM [6] N. Khosravan, H. Celik, B. Turkbey, E. C. Jones, B. Wood, and
method (as reported in the rightmost column of Table V). U. Bagci, “A collaborative computer aided diagnosis (C-CAD) system
with eye-tracking, sparse attentional model, and deep learning,” Med.
Consequently, it is imperative that the marginal improvement Image Anal., vol. 51, pp. 101–115, Jan. 2019.
in terms of prediction accuracy for the BiLSTM model (as [7] L. Breiman, “Random forests,” Mach. Learn., vol. 45, no. 1, pp. 5–32,
reported earlier in Table V) over the proposed LSTM DLM 2001.
[8] Y. Freund and R. E. Schapire, “Experiments with a new boosting
with GA classifier comes at the expense of increases in
algorithm,” in Proc. ICML, vol. 96, 1996, pp. 148–156.
computational overhead. We believe this tradeoff between [9] M. Hammad, S. Zhang, and K. Wang, “A novel two-dimensional ECG
cost and marginal improvement in detection accuracy must be feature extraction and classification algorithm based on convolution
carefully considered depending on the application. neural network for human authentication,” Future Gener. Comput. Syst.,
vol. 101, pp. 180–196, Dec. 2019.
[10] D. Sadhukhan, S. Pal, and M. Mitra, “Automated identification of
IV. CONCLUSION myocardial infarction using harmonic phase distribution pattern of ECG
data,” IEEE Trans. Instrum. Meas., vol. 67, no. 10, pp. 2303–2313,
Efficient and accurate classification of ECG signals is the Oct. 2018.
first important step in the detection and diagnosis of many [11] R. Ghorbani Afkhami, G. Azarnia, and M. A. Tinati, “Cardiac arrhyth-
CVD ailments. This study presents a multitier DLM suffused mia classification using statistical and mixture modeling features of
ECG signals,” Pattern Recognit. Lett., vol. 70, pp. 45–51, Jan. 2016.
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.
HAMMAD et al.: MULTITIER DLM FOR ARRHYTHMIA DETECTION 2502809
Authorized licensed use limited to: VTU Consortium. Downloaded on March 09,2024 at 04:40:48 UTC from IEEE Xplore. Restrictions apply.