Professional Documents
Culture Documents
net/publication/338074469
CITATIONS READS
0 29
3 authors:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Mohammad Nooruddin on 18 March 2020.
Abstract—Electrocardiogram (ECG) is a graphical entire work was carried out in MATLAB. Databases used to
representation of the electrical activity of the heart which is train the system are:
obtained by placing various electrodes on some specific positions
of the body surface of the subject. Abnormalities in the ECG • The Physikalisch-Technische Bundesanstalt (PTB)
signal of a patient may indicate cardiac diseases that need to be
attended by physicians on an urgent basis. Hence, it is necessary
Diagnostic ECG Database
to detect an abnormal ECG for the betterment of the patient. • The MIT-BIH Normal Sinus Rhythm
Such a method to classify ECG signals whether they are normal Databaseprovided.
or abnormal is developed in this work. Angina, Bundle Branch
Block, Cardiomyopathy Heart Failure, Dysrhythmia,
Myocardial Hypertrophy, Myocardial Infarction, Myocarditis, The MIT-BIH Normal Sinus Rhythm Database includes
Valvular Heart Disease: all these cardiac conditions have been 18 long-term ECG recordings of subjects referred to the
classified as abnormal ECG signal in our work. First, statistical Arrhythmia Laboratory at Boston's Beth Israel Hospital (now
features like skewness, kurtosis, standard deviation of detail and
the Beth Israel Deaconess Medical Center). Subjects included
approximation coefficients of the Daubechies wavelet (db10) of
order 5 for a number of abnormal and normal ECG signals in this database did not have any significant arrhythmias; they
obtained in the feature extraction stage. Secondly, Support include 5 men, aged 26 to 45, and 13 women, aged 20 to 50.
Vector Machine (SVM) was used for classification which was The Physikalisch-Technische Bundesanstalt (PTB)
trained by the features extracted in the first stage. Finally, the Diagnostic ECG Datababase contains a total of 549 records
accuracy, sensitivity, specificity of this method was checked by from 290 subjects (age range 17-87, mean age 57.2; 209 men,
testing the SVM with 36 signals obtained from MIT-BIH mean age 55.5, and 81 women, mean age 61.6; ages were not
Normal Sinus Rhythm Database and 36 signals from PTB recorded for 1 female and 14 male subjects).
Diagnostic ECG Database which yielded an accuracy,
sensitivity, specificity 98.61%, 97.37%, 97.22% respectively.
In patient monitoring system, one of the parameters
Keywords—ECG, SVM, sinus, signals, coefficients, features, monitored constantly is the Electrocardiogram of the patient
sensitivity, accuracy, specificity. [4]. It is because if there is anything wrong with the patient’s
heart, the ECG will convey this information. The purpose of
I. INTRODUCTION this work is to classify a number of cardiac diseases as
abnormal ECGs using a fast and congenial method with high
ECG signals are obtained through non-invasive measure
efficacy. Such a method is needed if any kind of abnormality
which shows the electrical activity of the heart. Abnormalities
appears in the ECG, even a layman can understand it and
in ECG signal can indicate a case of medical emergency
notify the doctors.
which is needed to be taken care of immediately as it will
deteriorate the condition of the patient under observation. So,
Various papers have been published regarding detection
it is necessary to develop a method to classify the ECG signals
of abnormal ECG signals. These techniques primarily use
based on their shapes and characteristics whether they
various classifiers to classify the abnormal and normal ECG
indicate a cardiac disease or not [1].
signals. Some of them also use morphological features to
Cardiovascular (CVD) and circulatory diseases are the classify the ECG. The methods also vary in extracting
leading causes of death in the world. In 2013 there were more features though there are some similarities too. A strategy
than 54 million deaths (95% uncertainty interval [UI], 53.6– dependent on LabVIEW (Laboratory Virtual Instrument
56.3 million) globally and 32% of these deaths i.e. 17 million Engineering workbench) is described in [2]. The purpose of
(95% UI, 16.5–18.1 million), were due to CVD. Most of these LabVIEW signal processing tools is to denoise the signal
CVD deaths were found to be due to either ischemic heart before applying the developed algorithm for feature
disease (IHD) or cerebrovascular disease [2]. Hence, a system extraction. Primary feature that has been extracted are the R-
is required that will aid the physicians and diagnosticians in peaks which is done using Haar wavelet. For low resolution
detecting an abnormal ECG signal which resembles a signals daubechies (db6) wavelets are used. Other features
troubled cardiac condition. Such a system is developed used in this paper are Q wave width, T wave, P wave, R wave
through our proposed method. For this method to work with width, ST segment and T wave amplitude and duration.
high efficacy it is necessary to train it with a stiff database Frontal plane axis scoring pattern is applied for abnormality
that will enable it to separate a normal ECG from an abnormal detection. In this study Tachycardia, Bradycardia, Left
ECG [3]. This method is fast, easy and very accurate. The Ventricular Hypertrophy, Right Ventricular Hypertrophy and
Myocardial Infarction have been considered as abnormal II. METHODOLOGY
ECG. A wavelet coherence (WTC) technique has been For doing observation and analysis we have used ECG
proposed in [3] for ECG signal analysis. WTC is used to records which were collected from the MIT-BIH Normal
calculate the similarity between two waveforms in frequency Sinus Rhythm Database and were made available through
domain. Parameters extracted from WTC function is used as Physionet. The range of age of the subjects is 20-42 years.
the features of the ECG signal. These features are optimized
using Bat algorithm. The Levenberg Marquardt Neural A. Workflow of proposed feature extraction method
Network (LVNN) classifier is used to classify the optimized A simplified workflow of the feature extraction method is
features. Atrial fibrillation is classified as abnormal disease in described in this section. First a certain number of signals are
this work. The method proposed in [4] focuses on classifying selected for the purpose of feature extraction and training the
Myocardial Infarction as an abnormal ECG signal. In the Support Vector Machine (SVM). First, only the normal ECG
feature extraction stage, first segmentation of each ECG beat signals are selected. Then they are decomposed into 5 levels
is performed. Then every ECG beat is processed by flexible using Daubechies wavelets of order 10 (‘db10’) and their
analytic wavelet transform (FAWT) for decomposing into detail coefficients and approximation coefficients are
subband signals. Using these subband signals Sample entropy extracted. Skewness, Kurtosis, Standard Deviation of these
(SEnt) is computed. Finally in the classification stage, the coefficients are calculated which are the desired features [7].
sample entropy values are fed to a number of classifiers, Using these features, a feature matrix and a group matrix are
namely: J48 decision tree, Random Forest (RF), Least- created. A numerical value of ‘1’ is used in the group matrix
Squares Support Vector Machine (LS-SVM) and Back for normal ECGs. Same procedure is followed from the
Propagation Neural Network (BPNN). An approach based on beginning for abnormal ECGs with the exception being that a
Cross Wavelet Transform (XWT) is described in [5]. One numerical value of ‘0’ is used in the group matrix [8]. A block
way to measure similarity between two waveforms in time- diagram for the workflow is given in Figure 1.
domain is to find out the cross-correlation between the
signals. The Morlet wavelet is the mother wavelet used in this
paper. When XWT is applied to a pair of data, it gives us
Wavelet Cross Spectrum (WCS) and Wavelet Coherence Selecting a certain number of signals (both normal and
(WCOH). If the characteristics or pattern of the ECGs are abnormal)
different, then WCS and WCOH would demonstrate
distinguishing characteristics over two specific locales or
regions R1 and R2, where R1 stands for the QRS complex
and R2 stands for the T wave region. After marking Extract the ECG signals with normal sinus rhythm
discernible dissimilarities of the signals in R1 and R2, ECGs
are classified as normal and abnormal based on an appropriate
threshold.
5. Skewness, Kurtosis, Standard Deviation of each of 9. Identical operation is carried out for the other
D1, D2, D3, D4, D5 are calculated and stored in dimension of ECG signal for this record of normal
variables ske1, kur1, sd1; ske2, kur2, sd2; ske3, ECG [12].
kur3, sd3; ske4, kur4, sd4; ske5, kur5, sd5.
Therefore, a total of 15 features have been extracted. 10. Hence, the same operation is carried out for a total
of 14 times as there are 14 normal ECG signals.
6. Similar values for A1, A2, A3, A4, A5 are stored in
variables aske1, akur1, asd1; aske2, akur2, asd2; 11. Group matrix for normal ECG is created.
aske3, akur3, asd3; aske4, akur4, asd4; aske5, akur5,
asd5. Again a total of 15 features have been
12. In the same manner group matrix for 105 abnormal
extracted. So, there are a total of 30 features.
ECG signals is also created with the difference being
that a value of ‘0’ is assigned for indicating
abnormal ECG. This implies that same statistical
features have been extracted for abnormal ECG too.
So, the group matrix will have 119 rows and 1
column.
D. Performance Metrics
13. So, the final feature matrix will have 119 rows (since The performance of the abnormality detection method is
the total number of signals is 119) and 30 columns evaluated by the widely used metrics: accuracy (AC),
(total number of features are 30). sensitivity (SE), specificity (SP). These metrics are calculated
using the following equations:
The discrete wavelet changes (DWT) is an execution of the
wavelet transform utilizing a discrete arrangement of the
wavelet scales and interpretations complying with some ܶݏ݁݀ݎܿ݁ݎ݂݀݁݅݅ݏݏ݈ܽܿݕ݈ݐܿ݁ݎݎ݈ܿܽݐ
characterized standards. In other words, the signal is broken ܥܣൌ
ܶݏ݀ݎܿ݁ݎ݂ݎܾ݁݉ݑ݈݊ܽݐ
down into mutually orthogonal arrangement of wavelets
ൈ ͳͲͲΨ ǥ ǥ ǥ ǥ ሺͳሻ
using this transform, which is distinguishes itself the
continuous wavelet transform (CWT). [15]. ܶ݁ݒ݅ݐ݅ݏܲ݁ݑݎ
ܵ ܧൌ
C. Abnormality Detection Method ܶ ݁ݒ݅ݐ݅ݏܲ݁ݑݎ ݁ݒ݅ݐܽ݃݁ܰ݁ݏ݈ܽܨ
ൈ ͳͲͲΨ ǥ ǥ ǥ ǥ ǥ Ǥ Ǥ ሺʹሻ
1. The feature matrix and group matrix created in the
feature extraction stage are used to train the Support ܶ݁ݒ݅ݐܽ݃݁ܰ݁ݑݎ
ܵܲ ൌ
Vector Machine. ܶ ݏ݁ݒ݅ݐܽ݃݁ܰ݁ݑݎ ݁ݒ݅ݐ݅ݏܲ݁ݏ݈ܽܨ
ൈ ͳͲͲΨ ǥ ǥ ǥ ǥ ǥ Ǥ ሺ͵ሻ
2. Separate test matrices are created for normal and
abnormal (diseased) ECG signals for testing the
Support Vector Machine. The explanation of the terms True Positive (TP), True
Negative (TN), False Positive (FP), False Negative (FN) are
3. If the output of the SVM is ‘0’ then it means that given below:
SVM has classified the test signal as an abnormal
ECG signal. If the output is ‘1’, then it means SVM FP: Normal class classified as abnormal
has classified the test signal as a normal ECG signal. TP: Abnormal class classified as abnormal
FN: Abnormal class classified as normal
4. Calculate the accuracy as it is already known which TN: Normal class classified as normal
signal is normal and which one is not.
The performance metrics are explained here which are
going to be used to evaluate the performance of abnormality
Train the SVM with feature matrix and group detection method. Then SVM has been described
matrix comprehensively as it was instrumental in the completion of
this proposed work. A step by step workflow of the
abnormality detection method has been given too.
Create separate test matrices of normal and III. RESULTS AND DISCUSSION
abnormal ECG for testing the SVM Here, the important data for classifying abnormal ECG
signals are presented in tabular form. A final overall result is
presented in this chapter. The result and the procedure has
been compared with other pre-existing methods here later.
Record the output for abnormality detection A. Data Used For Feature Extraction
First, 7 recordings i.e. a total of 7 ECG records
representing Normal Sinus Rhythm were used for feature
Figure 7: Workflow for abnormality detection
extraction in our work. These signals were collected from
However, in our work we used Support vector machine MIT-BIH Normal Sinus Rhythm Database. Then the features
(SVM) which is a supervised learning method that analyzes of ECGs exhibiting Myocardial Infarction were extracted.
data and recognizes patterns, used for classification (machine The ECG records exhibiting Myocardial Infarction were
learning) and regression analysis. The standard SVM is a collected from PTB Diagnostic ECG Database. The records
binary linear classifier. A purpose of a binary classifier is to are given in Table I and Table II.
predict which of the two classes the input belongs. Hence, for
a set of training examples, each labeled as belonging to one Table I and Table II contain the records used for feature
of two categories, an SVM training algorithm fabricates a extraction and training the Support Vector Machine in order
model that predicts category or label of the of the input. to detect abnormal ECG signals. The records given in Table I
Intuitively, the examples that are used to build the SVM are taken from 7 subjects who exhibited normal sinus rhythm.
model can be thought of as points in space, mapped in such a All the ECG records are of same duration which made the
way that examples of the separate categories or labels are wavelet decomposition convenient as all detail coefficient
divided by a gap that can be as wide as possible. For every and approximation coefficient matrices at the same level had
new example, it is then mapped into that same space and the equal size. Skewness, Kurtosis, Standard Deviation of the
category of the example is predicted by utilizing the aforementioned records were then calculated.
information on which side of the gap they fall on.
TABLE I. ECG recordings of Normal Sinus Rhythm B. Overall Result
The following table includes the final output of our
Duration proposed i.e. it represents the SVM’s ability to detect
Record Age Sex
(Hour:Min:Sec) abnormal ECG signal.
16265m 32 years Male 2:10:12 TABLE III. Performance of the proposed abnormality detection method