| Literature DB >> 25685438 |
Indu Saini1, Dilbag Singh2, Arun Khosla1.
Abstract
The performance of computer aided ECG analysis depends on the precise and accurate delineation of QRS-complexes. This paper presents an application of K-Nearest Neighbor (KNN) algorithm as a classifier for detection of QRS-complex in ECG. The proposed algorithm is evaluated on two manually annotated standard databases such as CSE and MIT-BIH Arrhythmia database. In this work, a digital band-pass filter is used to reduce false detection caused by interference present in ECG signal and further gradient of the signal is used as a feature for QRS-detection. In addition the accuracy of KNN based classifier is largely dependent on the value of K and type of distance metric. The value of K = 3 and Euclidean distance metric has been proposed for the KNN classifier, using fivefold cross-validation. The detection rates of 99.89% and 99.81% are achieved for CSE and MIT-BIH databases respectively. The QRS detector obtained a sensitivity Se = 99.86% and specificity Sp = 99.86% for CSE database, and Se = 99.81% and Sp = 99.86% for MIT-BIH Arrhythmia database. A comparison is also made between proposed algorithm and other published work using CSE and MIT-BIH Arrhythmia databases. These results clearly establishes KNN algorithm for reliable and accurate QRS-detection.Entities:
Keywords: Classifier; Cross-validation; ECG; Gradient; KNN; QRS detection
Year: 2012 PMID: 25685438 PMCID: PMC4293876 DOI: 10.1016/j.jare.2012.05.007
Source DB: PubMed Journal: J Adv Res ISSN: 2090-1224 Impact factor: 10.479
Fig. 2Results obtained at each step of the algorithm for lead V6 of record MO1_036 of CSE database: (a) raw ECG, (b) filtered ECG, (c) gradient curve of the ECG signal and (d) QRS locations.
Fig. 3Gradient of a curve.
Averaged classification accuracy using fivefold cross-validation for different values of K and distance metrics.
| Distance metrics | |||||
|---|---|---|---|---|---|
| Euclidean (EU) | 99.67 | 99.73 | 99.73 | 99.72 | |
| City Block (CB) | 99.55 | 99.73 | 99.71 | 99.71 | 99.71 |
| Correlation (CO) | 99.58 | 99.74 | 99.73 | 99.72 | 99.72 |
Results of evaluating the KNN algorithm using CSE database.
| Record | Actual peak | Detected peak | TP | FP | FN | Detection rate (%) |
|---|---|---|---|---|---|---|
| MO1_001 | 11 | 11 | 11 | – | – | 100 |
| MO1_002 | 19 | 19 | 19 | – | – | 100 |
| MO1_003 | 17 | 17 | 17 | – | – | 100 |
| MO1_004 | 12 | 12 | 12 | – | – | 100 |
| MO1_005 | 17 | 17 | 17 | – | – | 100 |
| MO1_006 | 16 | 16 | 16 | – | – | 100 |
| MO1_007 | 17 | 17 | 17 | – | – | 100 |
| MO1_008 | 10 | 10 | 10 | – | – | 100 |
| MO1_009 | 12 | 12 | 12 | – | – | 100 |
| MO1_010 | 07 | 07 | 07 | – | – | 100 |
| MO1_011 | 15 | 15 | 15 | – | – | 100 |
| MO1_012 | 13 | 13 | 13 | – | – | 100 |
| MO1_013 | 12 | 12 | 12 | – | – | 100 |
| MO1_014 | 08 | 08 | 08 | – | – | 100 |
| MO1_015 | 06 | 06 | 06 | – | – | 100 |
| MO1_016 | 16 | 16 | 16 | – | – | 100 |
| MO1_017 | 10 | 10 | 10 | – | – | 100 |
| MO1_018 | 15 | 15 | 15 | – | – | 100 |
| MO1_019 | 13 | 13 | 13 | – | – | 100 |
| MO1_020 | 22 | 22 | 22 | – | – | 100 |
| MO1_021 | 07 | 07 | 07 | – | – | 100 |
| MO1_022 | 12 | 12 | 12 | – | – | 100 |
| MO1_023 | 08 | 08 | 08 | – | – | 100 |
| MO1_024 | 09 | 09 | 09 | – | – | 100 |
| MO1_025 | 10 | 10 | 10 | – | – | 100 |
| MO1_026 | 13 | 13 | 13 | – | – | 100 |
| MO1_027 | 14 | 14 | 14 | – | – | 100 |
| MO1_028 | 10 | 10 | 10 | – | – | 100 |
| MO1_029 | 10 | 10 | 10 | – | – | 100 |
| MO1_030 | 12 | 12 | 12 | – | – | 100 |
| MO1_031 | 11 | 11 | 11 | – | – | 100 |
| MO1_032 | 14 | 14 | 14 | – | – | 100 |
| MO1_033 | 09 | 09 | 09 | – | – | 100 |
| MO1_034 | 12 | 12 | 12 | – | – | 100 |
| MO1_035 | 11 | 11 | 11 | – | – | 100 |
| MO1_036 | 12 | 12 | 12 | – | – | 100 |
| MO1_037 | 13 | 13 | 13 | – | – | 100 |
| MO1_038 | 11 | 11 | 11 | – | – | 100 |
| MO1_039 | 09 | 09 | 09 | – | – | 100 |
| MO1_040 | 12 | 12 | 12 | – | – | 100 |
| MO1_041 | 11 | 11 | 11 | – | – | 100 |
| MO1_042 | 11 | 11 | 11 | – | – | 100 |
| MO1_043 | 10 | 10 | 10 | – | – | 100 |
| MO1_044 | 08 | 08 | 08 | – | – | 100 |
| MO1_045 | 13 | 13 | 13 | – | – | 100 |
| MO1_046 | 12 | 12 | 12 | – | – | 100 |
| MO1_047 | 16 | 16 | 16 | – | – | 100 |
| MO1_048 | 10 | 10 | 10 | – | – | 100 |
| MO1_049 | 11 | 11 | 11 | – | – | 100 |
| MO1_050 | 08 | 08 | 08 | – | – | 100 |
| MO1_051 | 20 | 20 | 20 | – | – | 100 |
| MO1_052 | 15 | 15 | 15 | – | – | 100 |
| MO1_053 | 17 | 16 | 16 | – | 01 | 94.11 |
| MO1_054 | 07 | 07 | 07 | – | – | 100 |
| MO1_055 | 09 | 09 | 09 | – | – | 100 |
| MO1_056 | 10 | 10 | 10 | – | – | 100 |
| MO1_057 | 10 | 10 | 10 | – | – | 100 |
| MO1_058 | 15 | 15 | 15 | – | – | 100 |
| MO1_059 | 08 | 08 | 08 | – | – | 100 |
| MO1_060 | 12 | 12 | 12 | – | – | 100 |
| MO1_061 | 13 | 13 | 13 | – | – | 100 |
| MO1_062 | 11 | 11 | 11 | – | – | 100 |
| MO1_063 | 09 | 09 | 09 | – | – | 100 |
| MO1_064 | 11 | 11 | 11 | – | – | 100 |
| MO1_065 | 12 | 12 | 12 | – | – | 100 |
| MO1_066 | 10 | 10 | 10 | – | – | 100 |
| MO1_067 | 12 | 12 | 12 | – | – | 100 |
| MO1_068 | 16 | 16 | 16 | – | – | 100 |
| MO1_069 | 13 | 13 | 13 | – | – | 100 |
| MO1_070 | 12 | 12 | 12 | – | – | 100 |
| MO1_071 | 14 | 14 | 14 | – | – | 100 |
| MO1_072 | 11 | 11 | 11 | – | – | 100 |
| MO1_073 | 13 | 13 | 13 | – | – | 100 |
| MO1_074 | 10 | 10 | 10 | – | – | 100 |
| MO1_075 | 13 | 13 | 13 | – | – | 100 |
| MO1_076 | 13 | 13 | 13 | – | – | 100 |
| MO1_077 | 12 | 12 | 12 | – | – | 100 |
| MO1_078 | 07 | 07 | 07 | – | – | 100 |
| MO1_079 | 09 | 09 | 09 | – | – | 100 |
| MO1_080 | 09 | 09 | 09 | – | – | 100 |
| MO1_081 | 12 | 12 | 12 | – | – | 100 |
| MO1_082 | 09 | 09 | 09 | – | – | 100 |
| MO1_083 | 15 | 15 | 15 | – | – | 100 |
| MO1_084 | 10 | 10 | 10 | – | – | 100 |
| MO1_085 | 11 | 11 | 11 | – | – | 100 |
| MO1_086 | 09 | 09 | 09 | – | – | 100 |
| MO1_087 | 09 | 09 | 09 | – | – | 100 |
| MO1_088 | 09 | 09 | 09 | – | – | 100 |
| MO1_089 | 06 | 06 | 06 | – | – | 100 |
| MO1_090 | 08 | 08 | 08 | – | – | 100 |
| MO1_091 | 09 | 09 | 09 | – | – | 100 |
| MO1_092 | 11 | 11 | 11 | – | – | 100 |
| MO1_093 | 09 | 09 | 09 | – | – | 100 |
| MO1_094 | 10 | 10 | 10 | – | – | 100 |
| MO1_095 | 08 | 08 | 08 | – | – | 100 |
| MO1_096 | 08 | 08 | 08 | – | – | 100 |
| MO1_097 | 09 | 09 | 09 | – | – | 100 |
| MO1_098 | 11 | 11 | 11 | – | – | 100 |
| MO1_099 | 10 | 10 | 10 | – | – | 100 |
| MO1_100 | 15 | 15 | 15 | – | – | 100 |
| MO1_101 | 16 | 16 | 16 | – | – | 100 |
| MO1_102 | 16 | 16 | 16 | – | – | 100 |
| MO1_103 | 11 | 11 | 11 | – | – | 100 |
| MO1_104 | 08 | 08 | 08 | – | – | 100 |
| MO1_105 | 14 | 14 | 14 | – | – | 100 |
| MO1_106 | 10 | 10 | 10 | – | – | 100 |
| MO1_107 | 14 | 14 | 14 | – | – | 100 |
| MO1_108 | 16 | 16 | 16 | – | – | 100 |
| MO1_109 | 15 | 14 | 14 | – | 01 | 93.33 |
| MO1_110 | 15 | 15 | 15 | – | – | 100 |
| MO1_111 | 20 | 21 | 20 | 01 | – | 100 |
| MO1_112 | 13 | 13 | 13 | – | – | 100 |
| MO1_113 | 17 | 17 | 17 | – | – | 100 |
| MO1_114 | 11 | 11 | 11 | – | – | 100 |
| MO1_115 | 20 | 20 | 20 | – | – | 100 |
| MO1_116 | 13 | 13 | 13 | – | – | 100 |
| MO1_117 | 12 | 12 | 12 | – | – | 100 |
| MO1_118 | 11 | 11 | 11 | – | – | 100 |
| MO1_119 | 18 | 18 | 18 | – | – | 100 |
| MO1_120 | 09 | 09 | 09 | – | – | 100 |
| MO1_121 | 10 | 10 | 10 | – | – | 100 |
| MO1_122 | 15 | 15 | 15 | – | – | 100 |
| MO1_123 | 13 | 13 | 13 | – | – | 100 |
| MO1_124 | 11 | 12 | 11 | 01 | – | 100 |
| MO1_125 | 12 | 12 | 12 | – | – | 100 |
| Total | 1488 | 1488 | 1486 | 02 | 02 | 99.89% |
Comparison of proposed KNN algorithm with other QRS detection algorithms using CSE database.
| Database | QRS detector | Reference | Detection rate (%) |
|---|---|---|---|
| CSE database | KNN algorithm | Using proposed algorithm | 99.89 |
| SVM algorithm | 99.75 | ||
| Length and energy transformation | 99.60 | ||
| Time recursive prediction technique | 99.00 | ||
| 98.66 | |||
| Bottom up approach | 98.49 | ||
| Mathematical morphology | 99.38 | ||
| An integrated pattern recognition method | 99.83 | ||
| Predictive neural network based technique to detect QRS complexes | 98.96 |
Fig. 4QRS detection in record MO1_008 of CSE database.
Fig. 5QRS detection in record MO1_109 of CSE database.
Fig. 6QRS detection in record MO1_124 of CSE database.
Results of evaluating the KNN algorithm using MIT-BIH Arrhythmia database.
| Data no. | Actual peaks | Detected peaks | TP | FP | FN | Det. rate (%) |
|---|---|---|---|---|---|---|
| 100 | 2273 | 2273 | 2273 | 00 | 00 | 100 |
| 101 | 1865 | 1865 | 1865 | 00 | 00 | 100 |
| 102 | 2187 | 2187 | 2187 | 00 | 00 | 100 |
| 103 | 2084 | 2084 | 2084 | 00 | 00 | 100 |
| 104 | 2229 | 2218 | 2214 | 04 | 15 | 99.33 |
| 105 | 2572 | 2557 | 2560 | 01 | 12 | 99.53 |
| 106 | 2027 | 2033 | 2026 | 07 | 01 | 99.95 |
| 107 | 2137 | 2137 | 2137 | 00 | 00 | 100 |
| 108 | 1763 | 1753 | 1751 | 02 | 12 | 99.32 |
| 109 | 2532 | 2532 | 2532 | 00 | 00 | 100 |
| 111 | 2124 | 2124 | 2124 | 00 | 00 | 100 |
| 112 | 2539 | 2539 | 2538 | 01 | 01 | 99.96 |
| 113 | 1795 | 1795 | 1795 | 00 | 00 | 100 |
| 114 | 1879 | 1879 | 1872 | 07 | 07 | 99.63 |
| 115 | 1953 | 1953 | 1953 | 00 | 00 | 100 |
| 116 | 2412 | 2411 | 2411 | 00 | 01 | 99.96 |
| 117 | 1535 | 1537 | 1535 | 02 | 00 | 100 |
| 118 | 2278 | 2280 | 2278 | 02 | 00 | 100 |
| 119 | 1987 | 1997 | 1987 | 10 | 00 | 100 |
| 121 | 1863 | 1863 | 1863 | 00 | 00 | 100 |
| 122 | 2476 | 2476 | 2476 | 00 | 00 | 100 |
| 123 | 1518 | 1518 | 1518 | 00 | 00 | 100 |
| 124 | 1619 | 1619 | 1619 | 00 | 00 | 100 |
| 200 | 2601 | 2598 | 2583 | 15 | 18 | 99.31 |
| 201 | 1963 | 1947 | 1943 | 04 | 20 | 98.98 |
| 202 | 2136 | 2145 | 2135 | 10 | 01 | 99.95 |
| 203 | 2980 | 2975 | 2965 | 10 | 15 | 99.49 |
| 205 | 2656 | 2654 | 2653 | 01 | 03 | 99.88 |
| 207 | 2332 | 2325 | 2312 | 13 | 20 | 99.14 |
| 208 | 2955 | 2955 | 2951 | 04 | 04 | 99.86 |
| 209 | 3005 | 3006 | 3004 | 02 | 01 | 99.96 |
| 210 | 2650 | 2645 | 2643 | 02 | 07 | 99.73 |
| 212 | 2748 | 2749 | 2747 | 02 | 01 | 99.96 |
| 213 | 3251 | 3254 | 3249 | 05 | 02 | 99.94 |
| 214 | 2262 | 2264 | 2262 | 02 | 00 | 100 |
| 215 | 3363 | 3364 | 3361 | 03 | 02 | 99.94 |
| 217 | 2208 | 2202 | 2199 | 03 | 09 | 99.59 |
| 219 | 2154 | 2146 | 2144 | 02 | 10 | 99.53 |
| 220 | 2048 | 2049 | 2045 | 04 | 03 | 99.85 |
| 221 | 2427 | 2427 | 2423 | 04 | 04 | 99.83 |
| 222 | 2483 | 2476 | 2468 | 08 | 15 | 99.39 |
| 223 | 2605 | 2604 | 2598 | 06 | 07 | 99.73 |
| 228 | 2053 | 2052 | 2047 | 05 | 06 | 99.70 |
| 230 | 2256 | 2255 | 2255 | 00 | 01 | 99.95 |
| 231 | 1571 | 1571 | 1571 | 00 | 00 | 100 |
| 232 | 1780 | 1779 | 1776 | 03 | 04 | 99.77 |
| 233 | 3079 | 3079 | 3075 | 04 | 04 | 99.87 |
| 234 | 2753 | 2755 | 2752 | 03 | 01 | 99.96 |
| 48 patients | 109,966 | 109,910 | 109,759 | 151 | 207 | 99.81 |
Fig. 7QRS detection in record no. 201 of MIT-BIH Arrhythmia database.
Fig. 8QRS detection in record no. 207 of MIT-BIH Arrhythmia database.
Comparison of proposed KNN algorithm with other QRS detection algorithms using MIT-BIH Arrhythmia database.
| Database | QRS detector | Reference | Detection rate (%) |
|---|---|---|---|
| MIT-BIH database (109,966 beats) | KNN algorithm | Using proposed algorithm | 99.81 |
| MIT-BIH database (109,809 beats) | A real-time QRS detection based upon digital analysis of slope, amplitude and width | 99.30 | |
| MIT-BIH database (109,267 beats) | QRS detection using optimized decision rule process | 99.46 | |
| MIT-BIH database (Record 105) | NN based adaptive matched filtering for QRS detection | 99.50 | |
| MIT-BIH database (104,181 beats) | Detection of ECG characteristic points using wavelet transform | 99.83 | |
| MIT-BIH database (2572 beats) | QRS detection based on optimized prefiltering in conjunction with matched filter and dual edge threshold | 97.80 | |
| MIT-BIH database (14,481 beats) | Use of wavelet transform for ECG characterization | 98.78 | |
| MIT-BIH database (103,763 beats) | WT based QRS detection | 99.80 | |
| MIT-BIH database (109,428 beats) | WT based QRS detection | 99.66 | |
| MIT-BIH database (110,050 beats) | QRS detection using combined adaptive threshold | 99.74 | |
| MIT-BIH database (110,050) | Empirical mode decomposition | 99.84 | |
| MIT-BIH database (109488) | Multi wavelet packet decomposition | 99.14 | |
| MIT-BIH database (109,481) | Shannon energy envelope (SEE) estimator | 99.80 |