Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Journal of Theoretical and Applied Information Technology

30th April 2023. Vol.101. No 8


© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

ENSEMBLE OF DEEP LEARNING MODELS FOR


CLASSIFICATION OF HEART BEATS ARRHYTHMIAS
DETECTION
S.JAYANTHI1 , DR.S.PRASANNA DEVI2
1
Research Scholar, SRM Institute of Science & Technology, Vadapalani Campus, Department of
Computer Science and Engineering,Chennai, India
2
Professor & HOD , SRM Institute of Science & Technology, Vadapalani Campus, Department of Computer
Science and Engineering,Chennai, India
1 2
E-mail: js8683@srmist.edu.in, hod.cse.vdp@srmist.edu.in

ABSTRACT

Arrhythmias are one of the top causes of death worldwide, and due to changing lifestyles, their prevalence
is rising dramatically. Due to their non-invasive nature, ECG signals have often been used to detect
arrhythmias. The manual technique, however, takes a long time and is prone to error. Utilizing deep
learning models for early automatic identification of cardiac arrhythmias is a preferred alternative to
improve diagnosis and management. This paper proposes a unique ensemble deep structured learning
model for categorizing arrhythmias that integrates attention mechanisms, bi-directional long short-term
memory, and a convolutional neural network. It classifies beats into five categories: non-ectopic (N),
supraventricular ectopic (S), ventricular ectopic (V), fusion (F), and unknown (Q). MIT-BIH and St.
Petersburg data sets are integrated as multi-model datasets for training, validating, and testing the suggested
model. The model's performance was also tested with the f1-score, recall, accuracy, and precision. Based
on the ensemble of all of these approaches, this model is 99% accurate.

Keywords: Artificial Neural Networks, Deep Structured Learning Models, Arrhythmia Detection,
Ensemble Models
detected automatically. In order to proceed with
1. INTRODUCTION feature extraction and classification, it is
According to the WHO, more than 18.9 million necessary to first remove any existing noise
people [1] in the country have atrial fibrillation components. Major sources of noise in an
(AFib), an arrhythmia that affects the heart. electrocardiogram are baseline drift, power line
The risk for such cardiovascular disease is interference, and moving artifacts [4]. Pre-
raised by factors such as elevated lipid profiles, processing methods that include filtering
high triglycerides, hypertension, obesity, video techniques aid in the elimination of noise
games, COVID, and others [2]. Clinical experts components, allowing for rapid processing,
can detect AF by analyzing ECG beat signals while various signal compression procedures
recorded by the Holter system. Recent years reduce the computational load by favoring
have seen an increase in the [3] use of effective signal characteristics. ECG feature
computer-based automatic heart arrhythmia extraction [5] is the primary method for
detection systems by cardiologists and diagnosing arrhythmias through the
physicians, highlighting the importance of classification of the resulting feature vectors.
automatic detection of arrhythmia in Feature classification is the second factor that
facilitating prompt and accurate treatment. The employs various different methods for
computer-based ECG signals follow the steps classifying ECG patterns, such as neural
of pre-processing, feature extraction, and networks, statistical methods, machine learning
classification of abnormal signals and are algorithm classifiers, and fuzzy interference [6].
Using a one-of-a-kind selection model that

3175
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

makes use of the best data distribution improves computational efficiency, and a long-
mechanism, the ECG pattern is classified time series monitoring deep learning technique
statistically. Here, a neural network approach is are introduced.
taken for ECG data classification, taking into
account a large learning ECG dataset with a The essential contributions of this study are as
lengthy learning time and a substantial follows:
computational burden. In order to improve
1. The dataset used for this work has been taken
ECG feature extraction and classification
from multiple datasets provided by
accuracy, dimension reduction is used Deep
PhysioNet.org, MIT-BIH AD, and the PTB
learning methods are well known and can be
Diagnostic ECG database, which contains a total
used for automatic feature extraction and
of 597 patient records.
dimensioning techniques for large volumes of
data. There are several deep-learning 2. This work generated a new combined deep
techniques for arrhythmia detection, including structured learning model based on CNN, Bi-
CNN, LSTM, BI-LSTM, and the advanced LSTM, and attention approaches to identify
attention model mechanism. Recently, it has arrhythmias from long-term follow-up ECG
come to light that ensemble learning is a data.
significant factor in improving the
effectiveness of deep learning models. In 3. This work contributes to two distinct
summary, the goal of deep ensemble models is mechanisms: a hybrid CNN + Bi-LSTM model
to build a model that combines the best and an ensemble of CNN + Bi-LSTM + RNN-
qualities of both ensemble and deep-structured based attention.
learning models. The second phase of ECG
4. First, the dataset was normalized, and then
arrhythmia detection includes the accuracy of
heart rate segmentation was performed using the
the classification, which is determined by the
annotation files.
quality of the ECG signal processing and the
features extracted [7]. Several of the currently 5. The dataset is divided into three parts:
available works utilize a classical signal training, validation, and testing. First, the
processing approach based on morphological balanced dataset is used to train the newly
characteristics, wherein an old-fashioned signal implemented ensemble deep-structured learning
processing algorithm is implemented. Since model. After training, the models were evaluated
there is a great deal of variation in the shapes on an indeterminate dataset (the test dataset) to
of P waves and the QRS complex, Mitta et al. quantify heart rate in five groups.
[8] proposed working with the morphological
characteristics of the ECG signal. A perfect 2. RECENT DEEP STRUCTURED ECG
signal classification accuracy for arrhythmia SIGNALS LEARNING:
detection cannot be achieved with just this This section looked at a comprehensive survey
feature. The authors of this study address this of deep, structured learning methods for
issue by taking into account morphological, processing and classifying ECG arrhythmia
temporal, and statistical features, which signals. The ECG arrhythmia detection based on
deep structured learning has been organized into
together will result in maximum effectiveness
two parts: feature extraction and classification
for all heart patients. Kachuee et al. [9] are
and time-series classification. Each classification
considered one example of prior works in the has a different algorithmic methodology. Also,
field of deep learning, and both of them are the limitations of various deep structured
computationally intensive, requiring a great learning methods incorporated in this survey
deal of processing power. Thus, in this paper, paper are discussed and tabulated in Table [1],
various deep, structured, related learning and some of them are listed below.
models for ECG signals are reviewed. Bringing
constant monitoring to individual wearable 2.1 Convolutional Neural Network (CNN):
devices is central to the solution we propose In the case of ECG arrhythmia detection, the
CNN technique is widely used as a feature
here: an efficient classification method, which
extraction and classification technique. Mishra

3176
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

et al. [10] present a comparison of different processing techniques and deep-learning models.
ECG filters and classifications with customized Limitations:
CNNs (CCNNs). The dataset includes 1. In order to achieve greater accuracy, the
electrocardiogram (ECG) signals, which are model is tested with a test split range of
used to conduct one-hot encoding. After the Z- 70–30, which will generally give higher
score is applied to these readings, heartbeats accuracy output.
can be separated. Several filters, including the 2. High Computational cost.
wavelet transform, the low-pass Butterworth
filter, the Savitzky-Golay filter, the moving 2.3 Auto Encoders :
average filter, the median filter, and the Autoencoders are a type of artificial neural
Gaussian filter, are used to deny the data. After network (ANN)-based architecture that can be
the data has been cleaned up and separated into used to learn unsupervised data encoding
training and testing sets, CCNNs are used to efficiently. They are commonly used to discover
classify the heartbeats. This system achieves commonalities among data sets with the same
94.90% accuracy in the classification of normal characteristics. In addition to reducing the number
and abnormal signals. The system's of dimensions, an auto-encoder will attempt to
implementation of the CCNN framework, produce a new class that is analogous to the one it
which enables feature extraction, selection, and is being fed. In the previous investigations, the
classification, is its greatest strength. author presented several variants of auto-encoder-
Limitations: based architecture.[Ojha et al. 2022] [13] This
1. CCNN has a far better training period. paper suggests using a CAD system to identify
2. The training requirements can only be and categorize arrhythmias from ECG data
met with a massive database. automatically. To begin, an auto-encoder
3. Since CCNN requires a static ECG convolutional network (ACN) model is
signal, the length of the ECG signal implemented. The ACN is founded on a one-
must be kept constant during both the dimensional convolutional neural network (1D-
training and testing phases. CNN) that can be trained to discover the optimal
features from raw ECG signals. The ACN model's
2.2 Recurrent Neural Network (RNN): learned features are then used as input to a
The RNN is a type of neural network with its support vector machine (SVM) classifier, which
own specific architecture. Using an RNN, data aids in the detection of irregular heartbeats.
can be stored in loops between layers. One of Limitations:
the variants used in the RNN model is LSTM 1. Auto encoder’s classification fails to
(Long Short-Term Memory). Neurons in a feed- classify different types of arrhythmia
forward network only have forward diseases.
connections, but LSTM uses reversal feedback.
LSTM may process individual data points, such 2.4 Transformer-Based Deep Neural
as pictures, or it can handle data sequences, Networks:
such as ongoing video or audio streams. LSTM Transformer, in the context of deep learning,
can also decode ECG signals and hear heart refers to a sequence-to-sequence design of
sounds. In this paper [Kaya et al.] [11], ECG neural networks that uses the self-attention
signals were classified using a hybrid of the process to capture global dependencies [15].
long short-term memory (LSTM) and angle Since the transformer was made to accept
transform (AT) neural network architectures. sequence data as input, it piqued the interest of
When classifying ECG signals, the AT many scientists working in the field of natural
considers the angular information of signals on language processing (NLP). Bidirectional
both sides of the target signal. The range of the Encoder Representations from Transformers
resulting signals after AT conversion is 0-359. (BERT) [16] is one of the most popular
The LSTM technique takes its inputs from a transformer-based models that has attained
histogram of recent signals. LSTM utilizes state-of-the-art performance in several NLP
histograms to differentiate between atrial tasks. The transformer has become an
refractory rhythm (ARR), ventricular increasingly beautiful standard in the field of
fibrillation (CHF), and normal sinus rhythm computer vision recently. Dosovitskiy et al. [17]
(NSR). The strength of this paper lies in suggested a method for picture classification
achieving the best combination of signal- using a transformer that accepts image patches
as input. The detection transformer (DETR) is

3177
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

the result of one of the successful projects for research to present an edge-based innovative
an end-to-end object detection framework technique for ECG signal reduction. Instead of
based on the transformer. By eliminating including numerous convolutional filters and
spatial anchoring and non-maximal pooling layers at the conclusion of the encoder
suppression, two examples of manually created section of the CDAE, a single-layered LSTM
components that contain past knowledge, network is added. It results in a decrease in the
DETR streamlines the object detection model's trainable parameters, which in turn speeds
pipeline. As a result, the transformer-based up computation. Additionally, the LSTM network
deep neural network is another viable learns the order dependencies between the data,
mechanism for managing AI tasks, including which aids in decompressing and reassembling the
natural language processing and computer data. The suggested algorithm, which makes use of
vision. a denoising autoencoder architecture, denoises the
Limitations: signal in the interim. The greatest strength of this
1. Coming to real time for arrhythmia paper's usage of the LSTM network is its ability to
detection the transformer model is still increase computational efficiency.
lack to compute . Limitations :
2. An automated transformer model for a 1. Not applicable for real time datasets.
hybrid combination-based pipeline 2. Lacks of joint compression of multiple
model is one of the gaps to be designed. ECG signals.

2.5 CNN and LSTM: 3. MATERIALS AND METHODOLOGY :


The hybrid combination of CNN and LSTM
leads to a time series classification category. In this section, details on the database used,
In this technique, CNN is used for ECG balanced sampling, matching and labeling the
feature extraction and LSTM for time series classes, and the feature extraction and
classification. [Ullah et.al 2021][12], in this classification procedure are presented.
paper, intends to use deep learning on the
3.1 Dataset:
available dataset to identify and categorize
This study makes use of the combination of the
arrhythmias. The MIT-BIH arrhythmia
MIT-BIH (Massachusetts Institute of
database contains 1,09,446 ECG beats
Technology-Beth Israel Hospital) arrhythmia
sampled at a rate of 125 Hz. This initial data
database and Physio Bank is a sizable and
collection consists of five different types: N,
expanding collection of high-quality digital
S, V, F, and Q. PTB Diagnostic ECG
recordings of the biomedical research
Database are the other database. There are
community that can employ physiological
two groups in the secondary data source. Both
signals and related data. The arrhythmia
datasets employ the CNN model, the CNN +
database at MIT-BIH is a widely used standard
LSTM, and the CNN + LSTM + Attention
dataset that is available to the public for the
Model. The greatest advantage of this system
study of arrhythmia. contains the MIT-BIH
is that it makes use of a multimodal database
Arrhythmia Database. Two-channel, 24-hour
for the analysis of various ECG signal
ECG recordings were cut into 48 half-hour
formats.
segments. Each recording includes a file called
Limitations:
an annotation.atr in which the type of heartbeat
1. When it comes to CNN models, the
is identified. The original 18 heartbeat kinds
biggest drawback is the high
from ANSI/AAMI EC57:1998/(R) 2008 are
computational cost of neural networks.
divided into many categories, including normal
2. Another drawback is that they demand a
(N), supraventricular ectopic beat (S),
big training sample to be effective.
ventricular ectopic beat (V), fusion beat (F),
2.6 LSTM and Auto-Encoder : and unknown beat (Q). The secondary data
Most of the time the combination of LSTM and from the ECG database on the physio bank A
Auto encoder acts as feature extraction and PTB diagnostic ECG was used to construct the
dimensionality reduction techniques in time MI detection system. ECGs were taken from
series analysis of ECG Signals.[Evangelin et al., 148 patients with MI and 52 healthy
2021] [14] In this paper, a convolutional participants. In order to build rules based on
denoising autoencoder (CDAE) and long short- the data feature, data was used as a reference.
term memory (LSTM) are combined in this The figure [1] shows the dataset classes and

3178
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

their labels. The drawbacks of arrhythmia datasets. Sampling-based strategies seek to


detection require computing the ECG signals "rebalance" the data by ensuring that each
as soon as possible. Thus, the suggested outcome is fairly represented. The most
framework consists of locating the heart straightforward strategy is to arbitrarily under
beats ,labeling of classed and classify using sample the majority result or oversample the
ensemble model which reduces the time of minority. Here, the majority class (Normal) is
pre-processing .Figure [2] shows the under sampled and reduced to 79.9%. Such
schematic diagram of the proposed that the minority class comes in at 2.06%.
methodology.
3.3 Matching and Labeling the data :
3.2 Balanced Sampling Technique :
The main aim of this work is to enable the According to the AAMI, the heart rhythms
reduction of pre-processing steps so that data associated with BIT-MIH arrhythmias can be
has to be balanced. Figure 3 represents the divided into five categories: normal (N),
before and after of classifying imbalanced supraventricular (S), ventricular (V), fused (F)
arrhythmias. As shown in the figure, the and unknown rhythm (Q). Heartbeat is divided
fusion of ventricular and normal data seems into five main classes based on subclass
to be as low as 0.73%. The data has to be annotations, including 'N', 'L', 'R', 'j', 'e', 'A', 'a', '
balanced at or above 1.00%. Thus, the S', 'J', '!', 'V', 'E', '[',']', 'F', 'f', '/' and 'Q' Records
technique used is sampling methods for labeled with each record are retained for
imbalance methods from synthetic ECG classification purposes.

Table 1: Deep Arrhythmia structured learning methods and its research gaps

R.NO Input Dataset Pre-processing Feature Accuracy Research Gaps


Technique Extraction(Deep
Learning Models)
and Classification
17 Physio-Bank ATM 1. Z-Score ECG Deep CNN-BLSTM CNN – Model can be trained
MIT-BIH(2022) Signal Normalization Model BLSTM : with different
2. Imbalanced with 98.36 activation layers among
Balanced Processing CNN – GRU different layers to
Using SMOTE : 96.63 reduce the time and
space complexity.
18 Physio-Bank ATM CNN Technique CNN-LSTM model 98.10% This model is not
MIT-BIH(2018) focussed on elimination
of noise
19 MIT-BIH Atrial Butterworth Filter Hybrid CNN-LSTM 97.87% Computation time is
Fibrillation(2021) Wavelet Transform Model high.
20 MIT-BIH Atrial Signal Processing CNN - LSTM model 97.21% Not suitable for non
Fibrillation scale fixed inputs
Database(2020)
21 (CPSC) dataset (2019) Unify to 30sec by Deep residual network 80.60% New methods based on
normalization - BiLSTM feature learning from
the related leads of
certain pathological
conditions are
expected.
22 MIT-BIT Arrhythmia 1.Normalization 1.CNN -concatenate - 82% The performance of
Physio net(2020) 2.Peak Detection BiLSTM the result still could not
2. CNN - Feed - capture the variation of
BiLSTM different types of
patients.
23 Physio Net 2017(2021) - hybrid attention-based 86% Takes more memory to
deep learning network compute.
25 4th China Physiological - convolutional long 97.88% Signal processing is not
Signal Challenge- short-term memory done .
2021.(2023)

3179
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

Figure 1: Heartbeat Classes and its class labels

Figure 2: Proposed Ensemble Methods

Figure 3: Before and after of Balanced Data

3180
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

Figure 4 : Proposed Layers Description


As a result, by following this procedure, we can
3.4 Feature Extraction And Classification : get a high degree of accuracy with little
The proposed methodology consists of three computational effort.
pipelines methods, such as :
Pipeline 1 : Convolutional Neural Network The figure [4] shows the neural schema of each
(CNN) pipelines and the detailed of each procedure is
Pipeline 2 : Bidirectional - Long short explained below
term memory (Bi-LSTM)
Pipeline 3 : Ensemble models (CNN + Bi- 3.4.1 CNN methods :
LSTM + Attention ) for time series ECG
classification
Layers of neurons using weights make up neural
The steps involved to create those ensemble
networks in general. After each neuron calculates
models are given below :
a scalar product using the inputs it has received,
Step 1: Import all necessary packages .
it performs a non-linear operation. Every layer
Step 2: Set up the automatic hyper parameters
up to the output layer, when the network
to understand the problem .
produces predictions for the input data, goes
Step 3: Setup the algorithm for balancing the
through this procedure again. A unique class of
data.
deep learning algorithms called CNN is
Step 4: Divide the dataset into train(z)
frequently applied in research work. The
,validation(z) and test(z) data.
proposed CNN model consists of three layers of
Step 5: Create a custom, three hybrid ensemble
convulational and three layers of batch
algorithm pipeline :
normalisation, and this model especially uses
Level 1 : Develop a class named Convolutional
swish activation functions and adaptive average
Neural Network algorithm on one pipeline.
pooling. Convulational layers take the input of
Level 2: Call a class called Bi-LSTM consisting
ECG signals and perform convulation operations
of a series of RNN modules in a bidirectional
so that important features are extracted. On-batch
way.
normalisation allows for the processing of small
Level 3 : Call a class called ensemble that
batches of data rather than the entire dataset.
includes the functions of CNN,Bi-LSTM and
Generally, the swish function works better than
attention mechanism.
ReLu because of its better and quicker
Step 6: The custom deep learning set model is
convergence. The figure [5] shows the swish
created and predicts the value of the test data .
function curve and its convergence. The

3181
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

mathematical representation of swish activation The bi-LSTM consists of two independent


and its derivatives is given in equations [1] and LSTMs that can integrate and summarise data
[2]. coming from both forward and backward
swish(conv) = Conv(x) * sigmoid(Conv(x)) --- directions. It is helpful to have access to both
(1) past and future contexts while performing
Where Conv(x) = output from normalized activities involving sequence labelling. To obtain
convoluted features information about the future and the past, Bi-
swish(conv) = output of activated LSTM suggests advancing and backwarding
features each sequence to two different hidden states and
Derivative of Swish : then concatenating the two hidden states to
swish(conv)’ = swish(conv)+ produce the result. The output of the CNN layers
sigmoid(Conv(x)) * (1- swish(conv)) --(2) serves as the input to the LSTM in this
The equation () gives the final outcomes of combination of CNN and Bi-LSTM
activated ECG signals . modeling.Model The bi-LSTM model cycles
through a set of RNN values that include all
three gates. The cell in every gate is in charge of
retaining the values throughout particular time
intervals, while the gates control the
communication between the cells. Finally, the
fully connected layers give the outcomes of
every labelled class.

3.4.3 Attention Mechanism :


The encoder-decoder model for machine
translation was given a performance boost by the
addition of the attention mechanism. The
purpose of the attention mechanism was to allow
the decoder to use the most pertinent portions of
Figure 5 : swish function curve(x-axis = sigmoid the input sequence in a flexible way by
values & y-axis = Number of epochs)
combining all of the encoded input vectors in a
CLASS CNN(X)
weighted manner, with the most pertinent
do
vectors receiving the highest weights. Thus, the
X = Reshape (ecg data training data)
decoding part is considered important for
Conv1 = convolution (x,hidden_size)
attention. The steps to compute the decoding of
Conv1 = batch_normalization(conv1)
attention are given as follows:
Conv1 = swish(Conv1)’
Step 1 : Accepts attention input from all encoder
Conv2 = convolution (x,hidden_size)
states (enc_state_1, enc_state_2,....enc_state_k
Conv2 = batch_normalization(conv2)
etc.) and a decoder state (decode(ht)).
Conv2 = swish(Conv2)’
Step 2 : Evaluate Attention scores.
Conv3 = convolution (x,hidden_size)
Att_score = score(decode(ht),.enc_state_k),k
Conv3 = batch_normalization(conv3)
Step 3 : For each encoder state enc_state_k,
Conv3 = swish(Conv3)’
attention computes its "relevance" for this
Xout = Adaptive average pool(Conv3)
decoder state (decode(ht)).
Output = softmax(fully_connect ( Xout))
Step 4: Perform attention weights, which are
End
probabilistic distributions based on softmax that
are applied to attention scores.
Finally, the fully connected layers take the
Attention weights = softmax(Att_score)
average weight of the features and give the final
Step 5 : computes attention output, which is the
outcomes.
weighted sum of encoder states with attention
3.4.2 CNN and Bi-LSTM model :
weights.
These steps are followed to give attention to
RNNs are the foundation of the LSTM method.

3182
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

important features and classify the ECG 4.1 Confusion Matrix for ECG arrhythmias :
abnormal signals outputs. Confusion matrix of this method comes under
four cases
3.4.4 Ensemble of models : Case 1 : True ECG Positive(TEP) :The
Ensemble of deep structured learning model that abnormal ECG signal is correctly detected as an
combines the various different algorithms for arrhythmia ECG signal.
Case 2 : False ECG Positive (FEP): The normal
predictions. On this proposed model, the
ECG signal is incorrectly detected as an
ensemble works based on the combination of
arrhythmic ECG signal.
CNN, BI-LSTM, and the attention mechanism. Case 3 : False ECG Negative (FCN):An
The working mechanism of the proposed model abnormal ECG signal that is not correctly
is given in the algorithm [1]. detected is an arrhythmia ECG signal.
Case 4 : True ECG Negative(TEN) : The
Algorithm 1: Ensemble of deep ECG ensemble Normal ECG signal is detected exactly as normal
classifier ECG signal.
Input : Training ECG signals data Based on the following cases ,the figure [6]
(ECG_DATA) shows the classification report of the ensemble
Base Level classifiers (BL1-CNN and model .From the figure, the fusion of ventricular
BL2 - LSTM) and normal ECG signals shows a high rate of
Meta Level classifiers( Attention having arrhythmia diseases .
mechanism )
Output : Trained deep ensemble model
(Trained_ECG_DATA)
BEGIN
Step 1 : Train the base learners model by
applying classifiers CNN and LSTM to the
ECG_DATA
for i = 1…..n do
Base_Learners = BL (ECG_DATA_n) Figure 6 :Confusion Matrix Report
End for
Step 2 : Construct new dataset for predictions 4.2 Loss Function :
ECG_DATA Using the loss function, we can assess how
Step 3 : Train a meta level classifier (Attention effectively this ensemble algorithm models our
mechanism ) from constructed new dataset balanced dataset. Cross-entropy loss is used in
Return attended values our work. Cross-entropy works based on
END adjusting the model weights during training to
Thus by using the attention will find the minimise the loss values. Our model performed
better when the loss was smaller. Figure [7]
important features that the features may be from
shows the loss function graph of three pipelines.
recurrent layers or convoluted . From the graph, we inferred that loss is
4. EXPERIMENTAL AND RESULTS: decreasing slowly over 100 epochs.

This work is primarily focused on demonstrating


the significance of not performing pre-processing
on imbalance data in arrhythmia detection with
an ensemble model . The result is plotted in three
ways :
1. Confusion Matrix for ECG arrhythmias
2. Loss Function
3. Accuracy(ECG),Precision(ECG),Recall
(ECG) and F1-score(ECG)

3183
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

4.3 Accuracy,Precision,Recall and F1-score :

Performance metrics such as Accuracy,


Precision, Recall and F1-Score are calculated
for measuring the performance from equations
[3] to [6].
Accuracy(ECG) =
(TEP+TEN)/(TEP+FEP+FEN+TEN) -------------
-- (3)
Precision(ECG) = TEN/(TEN+FEP) -------------
-------------------- (4)
Recall(ECG) = TEP/(TEP+FEN) -----------------
---------------- (5)
F1-Score = 2 * Precision(ECG). Recall(ECG)/
Precision(ECG) + Recall(ECG) —-----------------
--------(6)
Figure [8] shows the visualized chart report for
proposed three pipelines .We compare all other
deep learning with the proposed ensemble
technique which achieves 99% in detection
using this multi-model dataset.
.
Figure 7 :Loss Function Graph

3184
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

Figure 8 : Ensemble Classification Report Chart

5. CONCLUSION: REFERENCES:
The processing of ECG segment data can be used [1] Al-Naami, B., Fraihat, H., Owida, H. A.,
to predict arrhythmia, a severe cardiovascular Al-Hamad, K., De Fazio, R., & Visconti,
disease. To reverse heart disease, arrhythmias P. (2022). Automated Detection of Left
must be accurately recognised and prevented Bundle Branch Block from ECG Signal
early. Our proposed system model achieved the Utilizing the Maximal Overlap Discrete
primary research goal of helping physicians Wavelet Transform with ANFIS.
quickly identify the type of ECG or confirm their Computers, 11(6), 93.
diagnosis in a medical setting while maintaining a [2] Townsend, M. J., Claridy, M. D., Bajaj, S.
high level of accuracy. High and affordable. To S., Tu, L., & Stanford, F. C. (2022).
build an efficient and robust stand-alone Obesity and Eligibility for Obesity
computer-aided diagnostic system, a deep Treatments Among Adults With Disabilities
in the US. American Journal of Preventive
aggregation model is presented in this study to
Medicine.
classify five types of ECG segments. Using a [3] Li, Hongqiang, et al. "Automatic
multi-model dataset for training, validation, and electrocardiogram detection and
testing, the network achieved a maximum classification using bidirectional long
accuracy of 99%. short-term memory network improved by
This study demonstrated a number of benefits, Bayesian optimization." Biomedical
including its capacity to support doctors in Signal Processing and Control 73 (2022):
making decisions about clinical procedures that 103424.
involve ECG recordings. Additionally, it was [4] Vijayakumar, V., Ummar, S., Varghese, T.
designed to be as straightforward as possible J., & Shibu, A. E. (2022). ECG noise
while providing the best performance. For health classification using deep learning with
professionals, the presented method is simple and feature extraction. Signal, Image and Video
does not need feature extraction or signal Processing, 1-7.
modification. Additionally, this study only [5] Annam, J. R., Sujatha, R., Somala, J.,
examined one type of CVD, namely arrhythmia, Prasad, G. V., Satyala, N., & Surampudi,
despite the fact that the symptoms of cardiac B. R. (2022). ECG Feature Extraction. In
disease are frequently complex and variable. Innovative Trends in Computational
Therefore, additional ECG data types will be Intelligence (pp. 177-195). Springer,
required to increase the network'spotential Cham.
[6] Serhal, H., Abdallah, N., Marion, J. M.,
Chauvet, P., Oueidat, M., & Humeau-
Heurtier, A. (2022). Overview on
prediction, detection, and classification of

3185
Journal of Theoretical and Applied Information Technology
30th April 2023. Vol.101. No 8
© 2023 Little Lion Scientific

ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195

atrial fibrillation using wavelets and AI on detection using continuous ECG signals.
ECG. Computers in Biology and Medicine, Comput. Biol. Med. 2022, 144, 105325.
105168. [16] Devlin, J.; Chang, M.W.; Lee, K.;
[7] Chen, X., Cheng, Z., Wang, S., Lu, G., Xv, Toutanova, K. Bert: Pre-training of deep
G., Liu, Q., & Zhu, X. (2021). Atrial bidirectional transformers for language
fibrillation detection based on multi- understanding. arXiv 2018,
feature extraction and convolutional arXiv:1810.04805.
neural network for processing ECG [17] Dosovitskiy, A.; Beyer, L.; Kolesnikov,
signals. Computer Methods and Programs A.; Weissenborn, D.; Zhai, X.;
in Biomedicine, 202, 106009. Unterthiner, T.; Dehghani, M.; Minderer,
[8] Mittal, Sandeep S., Jack Rothberg, and M.; Heigold, G.; Gelly, S.; et al. An image
Kanad Ghose. "Deep Learning for is worth 16x16 words: Transformers for
Morphological Arrhythmia Classification image recognition at scale. arXiv 2020,
in Encoded ECG Signal." 2021 20th IEEE arXiv:2010.11929.
International Conference on Machine [18] Bhatia S, Pandey SK, Kumar A, Alshuhail
Learning and Applications (ICMLA). A. Classification of Electrocardiogram
IEEE, 2021. Signals Based on Hybrid Deep Learning
[9] Kachuee, M., Fazeli, S., & Sarrafzadeh, Models. Sustainability. 2022;
M. (2018, June). Ecg heartbeat 14(24):16572.
classification: A deep transferable https://doi.org/10.3390/su142416572.
representation. In 2018 IEEE international [19] Oh, Shu Lih, et al. "Automated diagnosis
conference on healthcare informatics of arrhythmia using combination of CNN
(ICHI) (pp. 443-444). IEEE. and LSTM techniques with variable
[10] Mishra, Abhinav, et al. "ECG Data length heart beats." Computers in biology
Analysis with Denoising Approach and and medicine 102 (2018): 278-287.
Customized CNNs." Sensors 22.5 (2022): [20] Petmezas, Georgios, et al. "Automated
1928. atrial fibrillation detection using a hybrid
[11] Kaya, Yılmaz, Fatma Kuncan, and CNN-LSTM network on imbalanced ECG
Ramazan Tekin. "A New Approach for datasets." Biomedical Signal Processing
Congestive Heart Failure and Arrhythmia and Control 63 (2021): 102194.
Classification Using Angle [21] Ma, Fengying, et al. "An automatic
Transformation with LSTM." Arabian system for atrial fibrillation by using a
Journal for Science and Engineering CNN-LSTM Model." Discrete Dynamics
(2022): 1-17. in Nature and Society 2020 (2020).
[12] Ullah, Wusat, et al. "Classification of [22] He, Runnan, et al. "Automatic cardiac
arrhythmia in heartbeat detection using arrhythmia classification using
deep learning." Computational Intelligence combination of deep residual network and
and Neuroscience 2021 (2021). bidirectional LSTM." Ieee Access 7
[13] Dasan, Evangelin, and Ithayarani (2019): 102119-102135.
Panneerselvam. "A novel dimensionality [23] Wang, Jiacheng, and Weiheng Li. "Atrial
reduction approach for ECG signal via fibrillation detection and ECG
convolutional denoising autoencoder with classification based on CNN-BILSTM."
LSTM." Biomedical Signal Processing and arXiv preprint arXiv:2011.06187 (2020).
Control 63 (2021): 102225. [24] Jiang, Mingfeng, et al. "HADLN: Hybrid
[14] Ojha, Manoj Kumar, et al. "Automatic attention-based deep learning network for
detection of arrhythmias from an ECG automated arrhythmia classification."
signal using an auto-encoder and SVM Frontiers in Physiology 12 (2021).
classifier." Physical and Engineering [25] Jin, Yanrui, et al. "A novel attentional
Sciences in Medicine (2022): 1-10. deep neural network-based assessment
[15] Hu, R.; Chen, J.; Zhou, L. A transformer- method for ECG quality." Biomedical
based deep neural network for arrhythmia Signal Processing and Control 79
(2023):104064.

3186

You might also like