1
USING FISHER
’S
LINEAR DISCRIMINANT
TO CLASSIFY FEATURE
VECTORS OF ECG
SIGNALS
Mirjam Jonkman, Aya Matsuyama, Mohamed Elgendi, Friso de Boer
School of Engineering.
Charles Darwin University
Darwin, Austrailia.
Phone: +61

(0)

8

89

46

6
671
Fax: +61

(0)

8

89

46

6680.
E

mail:
mirjam.jonkman
@cdu.edu.au
Abstract:
In this
paper a
method is presented to classify
normal and abnormal ECG signals.
It
employs a
combination of
wavelet decomposition
, f
eature extraction
and
classification
methodology
using Fis
her’s
linear
d
iscriminant.
It is shown that the method is
effective for quantifying the
classification of ECG abnormalities.
The results indicate
that successful classification relies on the first two wavelet
approximations.
Further decomposition leads to
less
accurate classification results. I
t has
also
been shown that
selection of a suitable wavelet is critical
.
It could be
concluded
that
the
bior3.1
wavelet
is
not
suitable for
this
method of classification
of ECG signals.
Keywords:
ECG, feature vectors,
wavelets, classification, Fisher
’s
l
inear
d
iscriminant
2
1.
INTRODUCTION
The Electrocardiogram (ECG) is one of the most effective diagnostic
tools to detect cardiac diseases. Traditionally skilled physicians analyse
ECG recordings in the time

domain. How
ever, ECG recording in the
frequency domain has also been studied for subtle pathological
conditions which may not always be obvious in the original time
domain [1

3]. Signal processing techniques for the information in the
frequency domain include Fourier
transforms and wavelet transforms.
The latter overcomes the important limitation of Fourier transform
s
,
which is uncertainty of the information in time after the transform [4].
The wavelet transform has been applied to the ECG for a wide range of
purposes
: feature extraction [5

8], feature detection [9

13], noise
reduction [14], and data compression [15].
The combined technique of wavelet decomposition and feature
extraction was previously applied to an ECG signal to separate normal
beats and abnormal bea
ts [7, 8].
However, the separation was not
quanti
fied
.
In this paper, we combine the previously described technique with
a
classification using Fisher
’s
l
inear
d
iscriminant
, leading to a
quanti
tative
classification system
.
2.
ECG SIGNAL PROCESSIN
G
Fig
ur
e
1 shows the ECG signal processing flow. The ECG signals
were first decomposed with the wavelet transform, after which feature
vectors were extracted. These feature vectors were used to classify the
signal. The details of each stage are described next.
3
Figure
1
. ECG Signal Processing Flow
2.1 Wavelet Decomposition
By applying
the
wavelet transform, ECG signals were decomposed
to the approximate (low frequency components) and detail information
(high f
requency components)
[16]
, refer to Figure
2.
Figure 2
. ECG Signal Decomposition
All ECG signals were
obtained
from
the Physionet Database [17]
.
Using
the
wavelet packet decomposition command ‘wpdec’ in Matlab
[18], each ECG
signal was decomposed to Level 4. To investigate the
suitability of the type of wavelet for ECG signal analysis, several types
Original
ECG
signals
Wavelet
Transfer
Decomposed
ECG signals
Feature
Extraction
Feature
Vectors
of
the ECG
signals
Beat
Classification
Original
ECG
signals
Wavelet
Transfer
Approximate
Information
(Low F
requency)
Detail
Information
(High Frequency)
4
of wavelets were applied (db2, db4, bior1.3, bior3.1, bior5.5, bior6.8).
The start of the QRS complex was defined as the beginnin
g of each
beat
and
normal beats which occurred immediately before or after
abnormal beats were removed
.
2.2 Feature Extraction
Two features were extracted from the
decomposed ECG signals,
normalis
ed energy and entropy. The purpose of feature extraction is
to
select and retain relevant information from the original signals.
2.2.1 Normalised Energy
The normalised energy at decomposition level n for each beat was
calculated as variance
N
i
i
n
m
x
N
j
E
1
2
)
(
1
1
)
(
(1)
(j: beat number, N: numbe
r of samples in one beat, i: sample number, n: decomposition
level, m: sample mean)
This energy of each beat, was then normalised across the
decomposition levels, which allows comparison between the
decomposed signals in different levels. The normalised e
nergy of the
beat j at decomposition level n is defined as:
2
2
2
2
1
_
)
(
...
)
(
)
(
)
(
)
(
n
n
n
norm
j
E
j
E
j
E
j
E
j
E
(2)
(j: beat number, n: decomposition level)
2.2.2 Entropy
In signal processing, the entropy can be viewed as a measure of
uncertainty [19]. The classical l
og energy entropy was used in this
study. The entropy of the beat
j
at decomposition level
n
was obtained
as follows.
N
i
i
n
x
j
Ent
1
2
log_
)
log(
)
(
(3)
(
j
: beat number, n: decomposition level,
N
: sample size,
i
: sample number)
2.2.3 Feature
Vectors
Each beat of the decomposed signals at each decomposition level
5
now has two features: normalised energy:
n
ratio
j
E
)
(
and entropy:
n
ratio
j
Ent
)
(
. These feature vectors of normal and abnormal beats
compose different groups of vector
points, known as clusters. We have
obtained feature vectors for s
ix
different wavelets
(db2, db4, bior1.3,
bior3.1, bior5.5, bior6.8) and
four decomposition levels.
3. CLASSIFICATION
The purpose of classification is to assign an object to a certain clas
s.
Many classification methods have been described [20]. Here we use
Fisher's linear discriminant [21]. Fisher’s linear discriminant is
particularly useful for discriminating between two classes in a
multidimensional space. Since it is based only on the fi
rst and second
moments of each distribution, it is not a computationally intensive
method.
A limitation is that it assumes that the
two classes are Gaussian
with equal covariance [22]. If this is not the case the discriminant may
not give the minimum class
ification error.
3.1 Fisher
’s
Linear Discriminant
Fisher’s
linear
discriminant is a classification method that projects
high

dimensional data onto a line and performs classification in a one

dimensional space. The objective of the method is to reduce the
dimensionality while preserving as much of the class discriminatory
information as possible. Let the feature vectors be denoted by
x
.
Fisher
’s
linear
discriminant is defined as the linear function
x
w
T
y
that maximize
s the criterion function [23]
2
2
~
2
1
~
2
2
~
1
~


)
(
S
S
J
w
(4)
where
)
(
2
2
~
2
1
~
S
S
is the
total within

class
scatter of the projected samples
and
2
~
1
~
is the difference of the projected means.
The projection
res
ults in the optimum separation of the two classes in one dimension.
3.2 Training
The training phase consisted of applying
Fisher’s linear discriminant
to a half of the feature vectors for a particular wavelet and
decomposition level. It was necessary to
take the logarithm of both
coordinates of the feature vectors before applying Fisher’s linear
discriminant in order to produce an approximately normal distribution.
6
The threshold, which would be used for classification, was defined as
the average of the p
rojected means of the classes.
3.3 Testing
The testing phase consisted of applying the previously found linear
discriminant to a new set of feature vectors. Different wavelets and
decomposition levels
were
applied to a number of ECG recordings. A
record
was kept of all classified hear
t
beats and true positive, true
negative, false positive and false negative rates were calculated for each
patient and for each beat
.
4. RESULTS
The results indicate that the method described above does indeed
result in a g
ood separation of the classes in the testing phase.
In fact, all
abnormal beats were
correctly
classified (there were no false
negatives)
. However a number of normal beats were classified
incorrectly. This
may be caused by a variance
difference between the
projections of
the normal and abnormal beats.
Figure 3
.
Wavelets used for analysis
To evaluate the suitability of a variety of wavelets for classifications
purposes, results were calculated for each beat (number of incorrectly
classified
beats) and each patient (number of incorrectly classified
patients, one incorrectly classified beat of a patient will result in an
incorrectly classified patient). The d
b2, db4, bior1.3, bior3.1, bior5.5,
bior6.8 wavelets were used for the analysis since t
hey are
commonly
used
. Figure 3 shows the shape of the various wavelets
involved
.
7
Previous research
[
7, 8
]
indicate
s
that successful
separation of
normal and abnormal beats
can be developed using the various levels of
approximation of the wavelet decompo
sition and approximation levels
were therefore varied from level 1 to level 4.
Table 1
.
F
alse positive classification using the bio
r
1.3 wavelet
Wavelet approximation level
–
bior
1
.
3
w
avelet
A1
A2
A3
A4
False positive
mis

classifications of patients
[
No]
2
0
3
4
False positive
mis

classifications of beats
[%]
0.09%
0.00%
26.13%
22.22%
T
able
1
shows the result for 9 pat
ients using the bio1
.
3
wavelet.
At
t
he A1 decomposition level
two
patients
had normal beats incorrectly
classified as abnormal. Howev
er, only 0.09% of the
normal
beats were
incorrectly classified
as abnormal beats
. Furthermore, it can be seen
that approximation level
s
A3 and A4 do not lead to good results any
more
as
3 patients
for the A3 level and 4 patients in the A4 level
were
incorr
ectly classified and about a quarter of all beats were incorrectly
classified (or about half of the beats of the incorrectly classified
patients).
This indicates that A3 and A4 do not have the enough
relevant information of the abnormality to accurately cl
assify.
Table 2
presents
the aggregated results for all wavelets. It
shows
that
,
on average
,
9.3% of the patients
are
incorrectly classified using the
A1 approximation
and
increasing to 42.6% using the A4
approximation. A similar trend exists for incorre
ctly classified beats,
increasing from 2.0% to 38.9%. Clearly the
A3 and A4 approximations
of the signal do not contain enough information to successfully classify
ECG signals
.
8
Table 2
.
False positive classification of aggregated results
Wavelet approx
imation level
A1
A2
A3
A4
False positive
mis

classifications of patients
[%]
9.26%
7.41%
33.33%
42.59%
False positive
mis

classifications of beats
[%]
2.02%
2.04%
23.18%
38.89%
After further analys
is of
individual wavelet results, it became
apparent
that there was
a
significant difference in classification
accuracy between the bior3.1 and the remaining wavelets
. The results
for the
bior3.1 wavelet
are shown in
T
able 3.
Table 3
.
F
alse positive classification using the bio3.1 wavelet
Wavelet approxima
tion level

bior3.1
w
avelet
A1
A2
A3
A4
False positive
mis

classifications of patients
[No]
3
4
4
3
False positive
mis

classifications of beats
[%]
12.03%
12.26%
33.59%
33.33%
It can be concluded that the bior3.1 wavelet is unsuitable for ECG
classi
fication techniques.
5. CONCLUSIONS
The combination of wavelet decomposition and feature extraction,
using normalised energy and entropy with classification using
Fisher's
linea
r discriminant
is
an effective method
for quantifying the
classification of
wavelet analysis of ECG abnormalities. In particular it
has been shown that the classification relies on information present in
level A1 and A2 of the wavelet decomposition
and that A3 and A4 do
not include this information any more
. Furthermore, it has b
een shown
that selection of a suitable wavelet is critical to the success of
classification
. It was shown that
bior3.1 is
not
suitable for
this method
of classification
of ECG signals.
9
REFERENCES
[1]
J. Millet

Roig, J. J. Lopez

Soriano, A. Mocholf, R. Ru
iz

Granell, and F. J. Chorro,
"Study of frequency and time domain parameters extracted by means of wavelet
transform applied to ECG to distinguish between VF and other arrhythmias,"
presented at Computers in Cardiology 1998, 1998.
[2]
A. Spaargaren and M.
J. English, "Analysis of the signal averaged ECG in the
time

frequency domain," presented at Computers in Cardiology 1999, 1999.
[3]
G. Sierra, P. Morel, P. Le Guyader, F. Trellez, R. Nadeau, and P. Savard,
"Frequency analysis of the signal

averaged ECG of
postinfarction patients for
prediction of cardiac death," presented at Engineering in Medicine and Biology
society, 1997. Proceedings of the 19th Annual International Conference of the
IEEE, 1997.
[4]
C. Valens, "A Really Friendly Guide to Wavelets," vol.
2003, 1999.
[5]
G. K. Prasad and J. S. Sahambi, "Classification of ECG arrhythmias using multi

resolution analysis and neural networks," presented at TENCON 2003. Conference
on Convergent Technologies for Asia

Pacific Region, 2003.
[6]
B. Castro, D. Kogan
, and A. B. Geva, "ECG feature extraction using optimal
mother wavelet," presented at Electrical and Electronics Engineers in Israel, 2000.
The 21st IEEE Conference, Tel

Aviv, Israel, 2000.
[7]
A. Matsuyama and M. Jonkman, "The Application of Wavelet and F
eature Vectors
to ECG Signals," presented at IEEE, Tencon 2005, Melboune, Australia, 2005.
[8]
A. Matsuyama and M. Jonkman, "The Application of wavelet and feature vectors
to ECG signals,"
Australian Physical & Engineering Sciences in Medicine
, vol. 29,
p
p. 14

17, 2006.
[9]
S. M. Szilagyi, L. Szilagyi, and L. David, "Comparison between neural

network

based adaptive filtering and wavelet transform for ECG characteristic points
detection," presented at Engineering in Medicine and Biology society, 1997.
Proce
edings of the 19th Annual International Conference of the IEEE, 1997.
[10] T. Stamkopoulos, K. Diamantaras, N. Maglaveras, and M. Strintzis, "ECG analysis
using nonlinear PCA neural networks for ischemia detection,"
Signal Processing,
IEEE Transactions on
[see also Acoustics, Speech, and Signal Processing, IEEE
Transactions on]
, vol. 46, pp. 3058

3067, 1998.
[11] D. Bojanic and D. B. Popovic, "QRS detection from an ongoing ECG recordings
by using dyadic wavelets," presented at EMBEC 02, Vienna, 2002.
[12]
F
. Schlegelmilch, M. Helbig, V. Natchkova, G. Ivanova, K. Schellhorn, V.
Detschew, D. Mandler, and G. GrieBbach, "A Multi

Channel Approach for
Online

Identification of QRS

Regions Using Adaptive Recursive Estimators,"
presented at EMBEC 02, Vienna, 2002.
[1
3]
A. Mousa and A. Yimaz, "Neural network detection of ventricular late potentials in
ECG signals using wavelet transform extracted parameters," presented at
Engineering in Medicine and Biology Society, 2001. Proceedings of the 23rd
Annual International Co
nference of the IEEE, 2001.
[14]
L. Senhadji, J. J. Bellanger, G. Carrault, and J. L. Coatrieux, "Wavelet Analysis of
E.C.G. Signals," presented at the Twelfth Annual International Conference of
IEEE, Philadelphia, 1990.
[15]
I. Provaznik and J. Kozumplik,
"Wavelet Transform in Electrocardiography

Data
Compression,"
International Journal of Medical Informatics
, vol. 45, pp. 111

128,
1997.
10
[16]
P. O. Ogunbona, M. Milliss, F. De Boe
r
, and M. Fernandes, "Classification of Gas
Metal Arc Welds Using Wavelets,"
presented at Engineering Mathematics and
Applications Conference, Adelaide, Australia, 1998.
[17]
"PhysioBank," vol. 2004: Physionet.
[18]
M. Misiti, Y. Misiti, G. Oppenheim, and J.

M. Poggi,
Wavelet Toolbox User's
Guide
: Mathwork, 2000.
[19]
S. Tong, A.
Beserianos, J. Paul, Y. Zhu, and N. Thakor, "Nonextensive entropy
measure of EEG following brain injury from cardiac arrest,"
Physica A
, pp. 619

628, 2002.
[20] Anil K. Jain, Robert P.W Duin, and Jianchang Mao.
Statistical Pattern
Recognition: A Review
. IE
EE Transactions on Pattern Analysis and Machine
Intelligence, Vol. 22 No. 1, 2000.
[21] Fisher, R.A. The Use of Multiple Measurements in Taxonomic Problems.
Annals
of Eugenics
, 7: 179

188 (1936)
[22]
T. Cooke and M. Peake, “The Optimal Classification Usin
g a Linear Discriminant
for Two Point Classes having Known Mean and Covariance,”
IEEE Transactions
On Pattern Analysis And Machine Intelligence, Vol. 24, No. 2 2002
[23] R.O. Duda, P.E. Hart and D.G. Stork, Pattern Classification, New York: John
Wiley & So
ns, 2001.
Comments 0
Log in to post a comment