0% found this document useful (0 votes)
23 views10 pages

Automated Arrhythmia Detection From Electrocardiogram Signal Using Stacked Restricted Boltzmann Machine Model

For summative
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views10 pages

Automated Arrhythmia Detection From Electrocardiogram Signal Using Stacked Restricted Boltzmann Machine Model

For summative
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Research Article

Automated arrhythmia detection from electrocardiogram signal using


stacked restricted Boltzmann machine model
Saroj Kumar Pandey1 · Rekh Ram Janghel1 · Aditya Vikram Dev1 · Pankaj Kumar Mishra2

Received: 24 November 2020 / Accepted: 29 April 2021

© The Author(s) 2021  OPEN

Abstract
Significant advances in deep learning techniques have made it possible to offer technologically advanced methods to
detect cardiac abnormalities. In this study, we have proposed a new deep learning based Restricted Boltzmann machine
(RBM) model for the classification of arrhythmias from Electrocardiogram (ECG) signal. The work is divided into three
phases where, in the first phase, signal processing is performed, including the normalization of the heartbeats as well
as the segmentation of the heartbeats. In the second phase, the stacked RBM model is implemented which extracts the
essential features from the ECG signal. Finally, a SoftMax activation function is used that classifies the ECG signal into
four types of heartbeat classes according to ANSI/AAMA standards. This stacked RBM model is offered as three types of
experiments, patient independent data classification for multi-class, patient independent data for binary classification,
and patient specific classification. The best result was obtained using patient independent binary classification with an
overall accuracy of 99.61%. For Patient Independent Multi Class classification, accuracy obtained was 98.61% and for
patient specific data, the accuracy was 95.13%. The experimental results shows that the developed RBM model has better
performance in terms of accuracy, sensitivity and specificity as compared to work mentioned in the other research papers.

Article highlights

• The proposed RBM model is skilled to automatically • The model is fully automatic, hence there is no require-
classify ECG heartbeat according to the ANSI- AAMI ment of additional system like feature extraction, fea-
standards with accuracy, Recall, specificity. ture selection, and classification.
• The performance of the RBM model to correctly classify
heartbeat classes was found to be improved.

Keywords Arrhythmia · Classification · Restricted Boltzmann machine (RBM) · Electrocardiogram signal · Patient
independent · Patient specific

* Saroj Kumar Pandey, [email protected]; Rekh Ram Janghel, [email protected]; Aditya Vikram Dev,
[email protected]; Pankaj Kumar Mishra, [email protected] | 1National Institute of Technology, Raipur, India. 2RCET-Bhilai Durg,
Bhilai, India.

SN Applied Sciences (2021) 3:624 | https://doi.org/10.1007/s42452-021-04621-5

Vol.:(0123456789)
Research Article SN Applied Sciences (2021) 3:624 | https://doi.org/10.1007/s42452-021-04621-5

1 Introduction
R
According to various reports from global health organi-
zations as well as the World Health Organization, cardio-
vascular diseases are primarily responsible for deaths
worldwide. Annually, the number of deaths from heart PR interval ST segment

diseases is higher than deaths due to any other disease.


P
Eighty five percent of all heart diseases are due to stroke
U
and heart attack. Generally, seventy five percent of cardiac T
deaths occur globally at places with lower income groups S
or middle ones. Cardiac arrhythmias and their long-term Q
effects are the main cause of cardiovascular diseases that QRS Complex

are overlooked in fatal issues.


Irregular heart rate usually results in a medical condition
Fig. 1  Normal class of ECG Signal
known as arrhythmia. It is basically a rhythm conduction
disorder and arrhythmia have a crucial significance in ECG
abnormalities [1, 2]. Malignant cardiac arrhythmias and in literature are discussed below for the analysis of ECG
other abnormalities that cause great harm can be identi- signal. In [3], Shensheng Xu et al. suggested Deep Learning
fied using electrocardiography. In this process electrode is techniques with heartbeat segmentation and alignment
placed on the chest part of the patient’s body which helps that facilitates end-to-end classification of raw ECG signal
in detecting the electrical activities of the patient’s heart into different types of heartbeats, i.e. (N), (S), (V), (F) and
[3]. Typically, ECG sessions are to record long-term data (Q). Different time-domain positions are drawn out from
and assess physicians and doctors’ studies and assess the raw signals, and from a sliding time-window consecutive
waveform to determine if the patient is under any poten- vectors are extracted. The vectors comprise different spots
tial health risk and if whether a cardiac abnormality is pre- of a full heartbeat cycle. Here, the essential and important
sent. This entire process takes a lot of time. Subsequently, QRS complex along with P wave and T wave arranged. The
detection of heart arrhythmia in the medical field is very proposed classifier performs proportional to other patient-
important for timely diagnosis by doctors and physicians. specific classification methods, but the advantage is that
In the efficacy of giving proper performance of ECG it provides the added efficacy of employing patient inde-
in recording heart activity, a lot of training is required to pendent approach to the data as well.
properly examine and determine ECG tracing. Arrhyth- Further, Kiranyaz et al. in [5] has fused the two impor-
mia can be symptomatic or asymptomatic where some tant pillars of the ECG classification, feature extraction
potentially dangerous arrhythmia is present without and classification into one single entity using an adaptive
any symptoms. In arrhythmias that show symptoms in implementation of 1-D convolutional neural networks
patients, symptoms may vary due to general dizziness, (CNNs). After a dedicated CNNs model is trained for an
difficulty in breathing, and irregular heartbeat that may individual patient, the speed and efficiency achieved in
be due to agitation. Many external factors and habits may the research paper can individually be used to distinguish
cause arrhythmias, some of which are very high sugar lev- classify the patient’s long ECG records. Runchuan li et al. [5]
els, mental stress, excessive smoking, hypertension etc. A has used bidirectional long-short term memory (Bi-LSTM)
normal person may have a slow-paced heartbeat and a attention neural network model for ECG classification.
slow heartbeat does not always account as a symptom. De-noising of signal is done using continuous wavelet
Valuable information can be derived from the classifica- transform. Subsequently, R-peak is detected following
tion results which are important for diagnosis of the risk which the R-R interval and P-QRS-T waves morphology
of arrhythmias or sudden deaths such as the presence of is extracted. The Bi-LSTM algorithm along with Bi-LSTM-
non-sustained sustained ventricular tachycardia and ven- Attention algorithm is employed to segregate the cor-
tricular premature beats and for further inspection, for responding correct category of heartbeats respectively,
example, for heart rate turbulence [4]. The following Fig. 1 and the database used is the MIT-BIH arrhythmia database
shows the normal class of ECG heartbeat signal. (AD), for the purpose of verification of the algorithm.
The main work here is to focus on two parts classifica- In [6], Nurmaini et al. has suggested an automated
tion, and feature extraction. There are various deep learn- classification system for cardiovascular disease monitor-
ing approaches which are employed for the analysis of ECG ing and detection using a Deep Learning technique. The
signal. The numerous approaches in deep learning used proposed Deep Learning architecture is further divided
into Deep Neural Networks which is used as a classifier,

Vol:.(1234567890)
SN Applied Sciences (2021) 3:624 | https://doi.org/10.1007/s42452-021-04621-5 Research Article

and Deep Auto-Encoders, which is used as an unsuper- study, the potential of the suggested methodology was
vised method of feature learning. Haotian Shi et al. [7] evaluated on the conventional database i.e., MIT-BIH AD
have proposed a compound input layer deep structure which pertains to ANSI/AAMI standardization. According
which consists of CNN-LSTM network. Four input layers to our results analysis and investigation on the MIT-BIH
are constructed after taking two things into consideration AD, the suggested method out-performs the current
i.e., Heartbeat segments and RR interval features. Differ- advanced deep learning and machine learning methods.
ent strides of 2–1–2 are used and the initial three inputs We choose to use stacked RBM’s for Patient-Specific and
are convolved using the different strides. The resulting Patient-Independent data. In this study, material and
outputs from the layers of CNN are then joined and fed methods used have been described in Sect. 2, while the
to the LSTM nets. In this, two fully connected layers are heartbeat normalization and segmentation and an over-
employed, and their resulting output is joined with the view of RBM model is defined along with the working
fourth input. The predicted label is eventually the output of the proposed model in the same section. The experi-
from the last connected layer. mental results for all experiments carried out have been
Further in [8], Kachuee et al. has proposed a method discussed in Sect. 3. The subsequent Sect. 4 contains the
used for the accurate classification of heartbeats into discussion part of the study. The conclusion is discussed
five different arrhythmias with respect to the AAMI EC57 in Sect. 5.
standard using deep CNNs. Further, a method is suggested
for deploying all the essential knowledge to the myocar-
dial infarction (MI) classification task which was initially
acquired on the given task. The suggested method is 2 Materials and method
evaluated on PhysioNet MIT-BIH AD and PTB Diagnostics
dataset. In Fig. 2, the architectural diagram of our proposed
Mousavi et al. [9] has proposed a method to fulfill the model is depicted. The diagram illustrates the steps
shortcomings of current classification methods by employ- involved for ECG signal classification. After normaliza-
ing an automated heartbeat classification method using tion of the database on the raw ECG signal, heartbeat
deep CNNs to sequence the models. The suggested segmentation is performed. The database is then divided
method is trained and tested on the popular MIT-BIH into training and testing. The training dataset is fed as
AD, considering the inter-patient and intra-patient para- an input to the stacked RBM network. Then the output
digms and essential standards. In [10], Pandey et al. has from the network is validated, and other metrics are
proposed an 11-layer deep CNNs model for the classifi- calculated.
cation of arrhythmia into the standard five classes as per
the ANSI–AAMI standards. The database used here is MIT-
BIH AD. In the model, an end-to-end structure method is 2.1 MIT‑BIH arrhythmia database (AD)
designed for classification and applied without applying
noise removal. Therefore, this method results in the reduc- In this paper, MIT-BIH AD is used for the arrhythmia clas-
tion in number of classifications and even the necessity to sification [12] keeping forty-eight records of half an hour
detect and segment QRS complexes is removed. Further each. These recordings are taken from 2-leads i.e., MLII
Sannino et al. [11] has suggested an inventive deep learn- and V5. There is a total of 47 subjects: 22 women, where
ing methodology where the deep neural network classifier their age varies from 23 to 89 and 25 men, where their
employed here creates all the neuron layers, based on the age varies from 32 to 89 [3, 13]. Each record contains
ReLU activation function. uninterrupted readings of ECG signals from an individual
Inspired by these literatures, we present a deep subject, except for two records i.e., 201 and 202. The data
learning based on the RBM model to classify arrhyth- from the two mentioned records were taken from only
mia heartbeat into four distinct classes that determine one male subject. There are four records having paced
arrhythmia more effectively. The novelty of this paper beats of 102,104,107 and 217 in the dataset which are
is that we have proposed an end-to-end classification generally not taken for classification purposes. The data-
system using the stacked RBM model with SoftMax func- set has two channels of information where the channel
tions. This RBM model works automatically to classify was an "altered appendage lead II" (MLII), and the other
ECG heartbeats from a database without using any hand- channel was generally V1 (or V2, V4, V5, up to Subjects).
crafted feature extraction methods. This model performs In our experiments in this paper, only the lead MLII
better for both patient-specific and patient-independ- was used because normal QRS complexes are usually
ent data for the classification of heartbeats than cur- more dominant and prominent as compared to V5.
rent works in state-of-the-art methods. In our proposed Further in this work, AAMI protocol is consented, and a

Vol.:(0123456789)
Research Article SN Applied Sciences (2021) 3:624 | https://doi.org/10.1007/s42452-021-04621-5

Fig. 2  Workflow Diagram of RBM Model for classification of ECG signal

Table 1  The relation between ECG heartbeat labels to ANSI-AAMI Standards [29]
ANSI-AAMI Classes Beat N Beat S Beat V Beat F Beat Q

MIT-BIH arrhythmia Normal (N) Aberrated atrial prema- Ventricular Fusion of Normal Unclassified beats (U)
database classes ture beats (a) escape and Ventricular
beats (E) beats (F)
Left Bundle Branch Block Supraventricular prema- Premature Paced beats (P)
(L) ture beats (S) ventricular
contrac-
tion (V)
Right bundle branch Atrial premature (A) Fusion of Normal and
block (R) Paced Beats (f )
Aterial Escape (e) Contraction Nodal Pre-
mature beats (J)
Nodal escape (j)

proper mapping of all ECG heartbeat marks is done with


Train Records [30] 101, 106, 108, 109, 112, 114, 115,
AAMI names as per the mapping information provided in 116, 118, 119, 122, 124, 201,
Table 1. The dataset in this examination contains all five 203, 205, 207, 208, 209, 215,
types of beats which are Normal beats (N), Supra Ven- 220, 223, 230
tricular Ectopic (SVEBs), Ventricular Ectopic (VEBs), com- Test Records 100, 103, 105, 111, 113, 117, 121,
123, 200, 202, 210, 212, 213,
bination of ventricular and ordinary (F) and unknown
214, 219, 221, 222, 228, 231,
beats (Q) [14]. The whole MIT-BIH AD is segregated into 232, 233, 234
Train dataset (DS1) and Validation or test dataset (DS2)
for patient specific classification [15]. Each database con- In this study, the entire MIT-BIH AD is divided into
tains information from 22 records [16]. two sections. In the context of the segmentation of the
above records, we see that there are two sections, one
is the training dataset and the other is the test dataset.

Vol:.(1234567890)
SN Applied Sciences (2021) 3:624 | https://doi.org/10.1007/s42452-021-04621-5 Research Article

Here, for proper and efficient training of the model, we Here, we are using consecutive heartbeats. Following
use the training dataset, while validation is performed which we are dissecting the sample of 3 heartbeats in such
on the test dataset to check the performance of the RBM a way that we get a full ECG signal comprising of all essen-
model. tial segments namely P wave, QRS, and T wave. Figure 3
clearly depicts how we have got a full ECG signal with all
2.2 Heartbeats normalization successor and predecessor waves. In Fig. 3, t represents the
sample positions of an ECG signal, while the voltage at
Heartbeat Normalization is an essential step to preprocess- time t is depicted by v(t) (in millivolts), jth R peak is repre-
ing as it helps us to remove unnecessary information in the sented by ­Rj, and ­Rj has the time index TRj [3].
form of noise and get the signal with the maximum essen- After segmenting the heartbeat, we get the jth heart-
tial information. Usually, the z-score method or technique ⌊ ( ­H j, which
beat )⌋ comprises
⌊ ( of sample
)⌋ points between
is employed for the above purpose. Initially, we compute 1 1
TRj−1 + TRj and 2 TRj + TRj+1 where ⎿a⏌ means
2
(μ), which is the statistical mean value of all amplitude val-
an integer floor function.
ues present in each subject of MIT-BIH AD, and then the
For each heartbeat, there is several samples (D) that needs
difference between the mean (μ) and the amplitude point,
to be set. Henceforth, after measuring the time durations of
which is x (i)–(μ) is calculated. Ultimately the result from
all the segmented beats, we found a value that is greater
the above calculation is divided by the standard devia-
than Ninety Five percent of all durations. This value must be
tion (σ) of the waveform. Equation 1 described below is
then applied to all complete heartbeats for further process.
employed to normalize all amplitude values.
Z = (x(i) − 𝜇)∕𝜎 (1) 2.4 Restricted Boltzmann machine (RBM) model

RBM is an exclusive kind of Markov random field which has


2.3 Heartbeat segmentation both stochastic visible as well as hidden layer [17]. A bipar-
tite graph can be used to represent RBM which shows that
For extraction of a full heartbeat from the ECG signal, there information flows bi-directionally during the training and
is a necessity to describe what one cycle of heartbeat is usage of the network along with both directions having
and then do segmentation on the same data. Our main the same weight. In RBM the joint probability distribution
aim is to get complete heartbeat with all the waves so that function p (v, h; θ) over the hidden units h and visible unit’s
complete information can be extracted. In MIT-BIH AD, the v, with the model parameters being θ, can be represented
ECG signal is recorded by the cardiologist along with the using an energy function E (v, h; θ) of [17]
annotation files containing the information. Each heart-
beat is segmented with its R peak values ​​based on the p(v, h;𝜃) =
exp(−E(v, h;𝜃))
(2)
information in the annotation files. The R-peak is the Z
center of the heartbeat and contains most information.

Fig. 3  An illustration for the heartbeat segmentation processes

Vol.:(0123456789)
Research Article SN Applied Sciences (2021) 3:624 | https://doi.org/10.1007/s42452-021-04621-5

∑∑
where partition function Z = exp(−E(v, h;𝜃)) with the When label information is present, it can be applied along
v h with unlabeled information to form joint data set. To opti-
marginal probability for visible vector v is assigned by the
mize the imprecise generative objective function associ-
model
ated with information likelihood the contrastive diver-

exp(−E(v, h;𝜃)) gence (CD) learning algorithm is applied. CD algorithm
p(v;𝜃) = h (3) is a simple technique used for training an RBM and was
Z
developed by Hinton [19].
For a RBM Bernoulli (visible unit), Bernoulli (hidden unit), Encoding dependencies between variables can be said
the energy function is defined as to be one of the purposes of using DL. The dependencies
I J I J are captured by associating a scalar energy for each con-
∑ ∑ ∑ ∑
E(v, h;𝜃) = − wi,j vi hj − bi vi − aj hj (4) figuration of the variables, which works as a measure of
i=1 j=1 i=1 j=1 compatibility. The main aim of any energy-based model is
to minimize some predefined energy function. The RBM
The symmetric interaction term between visible unit vi model training procedure is around the whole idea of
and hidden unit hj , is represented by wij and bi and aj repre- getting the best suited parameters so that the minimum
sent the bias terms, where I and J are the index numbers of energy state could be reached.
visible and hidden units. Similarly, for a Gaussian (visible)
and Bernoulli (hidden) RBM, the energy is
I J I J 2.4.1 Working of the proposed RBM model
∑ ∑ 1∑ ∑
E(v, h;𝜃) = − wij vi hj − (bi − vi )2 − aj hj (5)
i=1 j=1
2 i=1 j=1 In the stacked RBM network, we have used Bernoulli-RBM
from scikit-learn libraries of Python where we have used
The corresponding conditional probability become. three different RBM layers. The designed deep neural net-
( I ) work has three RBM layers with a layer structure of 416-
( ) ∑
p hj = 1|v;𝜃 = 𝜎 wij vi + aj (6) 100-100-100-5. The last two layers are the dense layers.
i=1 Eventually after the network has been designed the cal-
culated weights and biases are stored. In the sequential
( J
) model the last two layers which are the dense layers are
( ) ∑
p vi |h;𝜃 = N wij hj + bi , 1 (7) added to give the final result. For each layer of the net-
j=1 work, no. of iterations is set as 100.The first dense layer
uses ReLU as its activation function. The output from the
In this equation, vi follows a mean of Gaussian distribu-
∑J third layer of stacked RBM network is fed to the first dense
tion j=1 (wij hj + bi ) with variance 1 and takes real values
layer. The stored weights are then set to the layers. The last
[17]. All stochastic variables that have a real value can be
dense layer is used to classify the result into four classes
converted to variables having two values using Gaussian
where SoftMax [20] is employed as the activation function
Bernoulli. This can then be processed further by using Ber-
with Adam optimizer and categorical cross entropy as the
noulli- Bernoulli RBMs. A revised rule for setting up the
loss function.
weights of the RBM can be obtained using the gradient
of log likelihood.
( ) ( )
Δw = Edata vi hj − Emodel vi hj (8)
( )
3 Experimental results
where Edata vi hj the (expectation
) of is perceive in the
training set and Emodel vi hj is that same prediction under In this study, the experiment is performed using dual Intel
the distribution defined by the model. The model above Xeon E5-2600 with a 2.4 GHz processor, 64 GB RAM and
is generative RBM model where the distribution of input Keras library of Python. We have also tested the model
data is applied to the hidden variables and it also holds for various performance metrics. In this proposed study,
unlabeled. The contrastive divergence (CD) learning algo- stacked RBM classifier is used for detecting 4 types of
rithm [18] is usually administered to optimize the coarse- arrhythmias which also include the normal heart rhythms.
grained generative objective function and is used here for The accuracy of the model has been calculated and results
the training of an RBM model. have been compared with all the state of art methodolo-
The description discussed above is a generative model gies. The proposed methodology’s performance is evalu-
of RBM and identifies the input data distribution applied ated for every category of ECG signal. The performance of
to hidden variables which involves unlabeled information. the model is based on metrics like specificity, sensitivity

Vol:.(1234567890)
SN Applied Sciences (2021) 3:624 | https://doi.org/10.1007/s42452-021-04621-5 Research Article

Table 2  Performance of the Train test Ratio→ 50–50 (%) 60–40 (%) 70–30 (%) 80–20 (%) 90–10
Stacked RBM classifier for (%)
Patient Independent Data
Overall Accuracy 98.41 98.61 98.51 98.59 98.10
Class N SEN 99.37 99.46 99.57 99.44 99.23
SPC 96.09 96.64 97.28 96.54 95.39
Class S SEN 81.41 84.49 80.88 83.87 80.07
SPC 99.49 99.58 99.50 99.57 99.43
Class V SEN 95.75 96.05 95.15 96.15 94.58
SPC 99.67 99.70 99.63 99.70 97.14
Class F SEN 72.72 76.28 69.69 73.86 72.22
SPC 99.79 99.81 99.76 99.77 99.75
Average SEN 87.31 89.07 86.32 88.33 86.53
SPC 98.76 98.93 99.04 98.89 97.93

Table 3  Performance of other classifiers and our classifier on Table 4  Performance of other
Patient Independent data classifiers and our classifier on Overall accuracy 99.61%
Patient Independent data Class N SEN 99.88%
Authors Proposed Classifier Overall SPC 98.57%
Accuracy
(%) Class V SEN 96.38%
SPC 99.70%
Pandey et al. [10] 11-layer CNN Model 98.3
Acharya et al. [23] Deep CNN Model 94.03
Proposed Work Stacked RBM 98.61
mean that training and testing datasets have similar sub-
jects (Patient) heartbeats, that is, training datasets may
and overall accuracy which is calculated with the help of include similar beats. The overall accuracy along with the
true positive, false positive, true negative and false nega- sensitivity and specificity of class N, S, V and F is depicted
tive values of the confusion matrix [21, 22]. in the table. Since the major portion for cause of arrhyth-
Sensitivity can be calculated as- mias is because of S and V classes, their sensitivity and
specificity have been highlighted in the results.
Tp ∗ 100
SE = (9) From Table 2 it is clear that the best average sensitivity
TP + FN and specificity for all class is 89.07% and 99.04% respec-
tively. Overall, the classifier performs best for 60–40 ratio
Specificity can be calculated as-
with the best overall accuracy of 98.61%, sensitivity of
TN ∗ 100 89.07% and specificity of 98.93%.
Sp = (10) Table 3 shows the comparison table between the vari-
T N + FP
ous studies mentioned in [10, 23] and the proposed work.
Accuracy can be calculated as- The comparison is done on the basis of the overall accu-
racy achieved by the models.
(TP + TN ) ∗ 100
Accuracy = (11) The proposed model has got an accuracy of 98.61%
T P + F N + TN + F P
where classification is done into 5 beats namely N, S, V,
The average accuracy is calculated by finding the mean F and Q.
of individual accuracies of each class.
3.2 Experiment IInd (Patient independent binary
classification)
3.1 Experiment 1st (Patient independent multi
class classification for different train‑test ratios) In experiment 2, our stacked RBM model is performed for
binary class classification where we are using two classes
The architectural model used for classification in all the i.e. N and V. In Table 4, since class V is the most prominent
experiments performed is shown in the Fig. 2 above. cause for fatal arrhythmias, a binary classification is per-
Table 2 depicts the Patient Independent ECG Signal clas- formed between normal beats and premature ventricular
sification results of our model. Patient independent data contraction heartbeats. The results in termed of overall
accuracy, sensitivity and specificity are mentioned for

Vol.:(0123456789)
Research Article SN Applied Sciences (2021) 3:624 | https://doi.org/10.1007/s42452-021-04621-5

Table 5  Performance of other classifiers and our classifier on work. The proposed Stacked RBM DNN gets a good overall
Patient Independent data for binary classes accuracy of 95.13%. We have used D = 416 for each vector,
Metrics Jun et al. [24] Proposed Work which means that the network has 416 inputs nodes and
(%) 5 output nodes, wherein each resulting output node maps
to one specific class in the Table 1. The table also shows the
Overall accuracy 99.41% 99.61
average specificity and sensitivity which are 93.33% and
SEN of Class V 96.08% 96.38
81.13% respectively.
SPC of Class V Did Not Specify 99.70

4 Discussion
both the heartbeats. The classifier has achieved an overall
accuracy of 99.61%. In the proposed Stacked RBM classifier over the numer-
Jun et al. [24] for the purpose of beat detection, pro- ous literature methodologies, we have used raw signal for
posed the use of DNN with 6 hidden layers of PVC signal automated feature extraction [25, 26]. The classification
established on the popular MIT-BIH AD. In the paper, a performance evaluation of our proposed method was
2-class issue was worked upon wherein the normal and discovered to be very good and a lot better as compared
PVC beats were drawn out for evaluation. Differentiating to the existing systems that work on Patient independ-
this with the raw signal extraction, six number of features ent data. Further, without expert interference, the per-
were used for representation of a heartbeat including the formance of the model is still comparable to many other
amplitudes of P, Q and R peaks, RR interval, QRS complex systems which use patient specific data. The proposed
duration and the important ventricular activation time. stacked RBM can overcome any drawbacks by using raw
The Table 5 shows the comparison based on Overall ECG wave forms which are aligned as input to get proper
Accuracy, Sensitivity and Specificity in the paper by Jun and better representations for classification purposes.
et al. [24], and the proposed work on binary classification In [23], Acharya et al. has used a Deep CNN model with
with respect to patient independent data. Comparing with a computer aided diagnosis (CAD) system for accurate
the classification process of 5-classes in the previous sub- assessment of ECG signals. Our proposed method on the
part, two class classifications are easier. other side has used Stacked RBM which has given a better
result in terms of specificity and sensitivity. Further, Sand-
3.3 Experiment IIIrd (Patient specific for multi class eep et al. in [27] has used PSO and optimization techniques
classification) along with feature extraction for ECG signal classification.
The accuracy and other metrics of our model are better
In the third experiment, we use two data sets one for train- than the accuracy achieved in the study. Shadmandet al.
ing (DS1) and other for testing (DS2) i.e., a patient spe- in [28] has used Particle Swarm Optimization algorithm for
cific regime is followed. Henceforth, DS1 and the first 300 training the block based neural network which has been
sample heartbeats of DS2 dataset records are used for the used as a classifier. The accuracy calculated is around 97%
training of the model while the remaining sample heart- which is less than the accuracy of our proposed model.
beats are used for testing of the proposed model. In [6], Zubair et al. has used CNN on the raw signal which
In Table 6, we have shown the metrics like accuracy, sen- negates the need for any handcrafted features. Our model
sitivity, and specificity for optimum results in the proposed
Table 7  Performance Comparison table for Patient Independent
Data of various classifiers with our classifier
Table 6  Performance of our
Overall accuracy 95.13% Authors Proposed Classifier Overall
classifier for Patient Specific/
Class N SEN 96.51% Accuracy
Patient-oriented data
(%)
SPC 75.21%
Class S SEN 72.42% Zubair et al. [6] Deep CNN model 92.7
SPC 98.90% Kachuee et al. [8] Deep CNN 93.4
Class V SEN 93.74% Pandey et al. [10] 11-layer CNN Model 98.3
SPC 99.54% Sannino et al. [11] DNN consisting of ANN 99.68
Class F SEN 61.86% Acharya et al. [23] Deep CNN Model 94.03
SPC 99.67% Sandeep Raj et al. [27] Thresholds + Rules 97.96
Average SEN 81.13% Shadmand et al. [28] Block based neural network 97
SPC 93.33% Proposed Work Stacked RBM 98.61

Vol:.(1234567890)
SN Applied Sciences (2021) 3:624 | https://doi.org/10.1007/s42452-021-04621-5 Research Article

has also performed on raw ECG signal and given better Declarations
accuracy as compared to the paper [6]. In [8], Kachuee
et al. have used a Deep CNN to perform arrhythmia clas- Conflict of interest Authors Saroj Kumar Pandey, Rekh Ram Janghel,
sification and transferring the knowledge of the above task Pankaj Mishra, and Aditya Vikram dev declares that they have no
conflict of interest.
to Myocardial Infarction task. Further in [10], Saroj et al.
has proposed an 11-layer model. The CNN model has used Open Access This article is licensed under a Creative Commons Attri-
end-to-end structure for classification, but our proposed bution 4.0 International License, which permits use, sharing, adap-
model has done heartbeat segmentation and a stacked tation, distribution and reproduction in any medium or format, as
RBM layered network to adjust the weights and biases long as you give appropriate credit to the original author(s) and the
source, provide a link to the Creative Commons licence, and indicate
for the best learning possible. In [11], Sannino et al. has if changes were made. The images or other third party material in this
denoised the signal, and performed heartbeat segmenta- article are included in the article’s Creative Commons licence, unless
tion and temporal feature extraction after which Artificial indicated otherwise in a credit line to the material. If material is not
neural network is used for arrhythmia classification. included in the article’s Creative Commons licence and your intended
use is not permitted by statutory regulation or exceeds the permitted
Overall, as compared to all the studies mentioned in use, you will need to obtain permission directly from the copyright
Table 7, the proposed Stacked RBM gave a very good over- holder. To view a copy of this licence, visit http://​creat​iveco​mmons.​
all accuracy of 98.61% for patient independent data. For org/​licen​ses/​by/4.​0/.
binary classification also the results were good with an
overall accuracy of 99.61% and for patient specific data
the accuracy is 95.13%.
References
1. Li R et al (2019) Interpretability analysis of heartbeat classifica-
tion based on heartbeat activity’s global sequence features and
5 Conclusion BiLSTM-attention neural network. IEEE Access 7:109870–109883
2. Li J, Riqing C (2018) Detection of premature ventricular con-
The proposed RBM model works on the patient-inde- tractions using densely connected deep convolutional neural
pendent scheme for multiclass and binary classification network with spatial pyramid pooling layer. arXiv preprint arXiv:​
1806.​04564
along with a patient dependent classifier. In this study, 3. Xu SS, Mak M-W, Cheung CC (2018) Towards end-to-end ECG
we have used the popular MIT-BIH arrhythmia database classification with raw signal extraction and deep neural net-
which is a popular patient-specific dataset to segregate works. IEEE J Biomed Health Inform 23(4):1574–1584
the heartbeats into 4 different classes. The four classes 4. Lin C-C, Yang C-M (2014) Heartbeat classification using nor-
malized RR intervals and morphological features. Math Probl
consist of one normal heartbeat and 3 abnormal heart- Eng. Vol 2014
beats namely SVEB, VEB, and F. Further, we used Stacked 5. Serkan K, Ince T, Gabbouj M (2015) Real-time patient-specific
RBM for patient-independent data classification for mul- ECG classification by 1-D convolutional neural networks. IEEE
ticlass, patient-independent binary classification and Trans Biomed Eng 63(3):664–675
6. Zubair M, Kim J, Yoon C (2016) An automated ECG beat clas-
patient-specific classification. The best result was obtained sification system using convolutional neural networks. Paper
using patient-independent classification with an overall presented at 2016 6th international conference on IT conver-
accuracy of 98.61%. For patient-independent binary clas- gence and security (ICITCS). IEEE
sification, accuracy obtained was 99.61% and for patient 7. Shi H et al (2019) Automated heartbeat classification based on
deep neural network with multiple input layers. Knowl-Based
specific data, the accuracy obtained was 95.13%. In this Syst 188:105036
paper one end of our proposed system takes raw signals, 8. Kachuee M, Fazeli S, Sarrafzadeh M (2018) Ecg heartbeat clas-
following which the heartbeat segmentation takes place sification: a deep transferable representation. 2018 IEEE inter-
and eventually the other end of the system gives beat-by- national conference on healthcare informatics (ICHI). IEEE
9. Mousavi S, Afghah F (2019) Inter-and intra-patient ecg heart-
beat results on classification. The proposed algorithm has beat classification for arrhythmia detection: a sequence to
worked really well for patient-independent classification sequence deep learning approach. ICASSP 2019–2019 IEEE
for multiclass and binary class and has worked compara- international conference on acoustics, speech and signal pro-
bly well for patient-dependent data. The biggest drawback cessing (ICASSP). IEEE
10. Pandey SK, Janghel RR (2019) Automatic detection of arrhyth-
of this RBM model is that it requires specialized hardware mia from imbalanced ECG database using CNN model with
(GPU) and a large dataset to properly train it, because of SMOTE. Australas Phys Eng Sci Med 42(4):1129–1139
which computational time seems to be higher than usual 11. Sannino G, De Pietro G (2018) A deep learning approach for
classifies but at the same time it offers a better reliability ECG-based heartbeat classification for arrhythmia detection.
Futur Gener Comput Syst 86:446–455
in identifying different patterns. 12. Ye C, Vijaya Kumar BVK, Coimbra MT (2015) An automatic
subject-adaptable heartbeat classifier based on multiview
learning. IEEE J Biomedi Health Inform 20(6):1485–1492

Vol.:(0123456789)
Research Article SN Applied Sciences (2021) 3:624 | https://doi.org/10.1007/s42452-021-04621-5

13. De Chazal P (2013) A switching feature extraction system for 23. Acharya UR et al (2017) Automated detection of arrhythmias
ECG heartbeat classification. Comput Cardiol. IEEE using different intervals of tachycardia ECG segments with con-
14. Chen X, Wang Y, Wang L (2018) Arrhythmia recognition and volutional neural network. Inform Sci 405:81–90
classification using ECG morphology and segment feature 24. Jun, TJ, et al. (2019) Premature ventricular contraction beat
analysis. IEEE/ACM Trans Comput Biol Bioinf 16(1):131–138 detection with deep neural networks. 2016 15th IEEE inter-
15. Pandey SK, Janghel RR, Vani V (2020) Patient specific machine national conference on machine learning and applications
learning models for ECG signal classification. Proc Comput Sci (ICMLA). IEEE
167:2181–2190 25. Isin A, Ozdalili S (2017) Cardiac arrhythmia detection using deep
16. Mondéjar-Guerra V et al (2019) Heartbeat classification fusing learning. Proc Comp Sci 120:268–275
temporal and morphological information of ECGs via ensem- 26. Fujita H, Cimr D (2019) Decision support system for arrhythmia
ble of classifiers. Biomed Signal Process Control 47:41–48 prediction using convolutional neural network structure with-
17. Pandey SK, Janghel RR (2019) Recent deep learning tech- out preprocessing. Appl Intell 49(9):3383–3391
niques challenges and its applications for medical healthcare 27. Raj S, Ray KC (2018) Sparse representation of ECG signals for
system: a review. Neural Process Lett 50(2):1907–1935 automated recognition of cardiac arrhythmias. Expert Syst Appl
18. Fischer A, Igel C (2012) An introduction to restricted Boltz- 105:49–64
mann machines. Iberoamerican congress on pattern recogni- 28. Shadmand S, Mashoufi B (2016) A new personalized ECG signal
tion. Springer, Berlin, Heidelberg classification algorithm using block-based neural network and
19. Hinton GE (2002) Training products of experts by minimizing particle swarm optimization. Biomed Signal Process Control
contrastive divergence. Neural Comput 14(8):1771–1800 25:12–23
20. Savalia S, Emamian V (2018) Cardiac arrhythmia classification 29. Ye C, Vijaya Kumar BVK, Coimbra MT (2012) Heartbeat classifica-
by multi-layer perceptron and convolution neural networks. tion using morphological and dynamic features of ECG signals.
Bioengineering 5(2):35 IEEE Trans Biomed Eng 59(10):2930–2941
21. Hasan NI, Bhattacharjee A (2019) Deep learning approach to 30. Mathews SM, Kambhamettu C, Barner KE (2018) A novel applica-
cardiovascular disease classification employing modified ECG tion of deep learning for single-lead ECG classification. Comput
signal from empirical mode decomposition. Biomed Signal Biol Med 99:53–62
Process Control 52:128–140
22. Raj S, Maurya K, Ray KC (2015) A knowledge-based real time Publisher’s Note Springer Nature remains neutral with regard to
embedded platform for arrhythmia beat classification. Biomed jurisdictional claims in published maps and institutional affiliations.
Eng Lett 5(4):271–280

Vol:.(1234567890)

You might also like