- Research
- Open Access
- Published:

# Ischemia episode detection in ECG using kernel density estimation, support vector machine and feature selection

*BioMedical Engineering OnLine*
**volume 11**, Article number: 30 (2012)

## Abstract

### Background

Myocardial ischemia can be developed into more serious diseases. Early Detection of the ischemic syndrome in electrocardiogram (ECG) more accurately and automatically can prevent it from developing into a catastrophic disease. To this end, we propose a new method, which employs wavelets and simple feature selection.

### Methods

For training and testing, the European ST-T database is used, which is comprised of 367 ischemic ST episodes in 90 records. We first remove baseline wandering, and detect time positions of QRS complexes by a method based on the discrete wavelet transform. Next, for each heart beat, we extract three features which can be used for differentiating ST episodes from normal: 1) the area between QRS offset and T-peak points, 2) the normalized and signed sum from QRS offset to effective zero voltage point, and 3) the slope from QRS onset to offset point. We average the feature values for successive five beats to reduce effects of outliers. Finally we apply classifiers to those features.

### Results

We evaluated the algorithm by kernel density estimation (KDE) and support vector machine (SVM) methods. Sensitivity and specificity for KDE were 0.939 and 0.912, respectively. The KDE classifier detects 349 ischemic ST episodes out of total 367 ST episodes. Sensitivity and specificity of SVM were 0.941 and 0.923, respectively. The SVM classifier detects 355 ischemic ST episodes.

### Conclusions

We proposed a new method for detecting ischemia in ECG. It contains signal processing techniques of removing baseline wandering and detecting time positions of QRS complexes by discrete wavelet transform, and feature extraction from morphology of ECG waveforms explicitly. It was shown that the number of selected features were sufficient to discriminate ischemic ST episodes from the normal ones. We also showed how the proposed KDE classifier can automatically select kernel bandwidths, meaning that the algorithm does not require any numerical values of the parameters to be supplied in advance. In the case of the SVM classifier, one has to select a single parameter.

## Background

Coronary artery disease is one of the leading causes of death in modern world. This disease mainly results from atherosclerosis and thrombosis, and it manifests itself as coronary ischemic syndrome [1].

When a patient experiences coronary ischemic syndrome, his or her electrocardiogram (ECG) shows some peculiar appearances. Each segment of ECG can be divided into P, Q, R, S and T waves as shown in Figure 1 where QRS complex and T wave represent ventricular depolarization and repolarization, respectively. In most cases of normal ECG, the ST segment has the same electric potential as the PR segment. When myocardial ischemia is present, however, the electric potential of the ST segment is elevated or depressed with respect to the potential of the PR segment [1, 2]. When ischemia occurs, the PR segment is altered, or the ST segment deviates from normal level. If the PR segment moved instead of the ST segment, this looks as if the ST segment itself were modified. This is because the PR segment provides a kind of reference voltage level [1].

The ST segment deviation is mainly due to injury current in myocardial cells [1]. If the coronary artery becomes blocked by blood clot, some myocytes are affected to be unresponsive to depolarization, or to repolarize earlier than adjacent myocytes. In this case, voltage gradient can occur in the myocytes, and this comes to appear as ST-segment deviation in ECG [1]. Figure 2 shows two cases when the voltage level of the ST segment deviates from its normal position. The left column of the figure shows the distribution of electric charges around myocytes when the heart is in resting state. This is related to the PR segment in ECG. The right column shows the distribution of electric charges right after the ventricles contracted. This is related to the QRS complex and the ST segment in ECG. The shaded region represents the area being affected by myocardial ischemia. In the case of the upper row in Figure 2, there is no voltage gradient at first. After the ventricles contracted, however, the voltage gradient comes to appear because the injured area did not respond to electric depolarization. In the second case of the bottom row, there is no voltage gradient right after the ventricles contracted. In the left figure, however, there was initial voltage gradient, and this makes the PR segment to be modified. The PR segment acts as a reference voltage level when we judge whether the ST segment deviated from normal position. The modified PR segment makes us conclude that there was a ST segment deviation [1].

There are several approaches to detect ischemic ST deviations. Some researchers used the entropy. Rabbani et al. used the fact that signal perturbation of normal people is lower than the perturbation of ischemic patients. They computed entropy measure of wavelet subband of ECG signal, and classified the ECG by examining which signal exhibited a more chaotic perturbation [3]. Lemire et al. calculated signal entropy at various frequency levels. They computed the entropy in each wavelet scale [4]. Some used adaptive neuro-fuzzy inference system. Pang et al. used Karhunen-Loève transform to extract several feature values. They classified ECG signal by an adaptive neuro-fuzzy inference system [5]. Tonekabonipour et al. used multi-layer perceptron and radial basis function to detect ischemic episode. They classified ECG signals by adaptive neuro-fuzzy network [6]. There are many papers which used artificial neural network. Stamkopoulos et al. used nonlinear principal component analysis to analyze complex data. They classified ECG signal by radial basis function neural network [7]. Maglaveras et al. used neural network optimized with a backpropagation algorithm [8]. Afsar et al. used Karhunen-Loève transform to find feature values, and classified an input ECG by using a neural network [9]. Papaloukas et al. used artificial neural network which was trained by Bayesian regularization method [10]. There are papers studied some other approaches. Bulusu et al. determined morphological features of ECG, and classified the ECG data by support vector machine. Andreao et al. used hidden Markov models to analyze ECG segments. They detected ischemia episode by using median filter and linear interpolation [11]. Faganeli and Jager tried to distinguish ischemic ST episode and non-ischemic ST episode caused by heart rate change. To this end, they computed heart rate values, Mahanalobis distance of Karhunen-Loève transform coefficients and Legendre orthonormal polynomial coefficients [12]. Exarchos et al. used decision tree. They formed decision rules comprising specific thresholds, and developed a fuzzy model to classify ischemic ECG signals [13]. Garcia et al. considered root mean square of difference between the input signal and the average signal composed of first 100 beats. They adopted an adaptive amplitude threshold to classify ECG signal [14]. Murugan and Radhakrishnan used ant-miner algorithm to detect ischemic ECG beats. They calculated several feature values such as ST segment deviation from input ECG signal [15]. Bakhshipour et al. analyzed coefficients resulted from wavelet transform. They examined the relative quotient of the coefficients at each decomposition level of the wavelet transform [16].

We approached this problem by extracting feature values from a ECG waveform. We first found time positions of QRS complexes, and then determined values of the three features. We calculated the feature values for each heart beat, and averaged their values in five successive beats. After that, we classified them by the methods of kernel density estimation and support vector machine.

We showed techniques of removing baseline wandering and detecting time positions of QRS complexes by discrete wavelet transform. With these explicit methods of dealing with ECG, we could discriminate ischemic ST episode from normal ECG. We did not adopt implicit methods such as artificial neural networks or decision trees, because we considered it was important to utilize explicit features for processes of decision making. The artificial neural network has a kind of black box nature in its hidden layers [17], and a decision tree is apt to include several numerical thresholds [13].

## Methods

### Materials

We used the European ST-T database from Physionet. European ST-T database has 90 records which are two-channel and each two hours in duration [18, 19]. Each record in this database has a different number of ST episodes. Overall there are 367 ischemic ST episodes in the database. Sampling frequency of each ECG data is 250 Hz.

We excluded 5 records because these had some problems. The records e0133, e0155, e0509, and e0611 had no ischemic ST episodes. The record e0163 had so limited ST episode whose length was just 31 seconds.

### Removing baseline wandering

The ST segments in ECG can be strongly affected by baseline wandering [20]. Main causes of the baseline wandering are respiration and electrode impedance change due to perspiration [20, 21]. The frequency content of the baseline wandering is usually in a range below 0.5 Hz [20, 21].

We use discrete wavelet transform to remove baseline wandering in ECG. We transform signal vector into two sequences of coefficients, approximation and detail coefficients sequences [22]. We do this in each step in an iterative fashion, until we get an input signal whose length is smaller than the length of the filter which characterizes the wavelet. In our case, we used Daubechies8 wavelet with filter length of 8. The resulting approximation coefficient sequence becomes the input signal to the next discrete wavelet transform as shown in Figure 3(a) [22].

In each step, the coefficient sequence implies a band of frequencies. If the sampling frequency of a discrete ECG signal *ecg*(*n*) is *x*, we can determine a continuous and band-limited signal within frequency limits of
$\left[0,\frac{x}{2}\right]$ by Nyquist sampling theorem
[23]. Therefore if we have transformed the input signal *ecg*(*n*) into the approximation coefficient sequence *h*
_{1}(*n*) and detail coefficient sequence *g*
_{1}(*n*), then the frequency content of *g*
_{1}(*n*) is from
$\frac{x}{4}$ to
$\frac{x}{2}$, and the frequency content of *h*
_{1}(*n*) is below
$\frac{x}{4}$. In this regard, if we have transformed the *ecg*(*n*) into the approximation coefficient sequence *h*
_{
k
}(*n*), and the detail coefficient sequences *g*
_{
k
}(*n*),*g*
_{
k−1}(*n*),· · ·,*g*
_{1}(*n*), the frequency contents of *g*
_{
k
}(*n*),*g*
_{
k−1}(*n*),· · ·,*g*
_{1}(*n*) become
$\left[\frac{x}{{2}^{k+1}},\frac{x}{{2}^{k}}\right],\left[\frac{x}{{2}^{k}},\frac{x}{{2}^{k-1}}\right],\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},\left[\frac{x}{{2}^{2}},\frac{x}{2}\right]$ respectively
[24, 25].

To remove baseline wandering, we should choose appropriate wavelet scale. We follow argument similar to that presented by Arvinti et al. except that they used stationary wavelet transform instead of its discrete counterpart
[26]. We remove signal components whose frequency content is less than 1/2 Hz
[20, 21]. If we have transformed the ECG signal *ecg*(*n*) into coefficient sequences *h*
_{
k
}(*n*),*g*
_{
k
}(*n*),*g*
_{
k−1}(*n*),· · ·,*g*
_{1}(*n*), the frequency contents of *h*
_{
k
}(*n*) and *g*
_{
k
}(*n*) become
$\left[0,\frac{x}{{2}^{k+1}}\right]$ and
$\left[\frac{x}{{2}^{k+1}},\frac{x}{{2}^{k}}\right]$ respectively, where *x* is the sampling frequency. If we choose *k* as
$\frac{x}{{2}^{k+1}}\le \frac{1}{2}$
$k=\u2308\underset{2}{log}x\u2309$, the frequency content of the approximation coefficient sequence *h*
_{
k
}(*n*) becomes less than 1/2 Hz. Thus, we assign zero sequence
$\overrightarrow{0}\left(n\right)$ to all the detail coefficient sequences *g*
_{
k
}(*n*),*g*
_{
k−1}(*n*),· · ·,*g*
_{1}(*n*), and calculate inverse transform of
${h}_{k}\left(n\right),\overrightarrow{0}\left(n\right),\overrightarrow{0}\left(n\right),\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},\overrightarrow{0}\left(n\right)$ to form the *baseline*(*n*) in the bottom of Figure
3(b). If we subtract *baseline*(*n*) from *ecg*(*n*), we obtain the flattened signal like the one shown in Figure
3(c).

If we select a wrong wavelet scale *k* to find coefficient sequences of *ecg*(*n*), we obtain disappointing results. The flattened signal in Figure
3(c) is obtained when *k* is
$\u2308\underset{2}{log}250\u2309=8$, where 250 is the sampling frequency expressed in Hz. When select *k*=4 to use *h*
_{4}(*n*),*g*
_{4}(*n*),*g*
_{3}(*n*),*g*
_{2}(*n*),*g*
_{1}(*n*), we obtain a plot in Figure
3(d). The middle waveform, *baseline*(*n*), resulted from the inverse discrete wavelet transform of
${h}_{4}\left(n\right),\overrightarrow{0}\left(n\right),\overrightarrow{0}\left(n\right),\overrightarrow{0}\left(n\right)\overrightarrow{0}\left(n\right)$. This middle waveform is too detailed, so the bottom waveform *ecg*(*n*)-*baseline*(*n*) was negatively affected. When we select *k*=12, see Figure
3(e), the bottom waveform was not different from the input waveform *ecg*(*n*).

We adopt a discrete wavelet transform to retain the details of the ECG waveform because filtering by some cut-off frequency can deteriorate the quality of the ECG waveforms [27].

### Detecting QRS complexes

We have to select an appropriate wavelet scale to capture proper time positions of QRS complexes. We will deal with only the flattened ECG waveform *ecg*(*n*)-*baseline*(*n*) referred in the previous section. We will denote it as *fecg*(*n*).

First, we determine the sequences of wavelet coefficients of the *fecg*(*n*), obtaining *h*
_{
k
}(*n*),*g*
_{
k
}(*n*),*g*
_{
k−1}(*n*),· · ·,*g*
_{1}(*n*) where
$k=\u2308\underset{2}{log}x\u2309$, *x* is sampling frequency. We assign zero to all the coefficient sequences except one, *g*
_{
j
}(*n*). Then, we calculate inverse transform of
$\overrightarrow{0}\left(n\right)$ (approximation coefficients),
$\overrightarrow{0}\left(n\right)$ (detail coefficients, onward),
$\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},\overrightarrow{0}\left(n\right),{g}_{j}\left(n\right),\overrightarrow{0}\left(n\right),\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},\overrightarrow{0}\left(n\right)$ to obtain *pulse*(*n*). To find a protruding segment, that is, a QRS complex, we compute the score for each wavelet scale *j*,

We select the wavelet scale *j* which produces the largest drop of *scor* *e*
_{
j
}−*scor* *e*
_{
j + 1}(*j*≥2). The bottom waveform in Figure
4(b) shows the time positions of QRS complexes when selecting this suitable wavelet scale.

After finding the locations of QRS complexes, we choose QRS onset and offset points in each QRS complex. We search QRS onset point in backward direction from a peak point in each QRS complex. We take the QRS onset point if the point is at the place of changing direction of rising and falling of *fecg*(*n*) twice. In the same way, we take the QRS offset point in forward direction from the peak point.

Algorithm 1 shows a process of removing baseline wandering and detecting QRS complexes.

#### Algorithm 1

A procedure to find time positions of QRS onset, peak and offset points. This procedure includes the method of removing baseline wandering in ECG. *nBeats* stands for the number of QRS peaks. It is the length of the sequences idx_QRS_Onset(*n*), idx_QRS_Peak(*n*) and idx_QRS_Offset(*n*). **Input:** Sampling_Hz, *ecg*(*n*)**Output:** idx_QRS_Onset(*n*), idx_QRS_Peak(*n*), idx_QRS_Offset(*n*)*k*←
$\u2308\underset{2}{log}\text{Sampling\_Hz}\u2309$ Discrete wavelet transform (DWT) of *ecg*(*n*) into *h*
_{
k
}(*n*),*g*
_{
k
}(*n*),*g*
_{
k−1}(*n*),· · ·,*g*
_{1}(*n*)**for** *i*=1 to *k* **do** *g*
_{
i
}(*n*)←
$\overrightarrow{0}\left(n\right)$ {//
$\overrightarrow{0}\left(n\right)$ means zero sequence.} **end for** Inverse wavelet transform (IDWT) of *h*
_{
k
}(*n*),*g*
_{
k
}(*n*),*g*
_{
k−1}(*n*),· · ·,*g*
_{1}(*n*) into *baseline*(*n*)
$\mathrm{fecg}\left(n\right)\leftarrow \mathrm{ecg}\left(n\right)-\mathrm{baseline}\left(n\right)$ DWT of *fecg*(*n*) into *h*
_{
k
}(*n*),*g*
_{
k
}(*n*),*g*
_{
k−1}(*n*),· · ·,*g*
_{1}(*n*)*h*
_{
k
}(*n*)←
$\overrightarrow{0}\left(n\right)$
*g*
_{
k
}(*n*)←
$\overrightarrow{0}\left(n\right)$
**for** *i*=1 to *k*−1**do**

${g}_{i}^{\u2033}$(*n*)←*g*
_{
i
}(*n*)

*g*
_{
i
}(*n*)←
$\overrightarrow{0}\left(n\right)$

**end for** **for** *i*=1 to *k*−1**do**

*g*
_{
i
}(*n*)←
${g}_{i}^{\u2033}$(*n*)

IDWT of *h*
_{
k
}(*n*),*g*
_{
k
}(*n*),*g*
_{
k−1}(*n*),· · ·,*g*
_{1}(*n*) into *pulse*(*n*)

${\mathit{\text{score}}}_{i}\leftarrow \left|\sum _{l}\mathit{\text{fecg}}\left(l\right)\frac{\left|\mathit{\text{pulse}}\left(l\right)\right|}{\sum _{m}\left|\mathit{\text{pulse}}\left(m\right)\right|}\right|$

*g*
_{
i
}(*n*)←
$\overrightarrow{0}\left(n\right)$

**end for** chosen_scale ←
${\text{argmax}}_{2\le i\le k-2}\left\{{\mathit{\text{score}}}_{i}-{\mathit{\text{score}}}_{i+1}\right\}$
${g}_{\text{chosen\_scale}}\left(n\right)$←
${g}_{\text{chosen\_scale}}^{\u2033}\left(n\right)$ IDWT of *h*
_{
k
}(*n*),*g*
_{
k
}(*n*),*g*
_{
k−1}(*n*),· · ·,*g*
_{1}(*n*) into *pulse*(*n*)
$\mathit{\text{needle}}\left(n\right)\leftarrow \left|\mathit{\text{fecg}}\left(n\right)\mathit{\text{pulse}}\left(n\right)\right|$ Make idx_QRS_Peak(*n*) by searching for local maxima of *needle*(*n*)**for** *i*=1 to *nBeats* **do** **if**
$\mathit{\text{fecg}}\left(\text{idx\_QRS\_Peak}\left(i\right)\right)>0$
**then**

$j\leftarrow 1$

**while**
$\mathit{\text{fecg}}\left(\text{idx\_QRS\_Peak}\left(i\right)-j\right)\le \mathit{\text{fecg}}\left(\text{idx\_QRS\_Peak}\left(i\right)-j+1\right)$
**do**

$j\leftarrow j+1$

**end while**

**while**
$\mathit{\text{fecg}}\left(\text{idx\_QRS\_Peak}\left(i\right)-j\right)>\mathit{\text{fecg}}\left(\text{idx\_QRS\_Peak}\left(i\right)-j+1\right)$
**do**

$j\leftarrow j+1$

**end while**

idx_QRS_Onset(*i*)← idx_QRS_Peak(*i*)−*j*

$j\leftarrow 1$

**while**
$\mathit{\text{fecg}}\left(\text{idx\_QRS\_Peak}\left(i\right)+j-1\right)\ge \mathit{\text{fecg}}\left(\text{idx\_QRS\_Peak}\left(i\right)+j\right)$
**do**

$j\leftarrow j+1$

**end while**

**while**
$\mathit{\text{fecg}}\left(\text{idx\_QRS\_Peak}\left(i\right)+j-1\right)<\mathit{\text{fecg}}\left(\text{idx\_QRS\_Peak}\left(i\right)+j\right)$
**do**

$j\leftarrow j+1$

**end while**

idx_QRS_Offset(*i*)← idx_QRS_Peak(*i*) + *j*

**else**

· · ·{//When QRS complex protrudes downward, code is same with reversing directions of inequality signs.}

**end if**
**end for**

### Feature formation for classification problems

We deal with the flattened waveform, *fecg*(*n*), to obtain the values of the features. We take voltage level of QRS onset point as the reference from which we measure voltage deviation
[2, 28]. We denote the mean value of electric potentials at QRS onset points as
$\overline{\mathit{\text{fecg}}\left(\mathit{\text{QRS}}\phantom{\rule{2.22144pt}{0ex}}\text{onset}\right)}$. We consider this value as an effective zero voltage, so we measure voltage deviation from the
$\overline{\mathit{\text{fecg}}\left(\mathit{\text{QRS}}\phantom{\rule{2.22144pt}{0ex}}\text{onset}\right)}$.

To form the first feature, we sum up all the voltage deviation from QRS offset point to T wave peak point as shown in Figure 5(a) and (b).

The second feature is similar to the first feature with an exception of the ending position of the sum. We terminate the summation as we reach the first point, F, at which the voltage becomes equal to the reference voltage $\overline{\mathit{\text{fecg}}\left(\mathrm{QRS}\phantom{\rule{2.22144pt}{0ex}}\text{onset}\right)}$, see Figure 5. When doing this, we add the signed values of the voltage deviation to find whether the area is lower or higher with respect to the reference voltage. Then we divide the value by the voltage at QRS peak point. The second feature value is given as follows.

The third feature is a slope from the QRS onset point to the QRS offset point.

We calculate these three feature values for each heart beat. Then we average these values in five successive beats, and arrange the three mean values as $\left({\mathit{\text{feature}}}_{1},{\mathit{\text{feature}}}_{2},{\mathit{\text{feature}}}_{3}\right)$.

Algorithm 2 shows the pseudo-code of computing feature values.

#### Algorithm 2

A procedure to compute feature values. *nBeats* denotes the number of QRS peaks. It is the length of the sequences idx_QRS_Onset(*n*), idx_QRS_Peak(*n*) and idx_QRS_Offset(*n*). *n*
_{
cl
} is equal to *nBeats*/5. **Input:** *fecg*(*n*), idx_QRS_Onset(*n*), idx_QRS_Peak(*n*), idx_QRS_Offset(*n*)**Output:**
$\left\{{\mathbf{x}}_{1}^{\left(\mathrm{cl}\right)},{\mathbf{x}}_{2}^{\left(\mathrm{cl}\right)},\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},{\mathbf{x}}_{{n}_{\mathrm{cl}}}^{\left(\mathrm{cl}\right)}\right\}$ {//*cl* can be *S* (ST episode) or *N* (normal).} mean_idx_diff_{1}←
$\left(\sum _{i=1}^{\mathit{\text{nBeats}}}\left(\text{idx\_QRS\_Peak}\left(i\right)-\text{idx\_QRS\_Onset}\left(i\right)\right)\right)/\mathit{\text{nBeats}}$mean_idx_diff_{2}←
$\left(\sum _{i=1}^{\mathit{\text{nBeats}}}\left(\text{idx\_QRS\_Offset}\left(i\right)-\text{idx\_QRS\_Peak}\left(i\right)\right)\right)/\mathit{\text{nBeats}}$ {//mean_idx_diff_{1}and mean_idx_diff_{2}are truncated into integers.}
$\overline{\mathit{\text{fecg}}\left(\mathit{\text{QRS}}\phantom{\rule{2.22144pt}{0ex}}\text{onset}\right)}$←
$\left(\sum _{i=1}^{\mathit{\text{nBeats}}}\mathit{\text{fecg}}\left(\text{idx\_QRS\_Onset}\left(i\right)\right)\right)/\mathit{\text{nBeats}}$
**for** *i*=1 to *nBeats* **do** *k*← idx_QRS_Peak(*i*) + mean_idx_diff_{2}
${\mathit{\text{feature}}}_{1}\left(i\right)\leftarrow \sum _{j=k}^{T\phantom{\rule{2.22144pt}{0ex}}\text{peak}}\left|\mathit{\text{fecg}}\left(j\right)-\overline{\mathit{\text{fecg}}\left(\mathit{\text{QRS}}\phantom{\rule{2.22144pt}{0ex}}\text{onset}\right)}\right|$
${\mathit{\text{feature}}}_{2}\left(i\right)\leftarrow \left(\sum _{j=k}^{F}\left(\mathit{\text{fecg}}\left(j\right)-\overline{\mathit{\text{fecg}}\left(\mathit{\text{QRS}}\phantom{\rule{2.22144pt}{0ex}}\text{onset}\right)}\right)\right)/\left|\mathit{\text{fecg}}\left(\text{idx\_QRS\_Peak}\left(i\right)\right)\right|$
*m*← idx_QRS_Peak(*i*)−mean_idx_diff_{1}
${\mathit{\text{feature}}}_{3}\left(i\right)\leftarrow \left|\frac{\mathit{\text{fecg}}\left(k\right)-\mathit{\text{fecg}}\left(m\right)}{k-m}\right|$
**end for** **for** *i*=1 to *nBeats*/5
${\left[{\mathbf{x}}_{i}^{\left(\mathrm{cl}\right)}\right]}_{1}\leftarrow \frac{1}{5}\sum _{j=5i-4}^{5i}{\mathit{\text{feature}}}_{1}\left(j\right)$
${\left[{\mathbf{x}}_{i}^{\left(\mathrm{cl}\right)}\right]}_{2}\leftarrow \frac{1}{5}\sum _{j=5i-4}^{5i}{\mathit{\text{feature}}}_{2}\left(j\right)$
${\left[{\mathbf{x}}_{i}^{\left(\mathrm{cl}\right)}\right]}_{3}\leftarrow \frac{1}{5}\sum _{j=5i-4}^{5i}{\mathit{\text{feature}}}_{3}\left(j\right)$
**end for**

### Classification by kernel density estimation

We approximate probability density at a point by considering the other points. Let us assume we have *d*-dimensional points
$\left\{{\mathbf{x}}_{1},{\mathbf{x}}_{2},\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},{\mathbf{x}}_{n}\right\}$. We can estimate the probability density at a point **y** as
$p\left(\mathbf{y}\right)=\frac{1}{n}\frac{K}{V}$ where *V* is a small volume around **y**, and *K* is a number of enclosed points in the volume *V*
[29]. We replace the term
$\frac{K}{V}$ by *d*-dimensional Gaussian function as follows
[30].

If we assume that the covariance matrix ∑ is a diagonal matrix with each diagonal element
${b}_{j}^{2}$
$\left(1\le j\le d\right)$, the probability density at the point **y** is given as follows
[31].

We classify a test point by examining posterior probabilities in which the test point belongs to two classes, normal or ischemic ST episode. We assume we have *n*
_{
S
} points
$\left\{{\mathbf{x}}_{1}^{\left(S\right)},{\mathbf{x}}_{2}^{\left(S\right)},\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},{\mathbf{x}}_{{n}_{S}}^{\left(S\right)}\right\}$, and *n*
_{
N
} points
$\left\{{\mathbf{x}}_{1}^{\left(N\right)},{\mathbf{x}}_{2}^{\left(N\right)},\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},{\mathbf{x}}_{{n}_{N}}^{\left(N\right)}\right\}$. The first and the second set designate training sets of ischemic ST episode and normal part, respectively. Each point is described by three components
$\left({\mathit{\text{feature}}}_{1},{\mathit{\text{feature}}}_{2},{\mathit{\text{feature}}}_{3}\right)$.

We compute posterior probability in which the test point **y** belongs to each class by Bayes’ theorem as follows
[29].

The prior probability *P*(class) is given as
$P\left(\text{class}=N\right)={n}_{N}/\left({n}_{N}+{n}_{S}\right)$ or
$P\left(\text{class}=S\right)={n}_{S}/\left({n}_{N}+{n}_{S}\right)$. The likelihood
$p\left(y\mid \text{class}=N\right)$ and
$p\left(\mathbf{y}\mid \text{class}=S\right)$ reads as

The quantities ${b}_{i}^{\left(N\right)}$ and ${b}_{i}^{\left(S\right)}$ $\left(1\le i\le 3\right)$ are called kernel bandwidths. We calculate these bandwidths for each class (N or S) and component $\left(1\le i\le 3\right)$. These kernel bandwidths impact accuracy of kernel density estimation [32].

We have *n*
_{
cl
}training points
$\left\{{\mathbf{x}}_{1}^{\left(\mathrm{cl}\right)},{\mathbf{x}}_{2}^{\left(\mathrm{cl}\right)},\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},{\mathbf{x}}_{{n}_{\mathrm{cl}}}^{\left(\mathrm{cl}\right)}\right\}$ where *cl* denotes class, *N* (normal) or *S* (ischemic ST episode). For each component
$\left(1\le i\le 3\right)$ of the feature vector, we calculate the mean value of differences as follows.

We choose half of the mean,
$\frac{1}{2}{\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}$, as kernel bandwidth
${b}_{i}^{\left(\mathrm{cl}\right)}$ for each class *cl* (*N* or *S*), and component *i*
$\left(1\le i\le 3\right)$.

### Classification with the use of support vector machine

Let us assume we have *n*
_{
cl
}training points
$\left\{{\mathbf{x}}_{1}^{\left(\mathrm{cl}\right)},{\mathbf{x}}_{2}^{\left(\mathrm{cl}\right)},\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},{\mathbf{x}}_{{n}_{\mathrm{cl}}}^{\left(\mathrm{cl}\right)}\right\}$. Each point is described as
$\left({\mathit{\text{feature}}}_{1},{\mathit{\text{feature}}}_{2},{\mathit{\text{feature}}}_{3}\right)$ in a three-dimensional feature space. We construct support vector machine classifier by solving the following optimization problem
[33]

The target label
${t}_{i}^{\left(\mathrm{cl}\right)}$ is specified as 1 (normal) or -1 (ischemic ST episode). The parameter *C* controls the trade-off between the slack variable (*ξ*
_{
i
}) penalty and the margin (**w**^{T}·**w**) penalties
[29]. The dual form of the above classifier reads as follows

where the matrix *H* is expressed as
${H}_{\mathrm{ij}}\equiv {t}_{i}^{\left(\mathrm{cl}\right)}{t}_{j}^{\left(\mathrm{cl}\right)}K\left({\mathbf{x}}_{i}^{\left(\mathrm{cl}\right)},{\mathbf{x}}_{j}^{\left(\mathrm{cl}\right)}\right)={t}_{i}^{\left(\mathrm{cl}\right)}{t}_{j}^{\left(\mathrm{cl}\right)}\varphi \left({\mathbf{x}}_{i}^{\left(\mathrm{cl}\right)}\right)\xb7\varphi \left({\mathbf{x}}_{j}^{\left(\mathrm{cl}\right)}\right)={t}_{i}^{\left(\mathrm{cl}\right)}{t}_{j}^{\left(\mathrm{cl}\right)}{e}^{-\frac{1}{3}{\u2225{\mathbf{x}}_{i}^{\left(\mathrm{cl}\right)}-{\mathbf{x}}_{j}^{\left(\mathrm{cl}\right)}\u2225}^{2}}$
[33]. When we classify a new pattern **y**, we examine decision function,
$\mathrm{sgn}\left(\sum _{j=1}^{{n}_{\mathrm{cl}}}{t}_{j}^{\left(\mathrm{cl}\right)}{\alpha}_{j}K\left({\mathbf{x}}_{j}^{\left(\mathrm{cl}\right)},\mathbf{y}\right)+b\right)$. Whenever the input training set
$\left\{{\mathbf{x}}_{1}^{\left(\mathrm{cl}\right)},{\mathbf{x}}_{2}^{\left(\mathrm{cl}\right)},\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},{\mathbf{x}}_{{n}_{\mathrm{cl}}}^{\left(\mathrm{cl}\right)}\right\}$ was changed, we varied the parameter *C* to find its value which produced the highest classification rate.

### Experiments setting

We used kernel density estimation and support vector machine methods to evaluate the proposed approach. We completed the experiment for each channel and record available in the European ST-T database. First, we trained the classifier based on a subset of ST episodes and normal ECG. Then we tested how well the feature values discriminated the two classes, ST episode and normal. When we formed the ST episode data, we used all the ischemic ST episodes except ST deviations data resulted from non-ischemic causes such as position related changes in the electrical axis of the heart. To preserve balance between ST episode and normal ECG data, we collected normal data from the beginning of each record as much as the amount of ST episode data. When dividing the data into training and test sets, we assigned one tenth of data to the training data, and the rest to the test data. In the cases of e0106 lead 0, e0110, e0136, e0170, e0304, e0601, and e0615 records, we constructed the training data of one third of all data and test data of two thirds because these records had much small ischemic ST episode data. To avoid ambiguous region between ischemic ST episode and normal ECG, we removed 10 seconds amount of ECG data from each side of the boundary.

When we classified a test set
$\left\{{\mathbf{y}}_{i}\right\}$, four quantities were computed: true positive (TP), false negative (FN), false positive (FP), and true negative (TN). TP is a number of ischemic events correctly detected. FN is a number of erroneously rejected (missed) ischemic events. FP is a number of non-ischemic, that is, normal parts which the classifier erroneously detected as ischemic events. TN is a number of normal parts which our classifier correctly rejected as non-ischemic events
[34]. These are numbers of corresponding **y**
_{
i
} points which were obtained by averaging three feature values of successive five beats in Algorithm 2. The sensitivity and specificity are expressed in a usual fashion, *Se*=*TP*/(*TP* + *FN*) and *Sp*=*TN*/(*TN* + *FP*) respectively
[6].

We tested the classifiers by counting how many ST episodes were correctly caught, out of 367 episodes in the 85 records of European ST-T database. For an interval of ischemic ST episode data, we formed *n* test points
$\left\{{\mathbf{y}}_{1},{\mathbf{y}}_{2},\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},{\mathbf{y}}_{n}\right\}$ from the data (Algorithm 2), and classified each test point and then counted numbers of two classes, “ischemic” and “normal”. If the number of class “ischemic” was larger than *n*/2, we declared the interval to be an ischemic ST episode. The experiments were completed for 367 ischemic ST episodes.

We compared the results of kernel density estimation (KDE) and support vector machine (SVM) methods with those formed by artificial neural network (ANN). The corresponding ANN classifier exhibits the following topology. The input layer has three nodes which accept *featur* *e*
_{1}
*featur* *e*
_{2} and *featur* *e*
_{3}respectively. The output layer has two nodes which have target values (1, 0) and (0, 1) in the cases of “ischemia” and “normal” classes, respectively. We initialized bias weights as 0, and assigned random values between -1.0 and 1.0 to the weights of the network. The learning was carried out by running the backpropagation method
[17] for 3000 iterations. We used a sigmoid activation function
$1/\left(1+{e}^{-x}\right)$ and set learning rate 0.01. We adopted various topologies of hidden layers such as
$3\to \left(5\right)\to \left(5\right)\to 2$
$3\to \left(6\right)\to 2$
$3\to \left(7\right)\to 2$ and
$3\to \left(8\right)\to 2$ where the number in each parenthesis represents a number of nodes in the corresponding hidden layer. We used stochastic (incremental) gradient descent method to alleviate some drawbacks of the standard gradient descent method, see
[17].

## Results

### KDE with various kernels

We can use various kernels in kernel density estimation. If we have training points
$\left\{{\mathbf{x}}_{1},{\mathbf{x}}_{2},\xb7\; \xb7\; \xb7\phantom{\rule{0.3em}{0ex}},{\mathbf{x}}_{n}\right\}$ and a test point **y**, the probability density at **y** is given as follows
[35].

Here *k*
_{
G
}, *k*
_{
R
}, *k*
_{
E
}, *k*
_{
B
}, *k*
_{
Triw
} and *k*
_{
Tria
} are constants, and
${u}_{i}^{2}$ is given as
${u}_{i}^{2}\equiv \sum _{j=1}^{3}{\left(\frac{{\left[\mathbf{y}\right]}_{j}-{\left[{\mathbf{x}}_{i}\right]}_{j}}{{b}_{j}}\right)}^{2}$ because we use three feature values. The indicator function
${\mathbf{1}}_{\left\{\left|{u}_{i}\right|\le 1\right\}}$ is given as follows.

Table
1 shows classification results for various kernels. In all cases we used Daubechies8 wavelet to produce training and test sets. We took each bandwidth
${b}_{i}^{\left(\mathrm{cl}\right)}={\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}\xb7\mathit{\text{factor}}$ for class *cl*, ischemic or normal, and 1≤*i*≤3. The “detect” means how many ST episodes our classifier correctly detected, out of total 367 episodes. The “factor” in this table specifies how we multiplied on the
${\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}$ to form the kernel bandwidth
${b}_{i}^{\left(\mathrm{cl}\right)}$. We varied this factor from 0.1 to 3.0, and selected the one for which a sum of sensitivity and specificity values attains a maximum. Because the Gaussian kernel produced best results, in the sequel we will use the Gaussian kernel. Table
2 shows the results with respect to various kernel bandwidths.

### Results for KDE, SVM and ANN with various wavelets

We examined the classifiers to find out how their performance depends on the mother wavelets which were used to produce training and test sets in Algorithm 1. We used 7 wavelets, Haar, Daubechies4, Daubechies8, Daubechies10, Coiflet6, Coiflet12 and Coiflet18 [22, 36]. The number forming a part of the name of each wavelet designates the length of filter which characterizes corresponding wavelet. Figure 6 shows selected shapes of wavelet functions except for the Haar wavelet which is given as

Table
3 shows the classification results obtained for KDE. The kernel bandwidth is expressed as
${b}_{i}^{\left(\mathrm{cl}\right)}={\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}/2$ for each class *cl* and 1≤*i*≤3. We used Gaussian kernel.

Table
4 shows the classification results for the KDE with respect to various bandwidths and wavelets. The first column for each wavelet item represents the sum of sensitivity and specificity. The second column shows how many ST episodes were correctly detected. We used the kernel bandwidths
${b}_{i}^{\left(\mathrm{cl}\right)}={\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}\xb7\mathit{\text{factor}}$ for each class *cl* and 1≤*i*≤3. The sum of sensitivity and specificity becomes maximum when the bandwidth
${b}_{i}^{\left(\mathrm{cl}\right)}$ is around
${b}_{i}^{\left(\mathrm{cl}\right)}\approx {\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}/2$.

Table
5 shows the classification results obtained for SVM. The parameter *C* controls the trade-off between the slack variable (*ξ*
_{
i
}) penalty and the margin (**w**^{T}·**w**) penalties. We examined the classification accuracy versus the values of *C* changing from 0.1 to 300.0 in step of 0.1, and selected the one that made the sum of sensitivity and specificity maximal.

Table 6 shows the classification results obtained by ANN. The number in parenthesis represents the number of nodes in the corresponding hidden layer. The first, second and third column express sensitivity, specificity and the “detect” respectively. We experimented 10 times, and averaged the results because we obtained different results each time due to the random initialization of weights.

Tables 3 5 and 6 show that the Daubechies8 and Daubechies10 wavelets give us superior results. The shapes of these two wavelets are similar to typical ECG waveforms [37, 38]. From now on, we use the Daubechies8 wavelet exclusively.

### Effects of baseline wandering in ECG

Table
7 shows the classification results by KDE, SVM and ANN when we did not remove baseline wandering in ECG. If we compare this table with the Tables
3,
5 and
6, we get to know it is essential to remove baseline wandering in Algorithm 1. In the Table
7, we selected the kernel bandwidths
${b}_{i}^{\left(\mathrm{cl}\right)}$ in the KDE classifier as
${b}_{i}^{\left(\mathrm{cl}\right)}={\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}/2$,
$\left(1\le i\le 3\right)$. We used the ANN classifier with sizes of layers expressed as
$3\to \left(7\right)\to 2$. The results of ANN were obtained by averaging results for 10 repetition of the experiments. The parameter *C* of the SVM classifier was 297.9.

If we use unsuitable wavelet scale like the one in Figure 3 to remove baseline wandering, it becomes difficult to obtain good results. As the sampling frequency was 250 Hz, we selected the wavelet scale $\u2308\underset{2}{log}250\u2309=8$ in Algorithm 1. Table 8 shows the classification results when wrong wavelet scales were selected. The kernel bandwidth setting in KDE and layer composition of ANN classifier were same as the Table 7. The middle row of wavelet scale 8 in Table 8 was our choice in Algorithm 1. Each entry in the row of wavelet scale 8 has counterparts in “Daubechies8” rows in Tables 3, 5 and 6.

### Effects of simulated noise

We examined performance of the classifiers when we added simulated noise into the original ECG signal. We modeled the noise as the sum of wandering baseline and AC power line 60 Hz noise.

Let us assume we have original signal data, *ecg*(*i*)
$\left(1\le i\le n\right)$. First, we compute mean value and standard deviation of the ECG signal as
$m=\left(\sum _{i=1}^{n}\mathrm{ecg}\left(i\right)\right)/n$ and
$s=\sqrt{\left(\sum _{i=1}^{n}{\left(\mathit{\text{ecg}}\left(i\right)\right)}^{2}\right)/n-{m}^{2}}$. Then we form a new signal *ec* *g*^{″}(*i*) by

where *a* is an amplification factor and *b* is an angular frequency of the added baseline. Here *Samp* _*Freq* means sampling frequency which was 250 Hz in our case. We varied *a* from 0.1 to 1.0 in step of 0.1, and selected *b* to be equal to 2, 4 or 6.

Figure
7 shows the original ECG and its noise-impacted version. Tables
9,
10 and
11 show the experimental results for the noisy ECG signal. The first, second and third column in each *b* item represent the sensitivity, specificity and the “detect” respectively. The kernel bandwidth is set as
${b}_{i}^{\left(\mathrm{cl}\right)}={\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}/2$ for the KDE classifier. The layer composition of the ANN classifier was
$3\to \left(7\right)\to 2$. The first column in each *b* item in Table
10 includes the trade-off parameter *C* which produced best results.

### Comparison with others’ works

To compare our approach with others’ works, we tested the classifiers on 10 selected records, e0103, e0104, e0105, e0108, e0113, e0114, e0147, e0159, e0162 and e0206. Table 12 shows results of comparison. The papers by Papaloukas et al. [10], Goletsis et al. [39], Exarchos et al. [13] and Murugan et al. [15] in Table 12 dealt with the 10 records.

We used the Daubechies8 wavelet in Algorithm 1 to analyze the ECG waveform, and took the kernel bandwidths
${b}_{i}^{\left(\mathrm{cl}\right)}={\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}/2$ for the KDE classifier with Gaussian kernel. We used the SVM classifier with *C*=281.1.

## Discussion

Table 1 showed how the classification results were dependent on various kernel functions in kernel density estimation. Gaussian kernel produced best results.

Tables 3, 4, 5 and 6 show how the classification results depend on mother wavelets used in Algorithm 1. Daubechies8 and Daubechies10 wavelets were best. Because we implemented wavelet transform program with the use of matrix multiplication, we selected Daubechies8 wavelet to reduce computational burden. Daubechies10 wavelet did not produce much better classification accuracy than Daubechies8 wavelet.

Tables
2 and
4 indicate that the choice of kernel bandwidths was reasonable. When we took the kernel bandwidths
${b}_{i}^{\left(\mathrm{cl}\right)}={\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}/2$ for class *cl*, 1≤*i*≤3, we obtained best results except for the case of Coiflet18 wavelet. Even in the case, the best parameter
${b}_{i}^{\left(\mathrm{cl}\right)}=0.4\xb7{\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}$ was close enough to
${b}_{i}^{\left(\mathrm{cl}\right)}={\mathit{\text{mean}}}_{i}^{\left(\mathrm{cl}\right)}/2$. We maintained this choice in Tables
7,
8 and
9. In this way, we could automatically select 6 kernel bandwidths, and this exempted us from choosing any numerical parameters.

The SVM classifiers in Tables
5,
7 and
8 produced better results than the KDE classifiers, but they required us to determine optimal value of the parameter *C*. Whenever we used different wavelets on the same data set in Table
5, we had to choose different trade-off parameter *C*. This was also the case in Table
8 where we intentionally selected incorrect wavelet scales to remove baseline wandering.

Order of magnitude of *feature*
_{3}was very different from *feature*
_{1}and *feature*
_{2}. When we produced the feature values using Daubechies8 wavelet in Algorithm 1, mean values of
$\left|{\mathit{\text{feature}}}_{1}\right|$,
$\left|{\mathrm{feature}}_{2}\right|$ and
$\left|{\mathrm{feature}}_{3}\right|$ were 7.327, 7.613 and 0.004, respectively. Thus we had to normalize the feature values to use them in classification. Even if the orders of magnitude of *featur* *e*
_{1}, *featur* *e*
_{2} and *featur* *e*
_{3}were very different, the equation of kernel density estimation included a term
$\frac{1}{{b}_{1}^{\left(\mathrm{cl}\right)}{b}_{2}^{\left(\mathrm{cl}\right)}{b}_{3}^{\left(\mathrm{cl}\right)}}\sum _{i}{e}^{-\frac{1}{2}\sum _{j=1}^{3}{\left(\frac{{\left[\mathbf{y}\right]}_{j}-{\left[{\mathbf{x}}_{i}^{\left(\mathrm{cl}\right)}\right]}_{j}}{{b}_{j}^{\left(\mathrm{cl}\right)}}\right)}^{2}}$. Furthermore each operand in the sum comes in the form of
$\frac{{\left[\mathbf{y}\right]}_{j}-{\left[{\mathbf{x}}_{i}^{\left(\mathrm{cl}\right)}\right]}_{j}}{{b}_{j}^{\left(\mathrm{cl}\right)}}$, normalization by kernel bandwidth. We thought these would be helpful to overcome the difference of order of magnitude between *featur* *e*
_{1}, *featur* *e*
_{2} and *featur* *e*
_{3}. This was a main driving force to adopt the kernel density estimation.

We implemented the KDE and ANN classifier in C language for ourselves. For SVM classifier, we used libsvm library [33]. We compiled the programs with gcc and g++ without using any SIMD (single instruction multiple data) math library. Total amount of ECG text files which we used in our analysis was 200.4 MB. This amount is just about voltage information not including time information. When we ran our programs to process the ECG text files in Pentium4 3.2 GHz CPU, it took 243.0 seconds until the procedures of removing baseline wandering and detecting time positions in Algorithm 1 were completed. This was when we used Daubechies8 wavelet. Feature extraction in Algorithm 2, required 0.6 seconds. It took 1.2 seconds for the KDE classifier to process all the files. The SVM classifier required 0.8 seconds for the same job. The ANN classifier with layer composition $3\to \left(7\right)\to 2$ required 94.7 seconds.

We compared our QRS detection algorithm with Hamilton and Tompkins’ algorithm
[40] which was implemented in C language as an open source software
[41]. We supplanted the portion from DWT of *fecg*(*n*) to making *idx* _*QRS* _*Peak*(*n*) in Algorithm 1, with the Hamilton and Tompkins’ program. When we ran the modified program to process the procedures of removing baseline wandering and detecting time positions, it took 59.5 seconds which was approximately four times faster than ours. However the KDE classifier produced the results of (sensitivity, specificity, detect) being (0.904, 0.891, 329). These results are somewhat inferior compared to the results in Table
2.

## Conclusions

The ST segment deviation in ECG can be an indicator of myocardial ischemia. If we can predict an ischemic syndrome as early as possible, we will be able to prevent more severe heart disease such as myocardial infarction [8, 9].

To detect ischemic ST episode, we adopted a method directly using morphological features of ECG waveforms. We did not use weight tuning methods such as artificial neural network or decision tree because we wanted to show explicitly which features of ECG waveforms were meaningful to detect ischemic ST episodes. In this regard, we calculated three feature values for each heart beat. They were area between QRS offset and T-peak points, normalized and signed sum from QRS offset to effective zero voltage point, and slope from QRS onset to offset point. After calculating these feature values for each heart beat, we averaged the values of successive five beats because we wanted to reduce outlier effects. The order of magnitude of the third feature value, the slope from QRS onset to offset point, was very different from the other two feature values. To take care of this problem, we considered classification method by kernel density estimation.

We described how we removed baseline wandering in ECG, and detected time positions of QRS complexes by the discrete wavelet transform. Since our classifier selects automatically kernel bandwidths in kernel density estimation, virtually it does not require any numerical parameter which operator should provide. In the tests, SVM with optimal parameters showed just a slightly better classification accuracy than the proposed method, but finding those parameters is a heavy burden compared with the proposed method. We can conclude that overall our proposed method is efficient enough and has more advantages than existing methods.

## References

- 1.
Kusumoto FM:

*Cardiovascular Pathophysiology*. North Carolina: Hayes Barton Press; 2004. - 2.
Brownfield J, Herbert M:

**EKG Criteria for Fibrinolysis: What’s Up with the J Point?***Western Journal of Emergency Medicine*2008,**9:**40–42. - 3.
Rabbani H, Mahjoob MP, Farahabadi E, Farahabadi A, Dehnavi AM:

**Ischemia detection by electrocardiogram in wavelet domain using entropy measure.***Journal of Research in Medical Sciences*2011,**16**(11):1473–1482. - 4.
Lemire D, Pharand C, Rajaonah J, Dube B, LeBlanc AR:

**Wavelet time entropy, T wave morphology and myocardial ischemia.***IEEE Transactions on Biomedical Engineering*2000,**47**(7):967–970. 10.1109/10.846692 - 5.
Pang L, Tchoudovski I, Braecklein M, Egorouchkina K, Kellermann W, Bolz A:

**Real time heart ischemia detection in the smart home care system.***Proceedings IEEE Engineering Medicine Biology Society*2005, 3703–3706. - 6.
Tonekabonipour H, Emam A, Teshnelab M, Shoorehdeli MA:

**Ischemia prediction via ECG using MLP and RBF predictors with ANFIS classifiers.***Seventh International Conference on Natural Computation*2011, 776–780. - 7.
Stamkopoulos T, Diamantaras K, Maglaveras N, Strintzis M:

**ECG analysis using nonlinear PCA neural networks for ischemia detection.***IEEE Transactions on Signal Processing*1998,**46**(11):3058–3067. 10.1109/78.726818 - 8.
Maglaveras N, Stamkopoulos T, Pappas C, Strintzis MG:

**An adaptive backpropagation neural network for real-time ischemia episodes detection: development and performance analysis using the European ST-T database.***IEEE transactions on bio-medical engineering*1998,**45:**805–813. 10.1109/10.686788 - 9.
Afsar FA, Arif M, Yang J:

**Detection of ST segment deviation episodes in ECG using KLT with an ensemble neural classifier.***Physiological measurement*2008,**29**(7):747–760. 10.1088/0967-3334/29/7/004 - 10.
Papaloukas C, Fotiadis DI, Likas A, Michalis LK:

**An ischemia detection method based on artificial neural networks.***Artificial Intelligence in Medicine*2002,**24**(2):167–178. 10.1016/S0933-3657(01)00100-2 - 11.
Andreao RV, Dorizzi B, Boudy J, Mota JCM:

**ST-segment analysis using hidden Markov Model beat segmentation: application to ischemia detection.***Computers in Cardiology*2004, 381–384. - 12.
Faganeli J, Jager F:

**Automatic distinguishing between ischemic and heart-rate related transient ST segment episodes in ambulatory ECG records.***Computers in Cardiology*2008, 381–384. - 13.
Exarchos TP, Tsipouras MG, Exarchos CP, Papaloukas C, Fotiadis DI, Michalis LK:

**A methodology for the automated creation of fuzzy expert systems for ischaemic and arrhythmic beat classification based on a set of rules obtained by a decision tree.***Artificial Intelligence in Medicine*2007,**40**(3):187–200. 10.1016/j.artmed.2007.04.001 - 14.
Garcia J, Sörnmo L, Olmos S, Laguna P:

**Automatic detection of ST-T complex changes on the ECG using filtered RMS difference series: application to ambulatory ischemia monitoring.***IEEE Transactions on Biomedical Engineering*2000,**47**(9):1195–1201. 10.1109/10.867943 - 15.
Murugan S, Radhakrishnan S:

**Rule Based Classification Of Ischemic ECG Beats Using Ant-Miner.***International Journal of Engineering Science and Technology*2010,**2**(8):3929–3935. - 16.
Bakhshipour A, Pooyan M, Mohammadnejad H, Fallahi A:

**Myocardial ischemia detection with ECG analysis, using Wavelet Transform and Support Vector Machines. In.***17th Iranian Conference of Biomedical Engineering (ICBME)*2010, 1–4. - 17.
Mitchell TM:

*Machine Learning*. New York: McGraw-Hill; 1997. - 18.
Taddei A, Distante G, Emdin M, Pisani P, Moody GB, Zeelenberg C, Marchesi C:

**The European ST-T database: standard for evaluating systems for the analysis of ST-T changes in ambulatory electrocardiography.***European Heart Journal*1992,**13**(9):1164–1172. - 19.
Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PC, Mark RG, Mietus JE, Moody GB, Peng CK, Stanley HE:

**PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals.***Circulation*2000,**101**(23):e215-e220. [Circulation Electronic Pages:[doi:10.1161/01.CIR.101.23.e215] http://circ.ahajournals.org/cgi/content/full/101/23/e215PMID:1085218. - 20.
Jané R, Laguna P, Thakor NV, Caminal P, Adaptive baseline wander removal in the ECG:

**Comparative analysis with cubic spline technique.***Computers in Cardiology*1992, 143–146. - 21.
Sörnmo L:

**Time-varying digital filtering of ECG baseline wander.***Medical and Biological Engineering and Computing*1993,**31**(5):503–508. 10.1007/BF02441986 - 22.
Rao RM, Bopardikar AS:

*Wavelet transforms - introduction to theory and applications. Reading*. Massachusetts: Addison-Wesley-Longman; 1997. - 23.
Oppenheim AV, Schafer RW, Buck JR:

*Discrete-time signal processing. Englewood Cliffs, New Jersey*. Prentice-Hall: Inc; 1989. - 24.
Aspiras TH, Asari VK:

**Analysis of spatiotemporal relationship of multiple energy spectra of EEG data for emotion recognition.***The Fifth International Conference on Information Processing*2011, 572–581. - 25.
**Discrete wavelet transformation frequencies**[ http://visual.cs.utsa.edu/research/projects/davis/visualizations/wavelet/frequency-bands] - 26.
Arvinti B, Toader D, Costache M, Isar A:

**Electrocardiogram baseline wander removal using stationary wavelet approximations.***12th International Conference on Optimization of Electrical and Electronic Equipment*2010, 890–895. - 27.
Censi F, Calcagnini G, Triventi M, Mattei E, Bartolini P, Corazza I, Boriani G:

**Effect of high-pass filtering on ECG signal on the analysis of patients prone to atrial fibrillation.***Ann Ist Super Sanita*2009,**45**(4):427–431. - 28.
Vila J, Presedo J, Delgado M, Barro S, Ruiz R, Palacios F:

**SUTIL: intelligent ischemia monitoring system.***International Journal of Medical Informatics*1998,**47**(6):193–214. - 29.
Bishop CM:

*Pattern Recognition and Machine Learning*. New York LLC: Springer Science + Business Media; 2006. - 30.
Scott DW, Sain SR:

**Multi-dimensional Density Estimation.**In*Handbook of Statistics, Volume 24*. North-Holland Publishing Co; 2005:229–261. [Data Mining and Data Visualization] - 31.
Duda RO, Hart PE, Stork DG:

*Pattern Classification*. Wiley-Interscience: New York; 2000. - 32.
Turlach BA:

**Bandwidth Selection in Kernel Density Estimation: A Review.***CORE and Institut de Statistique*1993, 1–33. - 33.
Chang CC, Lin CJ:

**LIBSVM: A library for support vector machines.***ACM Transactions on Intelligent Systems and Technology*2011,**2**(3):27:1–27:27. [Software available at, http://www.csie.ntu.edu.tw/cjlin/libsvm] - 34.
Jager F, Moody GB, Taddei A, Mark RG:

**Performance measures for algorithms to detect transient ischemic ST segment changes.***Computers in Cardiology*1991, 369–372. - 35.
Izenman AJ:

*Modern multivariate statistical techniques: regression, classification, and manifold learning. Springer texts in statistics*. New York: Springer; 2008. - 36.
Chau FT, Liang YZ, Gao J, Shao XG:

*Chemometrics: from basics to wavelet transform. Chemical analysis*. New Jersey: John Wiley; 2004. - 37.
Martis RJ, Chakraborty C, Ray AK:

**An Integrated ECG Feature Extraction Scheme Using PCA and Wavelet Transform.***2009 Annual IEEE India Conference*2009, 1–4. - 38.
Mahmoodabadi S, Ahmadian A, Abolhasani M, Eslami M, Bidgoli J:

**ECG Feature Extraction Based on Multiresolution Wavelet Transform.***Conference Proceedings of the International Conference of IEEE Engineering in Medicine and Biology Society*2005, 3902–3905. - 39.
Goletsis Y, Papaloukas C, Fotiadis DI, Likas A, Michalis LK:

**Automated ischemic beat classification using genetic algorithms and multicriteria decision analysis.***IEEE Transaction Biomedical Engineering*2004,**51**(10):1717–1725. 10.1109/TBME.2004.828033 - 40.
Hamilton PS, Tompkins WJ:

**Quantitative investigation of QRS detection rules using the MIT/BIH arrhythmia database.***IEEE Transactions on Biomedical Engineering*1986,**33**(12):1157–1165. - 41.
**EP Limited: Open Source Software**[ http://www.eplimited.com/software.htm]

## Acknowledgements

This work was supported by the systems biology infrastructure establishment grant provided by Gwangju Institute of Science & Technology, Korea.

## Author information

### Affiliations

### Corresponding author

## Additional information

### Competing interests

The authors declare that they have no competing interests.

### Authors’ contributions

Mr. Park implemented the whole algorithm, and wrote the manuscript. Dr. Pedrycz proofread it and provided useful technical comments. Dr. Jeon designed the experiments and checked the validity of the proposed methods. All authors read and approved the final manuscript.

## Authors’ original submitted files for images

Below are the links to the authors’ original submitted files for images.

## Rights and permissions

## About this article

### Cite this article

Park, J., Pedrycz, W. & Jeon, M. Ischemia episode detection in ECG using kernel density estimation, support vector machine and feature selection.
*BioMed Eng OnLine* **11, **30 (2012). https://doi.org/10.1186/1475-925X-11-30

Received:

Accepted:

Published:

### Keywords

- Myocardial ischemia
- Discrete wavelet transform
- Kernel density estimation
- Support vector machine
- QRS complex detection
- ECG baseline wandering removal