Research Article
Classification of Arrhythmia in Heartbeat Detection Using
Deep Learning
Wusat Ullah,
1
Imran Siddique ,
2
Rana Muhammad Zulqarnain ,
3
Mohammad Mahtab Alam ,
4
Irfan Ahmad,
5
and Usman Ahmad Raza
6
1
Department of Computer Science, Lahore Leads University, Lahore, Pakistan
2
Department of Mathematics, University of Management and Technology, Lahore 54770, Pakistan
3
Department of Mathematics, University of Management and Technology, Sialkot Campus, Sialkot, Pakistan
4
Department of Basic Medical Science, College of Applied Medical Science, King Khalid University, Abha, Saudi Arabia
5
Department of Clinical Laboratory Science, College of Applied Medical Sciences, King Khalid University,
Abha 61421, Saudi Arabia
6
Department of Computer Science, University of Engineering and Technology, Lahore, Pakistan
Correspondence should be addressed to Imran Siddique; imransmsrazi@gmail.com
Received 23 August 2021; Revised 15 September 2021; Accepted 21 September 2021; Published 19 October 2021
Academic Editor: Ahmed Mostafa Khalil
Copyright © 2021 Wusat Ullah et al. is is an open access article distributed under the Creative Commons Attribution License,
which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
e electrocardiogram (ECG) is one of the most widely used diagnostic instruments in medicine and healthcare. Deep learning
methods have shown promise in healthcare prediction challenges involving ECG data. is paper aims to apply deep learning
techniques on the publicly available dataset to classify arrhythmia. We have used two kinds of the dataset in our research paper. One
dataset is the MIT-BIH arrhythmia database, with a sampling frequency of 125 Hz with 1,09,446 ECG beats. e classes included in
this first dataset are N, S, V, F, and Q. e second database is PTB Diagnostic ECG Database. e second database has two classes. e
techniques used in these two datasets are the CNN model, CNN + LSTM, and CNN + LSTM + Attention Model. 80% of the data is
used for the training, and the remaining 20% is used for testing. e result achieved by using these three techniques shows the
accuracy of 99.12% for the CNN model, 99.3% for CNN + LSTM, and 99.29% for CNN + LSTM + Attention Model.
1. Introduction
Cardiovascular diseases (CVDs) are the major public health
problem worldwide. Every year almost 17.9 million people waste
their lives because of these deadly diseases. Coronary heart
disease, cerebrovascular illness, rheumatic heart disease, and
other diseases are among the heart and blood vessel disorders
known as CVDs. Heart attacks and strokes are responsible for
more than four out of every five CVD fatalities, with one-third of
these deaths occurring before 70. Willem Einthoven
(1860–1927), former professor of mercury electrometer ECG at
Leiden University in the Netherlands, has developed mathe-
matical precision. Einthoven published his first paper in 1901 for
the galvanometer, which was monitored in 1903 in detail by an
ECG new metal survey. In 2002, Willem utilized the ECG for
clinical purposes with the help of a string galvanometer [1].
ECG points P-Q-R-S and T letters to different deflections
[2] in Figure 1. Wave and action are summarized in Table 1.
e electrocardiogram (ECG/EKG) is a noninvasive
diagnostic technique that records the heart’s physiological
activity throughout time. Many cardiovascular disorders,
such as premature contractions of the atria (PAC) or
ventricles (PVC), atrial fibrillation (AF), myocardial in-
farction (MI), and congestive heart failure, can be diag-
nosed using ECG data (CHF). e fast development of
portable ECG monitors in the medical profession, such as
the Holter monitor [3], and wearable gadgets in different
healthcare domains, such as the apple watch, has occurred
in recent years. Consequently, the analyzed ECG data has
risen at a rate that human cardiologists cannot keep up
with. So, analyzing the ECG data automatically and
correctly becomes an exciting subject. ECG data may also
Hindawi
Computational Intelligence and Neuroscience
Volume 2021, Article ID 2195922, 13 pages
https://doi.org/10.1155/2021/2195922