Support Vector Machine Based Heartbeat Classification: N P Joshi, P S Topannavar
Support Vector Machine Based Heartbeat Classification: N P Joshi, P S Topannavar
Abstract- In this paper, a new approach for heartbeat classification is proposed. The system uses the combination of
morphological and dynamic features of ECG signal. Morphological features extracted using Wavelet transform and
independent component analysis (ICA). Each heartbeat undergoes both the techniques separately. The dynamic features
extracted are RR interval features. Support vector machine is used as a classifier, after concatenating the results of both the
feature extraction techniques, to classify the heartbeat signals into 16 classes.Whole process is applied to both the lead
signals and then the classifier results are fused to make final decision about the classification. The overall accuracy in
classifying the signals from MIT-BIH arrhythmia database should be 99% in “class-oriented” evaluation and an accuracy of
86% in the “subject-oriented” evaluation.
Keywords- Heartbeat Classification, Support Vector Machine, Independent Component Analysis, Wavelet Transform.
54
International Journal of Advances in Science Engineering and Technology, ISSN: 2321-9009 Volume- 2, Issue-3, July-2014
55
International Journal of Advances in Science Engineering and Technology, ISSN: 2321-9009 Volume- 2, Issue-3, July-2014
degraded to some extent because of addition of the in DWT. These coefficients are thus extracted as the
error by the automatic R peak detector. The sampling wavelet features.
rate is given as 360 Hz. Hence in each heartbeat
segment there are 100 samples before the R peak C. Independent component analysis- Morphological
location as the pre-R segment & 200samples after the Feature extraction
R peak as the pro-R segment, i.e.,a total of 300
samples. The 300 samples correspond to 0.83s. The In this study, ICA is used for feature extraction. Five
segment size is selected such that it includes most of sample beats are randomly selected from every class
the information of one heart cycle. The segment size for preparation of training set. These training sets are
of heartbeat is kept fixed. The ratio of lengths of the used to compute Independent components. If the total
pre-R segment and the pro-R segment is kept so that number of beats in any of the recording is less than
it matches with lengths of PR interval & the QT five, then all beats are taken. This makes a training
interval. There is an advantage to keep the fixed set of total 626 beats taken from all 16 classes. These
segment size it avoids the detection of the P wave and beats are used for calculating ICs.The ICs obtained
T wave. These waves are more immune which are used as source signals for ICA and hence applied
usually are more susceptible to noise as they have to both the datasets viz. training and testing datasets.
lower magnitudes. There is also a serious drawback To obtain actual number of ICs, tenfold cross
of fixed heartbeat segment size. If the heart is in a validation is evaluated. Number of independent
condition where it beats a bit faster, then there occurs components are varied between 10 & 30, the ICA
shortening of the interval between the consecutive coefficients obtained after that are actually considered
beats. Hence the information from neighbouring beats as features and given as input to SVM classifier. This
may get added to the present beat and results in false process is performed in 5 iterations. And average is
alarms of an arrhythmia detector. taken. When average performance is observed, the
accuracy increases at number of ICs between 10 & 14
C. Wavelet transform- Morphological and afterwards it decreases. So number of ICs is
Feature extraction selected to be 14.
ECG signals i.e. biomedical signals in real exhibit D. Principal component analysis-Morphological
non-stationary nature. Non-stationary nature actually feature extraction
means the presence of some statistical characteristics.
These signals change over position or time. Due to The two features obtained i.e. ICA features and
this nature, they cannot be responsive and hence wavelet features are combined together and PCA is
cannot be analysed using classical Fourier transform applied to obtain the reduction in feature dimension.
(FT). Therefore, it becomes must to use wavelet Then 10-fold cross validation is performed and final
transform (WT). Wavelet transform is capable of morphological features are obtained.
performing analysis in both the
E. RR Interval Features
domains i.e. time & frequency domains. It is possible The previous RR feature is nothing but the interval
to analyse ECG signal by using WT. There are between a present R peak and the previous R peak.
various purposes of using WT in ECG signal Post RR feature is calculated as the interval between
processing. It includes de-noising, heartbeat detection current R peak and next R peak. The local RR
and feature extraction. We use WT as a feature interval is calculated by taking average of all the RR
extraction method in this study. As can be seen, intervals withinpast 10-s period of the given
Daubechies wavelets of order 8 have most similar heartbeat. Likewise, the average RR interval is
characteristics as that of QRS complex, hence are calculated as the average of RR intervals within past
selected. Since the sampling frequency is given to be 5-min period of the heartbeat.
360 Hz, the maximum frequency is 180 Hz. The
maximum energy of ECG signals is concentrated in In previous literature, the local RR & average RR
the frequency range of 0.5–40 Hz [28]. After feature extraction shows poor performance when
applying the four-level wavelet decomposition, this applied in real-time application. The local RR feature
frequency range corresponds to the detail coefficients is calculated as average of consecutive 10 heartbeats
at level 3 & 4 i.e. D3 & D4). The down-sampling is whose centre will be at given beat. Whereas average
applied and even indexed elements are kept, resulting RR feature is calculated as average of all beats from
56
International Journal of Advances in Science Engineering and Technology, ISSN: 2321-9009 Volume- 2, Issue-3, July-2014
G. Two-lead fusion
Fig. 5 Results showing pre-processing& heartbeat
As two different classifiers are applied, each classifier
segmentation for lead 2 signal of 109 ECG recording.
gives its seperate answer. Now the two answers are
fused together to get a final answer which actually
gives the class of the heartbeat it belong to. Two
seperate answers can be fused together by using
rejection approach.
IV. RESULTS
57
International Journal of Advances in Science Engineering and Technology, ISSN: 2321-9009 Volume- 2, Issue-3, July-2014
58