ABSTRACT
The electrocardiogram (ECG), a record of
the biopotentials is associated with the
contractions of the heart muscle. A description of
some of the common types of signals that can be
derived from the ECG is also presented, together
with the motivation behind the analysis of these
signals.
The variation in the time period separating
consecutive heartbeats has come to be
conventionally described as heart rate variability
(HRV). These inter-beat intervals can be
measured conveniently as the separation between
the R peaks of adjacent QRS complexes in a
continuous electrocardiogram recording. The
sympathetic and parasympathetic branches of the
autonomic nervous system (ANS) regulate the
activity of the sinoatrial node, the cardiac
pacemaker. The beat-to-beat variation in the heart
rate therefore reflects the time varying influences
of the ANS and its components, on cardiac
function.
Heart rate variability, the variation over time of
the period between consecutive heartbeats, is
predominantly dependent on the extrinsic
regulation of the heart rate. HRV is thought to
reflect the heart’s ability to adapt to changing
circumstances by detecting and quickly
responding to unpredictable stimuli. HRV
analysis ability to assess overall cardiac health
and state of the autonomic nervous system
responsible for regulating cardiac activity
underlies its promise as a major new tool in the
diagnostics.
Basically , the support vector machine is a
linear machine. The main idea of a support vector
machine is to construct a hyperplane as the
decision surface in such a way that the margin of
separation between positive and negative
examples is maximized.
The support vectors consist of a small subset of
the training data extracted by the algorithm.
Depending on how this inner-product kernel is
generated, we may construct different learning
machines characterized by nonlinear decision
surfaces of their own. In particular, we may use
the support vector learning algorithm to construct
the following three types of learning machines:
• Linear machines
• Polynomial learning machines
• Radial-basis function networks
The steps involved in SVM classification are:
1. Training Phase
2. Testing Phase
We use the support vector learning algorithm
to implement the learning process using a given
set of training data and finally classifying the
testing data into respective classes. In many
applications, support vector machine (SVM) has
outperformed many other machine learning
methods and has established itself as a powerful
tool for classification problems.
KEYWORDS
ECG - Electro Cardio Gram
HRV - Heart Rate Variability
SVM - Support Vector Machines
OBJECTIVE
The objective of our thesis is to classify
arrhythmias using Support Vector Machines based
on features of HRV. HRV analysis is a powerful
tool to assess autonomic function in both health
and disease.
This study was conducted with a goal to:
1. Obtain time and frequency parameters of
HRV for the data taken from MIT-BIH
arrhythmia database using LABVIEW.
2. Test the significance of the obtained
results using analysis of variance.
3. Train the SVM using the obtained data.
4. Predict the respective classes for the
testing data.
PROPOSED SYSTEM
This thesis explores techniques for signal
processing of HRV from motivation to application
in an attempt to develop robust methods for HRV
analysis.
The study was conducted to validate and to
generate the measures in time/frequency domains
of HRV studies. This program will be utilized to
derive HRV parameters from ECG signals. All
time/frequency domain parameters were chosen
and programs were successfully implemented in
classifying the features into respective classes.
The data is collected from the MIT-BIH
arrhythmia database. The tachograms is extracted
from the ECG signal which is further divided into
small segments of 32 segments. They are
characterized by MIT-BIH arrhythmia database
annotations. Using XVIEW these annotated
segments are made readable into LABVIEW. This
gives the HRV parameters in time and frequency
domain. Using analysis of variance, the features
are reduced based on p-value obtained. These
features are given to a classifier called SVM, for
training and the remaining features for testing.
This classifies all the features into the respective
classes.
The proposed SVM classifier shows
satisfactory performances in discriminating four
types of arrhythmia. The discrimination of NSR,
VF, PVC and VF classes was found to have very
high accuracy of 96.5% .
Support Vector Machines (SVM) are
powerful kernel based learning machines which
combine essentially two strong ideas: maximum
margin classifiers with low capacity and implicit
features spaces defined by kernel functions. The
main idea of a support vector machine is to
construct a hyperplane in such a way that the
margin of separation between positive and
negative examples is maximized. More precisely
the support vector machine is an approximate
implementation of the method of structural risk
minimization. The support vector machine can
provide a good generalization performance on
pattern classification problems.
The basic pattern recognition problem is:
given a dataset with elements having certain class
labels, how can one design a machine that will
classify a new data element (whose class is
unknown), i.e., assign it one of the class labels? A
Support Vector Machine (SVM) is one such
machine that can perform pattern recognition; its
use, though, is not limited to this one application.
While most classifiers work on designing
rules that will place decision boundaries between
data belonging to different classes, SVMs go a
step ahead and design what are called “Support
Vectors” such that the data belonging to different
classes is now separated by a region rather than
just a hyperplane. Thus, the distinction between
classes is made more obvious, in an intuitive
sense. The following figure makes this clear:
Figure 1: Hyperplane
In the context of the figure 4.1.1, illustrated
for 2-class linearly separable data, the design of
the conventional classifier would be just to
identify the decision boundary w between the two
classes. However, SVMs identify support vectors
(SVs) on the planes-H1 and H2. They will create a
margin between the two classes, thus ensuring
that the data is “more separable” than in the case
of the conventional classifier.
Formally put, if we let {xi, yi} be the training
data x with class label y, yi {-1, +1}, then
any point lying on the hyperplane separating the
two classes (i.e., the decision boundary) will
satisfy w.x + b = 0, with w being the normal to the
hyperplane and |b|/||w|| being the perpendicular
distance of the hyperplane from the origin. Then if
d+ and d- are the distances of the points lying
nearest to the hyperplane in the classes (+1) and (-
1) respectively, then the support vectors are
designed such that these points lie on them, and
all other training points lie on the side different
from the other support vector. Thus, for training
data not lying on the support vectors, we have yi (
w.xi + b ) 0 for all i. Then, the support vectors
are separated by a distance equal to the minimum
distance between the training data for different
classes, i.e., the points lying on the support
vectors. That is from figure(1) :
The distance between H and H1 is:
|w•x+b|/||w||=1/||w||
{Because: the distance from a point (x0,y0) to a
line is given by: Ax+By+c = 0 is |A x0 +B y0
+c|/sqrt (A2+B2)}.
The distance between H1 and H2 is: 2/||w||
In order to maximize the margin, we need to
minimize ||w||. With the condition that there are
no datapoints between H1 and H2:
xi•w+b +1 when yi =+1
xi•w+b -1 when yi =-1
Can be combined into yi(xi•w) 1
Problem is: minimize ||w||, s.t. discrimination
boundary is obeyed, i.e., min f(x) s.t.
g(x)=0,where
f: ½ ||w||2 and
g: yi(xi•w)-b = 1 or [yi(xi•w)-b] - 1 =0
This is a constrained optimization problem
which is solved by Lagrangian multiplier
method.+
When the data is not linearly separable, we
introduce what are called Slack Variables to put a
penalty on the number and extent of outliers that
are not linearly separable. These slack variables,
represented by i, allow the constraints to be
relaxed in order to accommodate the non-linearly
separable outliers during SV design, but introduce
a further cost while doing so. Thus, the
mathematics involved now restructures the
optimization problem now: minimize ||w||2/2 + C
( i)k, where C is a Cost parameter that can be
introduced by the designer. for various values of
k.
It may be noted that mathematically, this
problem is equivalent to searching for a higher
dimension where the data are linearly separable,
and then designing a linear classifier in that higher
dimension. The kernel function (K {xi, xj}) is used
to map the data to higher dimension.
HEART RATE VARIABILITY IN THE
TIME DOMAIN
The simplest and oldest measure would be
the evaluation of the heart rate with respect to its
variation in time. This is called the time domain
analysis of HRV. In this method, the heart rate at
any moment or the intervals between successive
normal complexes are determined and analyzed.
In such methods the instantaneous heart rate or
the inter-beat intervals are determined and
concurrently its variations over time are studied.
All the studies of HRV originally begin from a
raw ECG signals. The interval between two
consecutive QRS intervals is termed the inter-beat
interval or IBI. Various statistical parameters are
derived from inter-beat variations. These form the
core of the time domain analysis.
Time domain measures are divided into:
• Simple time domain measures
• Complex time domain measures
1. Segmented measures
2. Interval differences
TIME DOMAIN MEASURES
1. The simple time domain measures are mean
RR, RR std , mean HR and HR std.
• RR Mean
It is the mean of the time interval between
consecutive heart beats that is the RR intervals.
It is measured in seconds.
• RR std
Standard deviation is defined as the rootmean-
square (RMS) deviation of the values from
their mean, or as the square root of the variance.
The standard deviation of RR intervals is called
RR std. It is measured in seconds.
• Mean HR
It is the no of contractions of the heart in one
min. It is expressed as “beats per min” (bpm).
• HR std
It is standard deviation of heart rates. It is
expressed as “beats per min” (bpm).
2. The most commonly used measure derived
from interval differences include
NN50, pNN50 and RMSSD
• NN50
NN50 is the number of intervals successive NN
intervals greater than 50ms.
• pNN50
This measure of the time domain analysis of
HRV studies is an interval difference parameter. It
is defined as the percentage of interval differences
of successive RR intervals greater than 50ms by
the total number of NN intervals. This measure
estimates high frequency variations in heart rate
and correlates to HF measures of the frequency
domain. pNN50 is a percentage and hence no unit.
pNN50 is given by the following equation.
• RMSSD
RMSSD is the square root of the mean
squared difference of successive NN intervals.
This is given by following equation.
This measure of time domain HRV analysis
may be defined as the square root of the mean of
the sum of the squares of the differences between
adjacent RR intervals. This is another measure of
short term variations of HRV and estimates high
frequency variations in heart rate. It is highly
correlated to pNN50 and corresponds to the HF
pNN50=NN50/ Total number of NN intervals
RMSSD=SQRT(MEAN([D1²,D2²,……….
DN²]))
measures in frequency domain. The unit of
RMSSD is ms.
HEART RATE VARIABILITY USING
GEOMETRIC METHODS
The series of NN intervals can also be
converted into geometric pattern, such as sample
density distribution of NN durations, sample
density distribution of difference between
adjacent NN intervals. This method judges
variability based on the geometric and/or graphic
properties of the resulting pattern.
Three general approaches are used in geometric
methods:
• A basic measurement of the geometric
pattern (for example, the width of the
distribution histogram at the specified
level) is converted into the measure of
HRV.
• The geometric pattern is interpolated by a
mathematically defined shape (for
example, approximation of the distribution
histogram by a triangle or approximation
of the differential histogram by an
exponential curve) and then the parameters
of this mathematical shape are used, and
• The geometric shape is classified into
several pattern-based categories that
represent different classes of HRV.
Most geometric methods require the RR (or
NN) interval sequence to be measured on or
converted to a discrete scale that is not too fine or
too coarse and permits the construction of
smoothed histograms.
Geometric measures include:
HRV Triangular Index, TINN
• HRV Triangular Index
The HRV triangular index measurement is
the integral of the density distribution (that is, the
number of all NN intervals) divided by the
maximum of the density distribution. Using a
measurement of NN intervals on a discrete scale,
the measure is approximated by the value
This is dependent on the length of the bin, that is,
on the precision of the discrete scale of
measurement. Thus, if the discrete approximation
of the measure is used with NN interval
measurement on a scale different from the most
frequent sampling of 128 Hz, the size of the bins
should be quoted.
Figure 2: Triangular index
• TINN
TINN stands for Triangular interpolation of
NN interval histogram is the baseline width of the
distribution measured as a base of a triangle
approximating the NN interval distribution (the
minimum square difference is used to find such a
triangle). Details of computing HRV triangular
index and TINN are shown. Both these measures
express overall HRV measured over 24 hours and
are more influenced by the lower than by the
higher frequencies. Other geometric methods are
still in the phase of exploration and explanation.
HEART RATE VARIABILITY IN
FREQUENCY DOMAIN
Various spectral methods for the analysis of
the tachogram have been applied since the late
1960s. Power spectral density (PSD) analysis
provides the basic information of how power
(variance) distributes as a function of frequency.
HRV Triangular index = total number of all
NN intervals) / ( Max. number of NN
intervals in the modal bin)
Independent of the method used, only an estimate
of the true PSD of the signal can be obtained by
proper mathematical algorithms.
SHORT-TERM RECORDINGS
Three main spectral components are
distinguished in a spectrum calculated from shortterm
recordings of 2 to 5 minutes, these are
• LF( Low Frequency)
• HF(High Frequency)
• VLF(Very Low Frequency)
The distribution of the power and the
central frequency of LF and HF are not fixed but
may vary in relation to changes in autonomic
modulations of heart period. In theory the VLF
component is also present but the physiological
explanation of the VLF component is much less
defined. VLF assessed from short term recordings
must be avoided when the power spectral
densities of the short term ECG are interpreted.
This is because the physiological explanation of
the VLF component is much less defined, and the
existence of a specific physiological process
attributable to these heart period changes might
even be questioned. The non harmonic
component, which does not have coherent
properties and is affected by algorithms of
baseline or trend removal, is commonly accepted
as a major constituent of VLF. Thus, VLF
assessed from short-term recordings ( 5 minutes)
is a dubious measure and should be avoided when
the PSD of short-term ECGs is interpreted.
The measurement of VLF, LF, and HF
power components is usually made in absolute
values of power (milliseconds squared). LF and
HF may also be measured in normalized units,
which represent the relative value of each power
component in proportion to the total power minus
the VLF component. The representation of LF and
HF in normalized units emphasizes the controlled
and balanced behavior of the two branches of the
autonomic nervous system. Moreover, the
normalization tends to minimize the effect of the
changes in total power on the values of LF and
HF components. Nevertheless, normalized units
should always be quoted with absolute values of
the LF and HF power in order to describe
completely the distribution of power in spectral
components.
RESULT
1. Feature vectors : RR mean and RR std
Test data
Actual
class
Predicted
class
0.66 0.24 4 4
0.57 0.18 4 4
0.56 0.27 4 4
0.83 0.09 3 3
0.84 0.04 3 3
0.83 0.08 3 3
0.68 0.16 2 2
0.65 0.16 2 2
1.11 0.06 1 1
1.01 0.13 1 1
0.94 0.1 1 1
Result Table
CLASSIFIER PERFORMANCE:
Class Sensitivity
(%)
Specificity
(%)
Accuracy
(%)
NSR 100 100 100
VF 100 100 100
PVC 100 100 100
AF 100 100 100
Performance Evaluation Table
The overall accuracy was found to be 100%.
2. Feature vectors: HR mean and HR std
Test data
Actual
class
Predicted
class
135.52 45.32 4 4
151.37 86.55 4 4
131.87 94.28 4 1
125.98 44.44 4 4
70.71 2.27 3 1
77.93 41.22 3 3
71.35 4.3 3 3
74.66 20.27 3 3
94.81 29.92 2 2
99.19 30.46 2 2
89.22 16.15 1 1
61.15 16.13 1 1
54.51 4.23 1 1
64.11 30.73 1 1
66.89 22.18 1 1
Result Table 2
CLASSIFIER PERFORMANCE:
Class Sensitivity
(%)
Specificity
(%)
Accuracy
(%)
NSR 100 80 86
VF 100 100 100
PVC 75 100 93
AF 75 100 93
Performance Evaluation Table 3
The overall accuracy was found to be 93%.
CONCLUSION
• In this thesis, we proposed a SVM based
arrhythmia classification algorithm which
provided a new approach to the problem of
pattern recognition.
• With respect to our thesis, the pattern-
Heart Rate Variability along with SVM
provided a unique method to classify
Arrhythmias.
• Our work has achieved an overall
accuracy of 96.5% for the total of four
features in the time domain.
• The results showed that the proposed
method is effective for classification of
cardiac arrhythmia, with acceptable high
accuracy. It is evident that the combination
of the linear and nonlinear features
together with the employed classifier is
very effective.
• The main advantage of this method
compared to other approaches in the
literature is that it is completely based on
RR-interval signal which can be extracted
with high accuracy even for noisy or
complicated ECG recordings, while the
extraction of all other type of ECG
analysis is seriously affected by noise.
BIBLIOGRAPHY
1. A Tutorial on Support Vector Machines
for Pattern Recognition by
CHRISTOPHER J.C. BURGES.
2. www.physionet.org/physiobank/database/
mitdb/ - 14k
3. Support Vector Machines for
Classification and Regression by Steve R.
Gunn.
4. Kernel Machines and Classifier Ensemble
Learning for Biomedical Applications by
Peng Li.
5. Support Vector Machinesen.
wikipedia.org/wiki/Support_vector_ma
chine.
6. Kernel –machines .org-kernel machineswww.
kernel-machines.org.
7. Support Vector machines for classification
and regression
www.ecs.soton.ac.uk/~srg/publications/pd
f/SVM.pdf.
8. National Instruments Test and
Measurements-www.ni.com.
9. Support Vector Machine Based
Arrhythmia Classification Using Reduced
Features of Heart Rate Variability Signal-
Babak Mohammadzadeh-Asl, Seyed
Kamaledin Setarehdan.
10. http://asi.insarouen.
fr/enseignants/~arakotom/toolbox/in
dex.html.
11. Project- RR interval.htm.
12. www.actapress.com/PDFViewer.aspx?pap
erId=33038
13. ieeexplore.ieee.org/iel5/10755/33900/0161
5671.pdf
No comments:
Post a Comment