ECG Signal Classification Using Hjorth Descriptor
Achmad Rizal
School of Electrical EngineeringTelkom University Bandung, Indonesia [email protected]
Sugondo Hadiyoso
Telkom Applied Science SchoolTelkom University Bandung, Indonesia [email protected]
Abstract— ECG signal occurs due to heart’s electrical activity and helps detect and record people’s heart health. Many of methods had been formerly developed to automatically classify this signal. In this research, Hjorth Descriptor is used as a method for feature extraction. K-Nearest Neighbor (KNN) and Multilayer Perceptron (MLP) are used as classifier in classification stage. Experiment result show that both K-NN and MLP achieve accuracy up to 100% for for testing use 50% of data as test data and obtain 99.33% accuracy for 10 fold cross validation. Hence, Hjorth Descriptor generates a good feature related to ECG signal classification process.
Keywords—ECG; Hjorth descriptor; signal processing; signal complexity;
I. INTRODUCTION
ECG Signal is the heart signals as the result of heart electrical activities. Firstly, heart electrical pulsewas appeared on sinoatrial node resulting in heart contraction which pumps blood continuously throughout the body [1]. ECG’s form represents people’s level of heart health. The signal is recorded by electrocardiograph and is analyzed by cardiologist in terms of rhyme, frequency, and form as well [2].
Some researches aimed to classify heart disease by ECG signal had been previously performed. Some of researchers used signal processing method through such a time domain in [3]–[5]. In this method, signal is processed directly from a signal recording without any transformation process. Nevertheless, common methods which is actively functioned are Principal Component Analysis [5] and AR-modeling [3]. Very recent work on PCA based technique for ECG signal processing are presented in [6]–[8]. All these research modified PCA methods and applied in multiclass ECG beat classification.
ECG signal processing in frequency domain is described in [9]. The represents ECG signal which is transformed through frequency domain then recognizing the features [10]. Another method used is signal processing to wavelet domain as well as time frequency domain. By observing the ECG signal through time frequency domain, the occurrence of frequency may be determined entirely to gain more information. Moreover, by carrying out wavelet transformation, flexible analysis related to resolution may likely perform resulting in analyzing signal by diverse resolution [11], [12].
This research presents ECG signal classification by complexity analysis of signal. The method used is Hjorth
Descriptor [13] computing ECG’s complexity aimed at differentiating one and another. This simple method is expected to reduce computational complexity to be acceptable on embedded system.
II. MATERIAL AND METHOD
A. Data of ECG Signal
The collected data is gained from MIT-BIH stored at physionet.org [14] which comprise three data classes, Normal Sinus Rhythm (NSR), Atrial Fibrillation (AF) and Congestive Heart Failure (CHF). Each class consists of 50 data with frequency sampling 250 Hz and period 2-3 seconds, so that one data involves 2-3 QRS. The NSR were determined due to normal condition of ECG signal, CHF is because of its typical QRS signal forms [15], and AF is due to the changes of QRS rhyme and form out of the normal form [16].
The normalization on ECG remains if with = , , . . . , with N is the data length so that is DC-free signal.
= x i N∑ x iN (1) Furthermore, is calculated by signal normalization with equation (2). The equation produces a signal ranging from -1 to +1. Sample of input signal are illustrated by Figure 1, 2 and 3.
= | | (2)
Fig. 1. NSR signal and its spectra
2015 International Conference on Automation, Cognitive Science, Optics, Micro Electro-Mechanical System, and Information Technology (ICACOMIT), Bandung, Indonesia, October 29–30, 2015
Fig. 2. CHF signal and its spectra
Fig. 3. AF signal and its spectra
B. Hjorth Descriptor
Hjorth Descriptor had been formerly functioned to measure people’s health by electroencephalogram (EEG) signal on time domain [13] then it is employed to measure electromyogram (EMG)[17], ventricle repolarization on ECG signal [18] and also in lung sound processing [19]. This method comprises three parameters, activity, mobility, and complexity.
If is a signal with = , , , . . . , , so ’ is the first order variation derived from the signal:
= , n = , , …, N (3)
Furthermore, ” is defined as second order variation from as well as equation (4).
" = (4)
If σ means a standard of deviation from , σ ’ will be defined as the deviation standard of ’ so that σ " is deviation standard of ”. The deviation standard of may be identified as:
= ∑ with = ∑ 5
Activity is defined as signal variation or deviation standard quadratic as well as equation (6).
= = (6)
Mobility is assigned as well as in equation (7) while complexity is in equation (8).\
mobility = = (7)
= = = "/
/ (8) Those three parameters is used as a feature of each ECG data.
C. Classifier
To test a separated-feature on each data class, K-mean clustering is employed using Euclidean Distance as distance measurement. Hjorth Descriptor features are classified using K-nearest neighbor (K-NN) and Multilayer Perceptron (MLP) to get the accuracy of the system.
The analysis involves two scenarios, dividing data randomly into 50% test data and 50% training data and employing N-Fold Cross Validation (NFCV) [20]. NFCV distributes data into N dataset in which one dataset may be a test data and N-1 may be a training data. This process is repeatedly conducted as many as N times and accuracy measurement is derived from average accuracy of each process [20]
The parameters used are accuracy, sensitivity (SE) and specificity (SP). SE is as stated in equation (9) and SP is as that in (10) [21]. True positive is data class A recognized as the real data class A while false negative is data class A which is unidentified as data class A. True negative is non-data class A known as non-data class A and False positive is non-data class A identified as data class A.
= (9)
= (10)
III. RESULT AND DISCUSSION
Fig. 4. Hjorth descriptor for NSR, AF and CHF signal
Table 1 explains K-mean clustering result of all data. As many as 17 CHF data remains AF which is definitely wrong, affecting to lower accuracy 88.67%. Generally, SE and SP value of normal data reach 100% as illustrate in Table 2. This means the test by K-mean clustering is preferable.
TABLE I. CONFUSSION MATRIX, RESULT OF K-MEAN CLUSTERING
NSR AF CHF
NSR 50 0 0
AF 0 50 0
CHF 0 17 33
TABLE II. SE AND SP FOR EACH CLASS OF DATA
Sensitivity Specificity accuracy
NSR 100% 100%
88.67%
AF 100% 88%
CHF 66% 100%
Table 3 presents the output of ECG classification using K-NN with several K values and two scenarios by separating test data and training data. By that scenario involving 50% test data and 50% training data, the accuracy has reached 100% for K=1 to K=5, while 10 fold CV reaches 99.33% by one unidentified CHF recognized as AF. Based on that case, 10-fold CV outcome is preferred since training and test data are randomly separated compared to 50% split. Hence, there will be no different classification result as in [20][23].
TABLE III. ACCURACY USING K-NN
Table 4 illustrates recognition of accuracy by MLP. The number of hidden neuron are used in as suggested in [24]. The number of hidden neuron in MLP is 15, 30, and 45. The table also describes the 10-fold CV generating consistent accuracy, 99.33% which merely affects to CHF’s miss-identification to AF. According to the output, it shows the same as that of Table 3.
Concerning to both output in Table 3 and 4, K-NN and MLP is preferable functioned as a classifier to recognize ECG signal using Hjorth Descriptor. However, K-NN is more dominant than MLP due to a simple computation process. Compared to other methods, Hjorth Descriptor produces merely three features. Regardless of [4], as many as 12 features are obtained to extract a feature by PCA, LDA, and ICA. Moreover, in [3], the number of feature used are six by maximum accuracy 98%.
There are some matters to come up with in using Hjorth Descriptor such as susceptible to noise [20] which may change the value of either activity or variation. Thus, noise reduction needs to undergo without relieving information on ECG signal. Another drawback of Hjorth Descriptor is Hjorth Descriptor needs signal segmentation since Hjorth Descriptor cannot calculate in overall signal. Better signal segmentation will improve classification performance. In this research, we use only three common beat classes of ECG signal. NSR, AF and CHF are commonly presented in many papers. It is still need further research to test ability of Hjorth Descriptor to distinguish more class of ECG signal.
IV. CONCLUSSION
ECG signal classification using Hjorth Descriptor has been presented in this paper. On three class data: AF, CHF and NSR, accuracy achieved is up to 100% using MLP and K-NN as classifier. The advantages of Hjorth descriptor is a little amount of features and simple computation. Since Hjorth descriptor is highly affected by noise, further studies on the effect of noise on Hjorth descriptors for classification of ECG signals may be needed. Class of ECG signal also needs to be expanded to make sure that this technique is quite appropriate for clinical purposes.
ACKNOWLEDGMENT
This work is supported by Directorate General of Higher Education (DGHE), Ministry of Research, Republic of Indonesia with scheme Hibah Bersaing 2015.
REFERENCES
[1] W. J. Tompkins, “Electrocardiography,” in Biomedical Digital Signal
Processing, W. J. Tompkins, Ed. New Jersey: Prentice Hall, 2000, pp.
24–54.
[2] T. A. M. Brosche, The EKG Handbook. Jones & Bartlett Publisher, 2010.
[3] Q. U. Xiao, C. Wei, and A. Preprocessing, “ECG Signal Classification Based on BPNN,” in Electric Information and Control Engineering
(ICEICE), 2011 International Conference on, 2011, no. 1, pp. 1362 –
1364.
[4] R. Joy, U. R. Acharya, and L. Choo, “ECG beat classification using PCA , LDA , ICA and Discrete Wavelet Transform,” Biomed. Signal
Process. Control, vol. 8, no. 5, pp. 437–448, 2013.
[5] A. Bollmann, M. Roig, F. Castells, P. Laguna, and S. Leif, “Principal Component Analysis in ECG Signal Processing,” EURASIP J. Adv.
Signal Process., vol. 2007, 2007.
[6] M. Nait-hamoud and A. Moussaoui, “Two Novel Methods for Multiclass ECG Arrhythmias Classification Based on PCA , Fuzzy Support Vector Machine and Unbalanced Clustering,” in International
Conference on Machine and Web Intelligence (ICMWI), 2010, 2010, pp.
140–145.
[7] G. Biagetti, P. Crippa, A. Curzi, S. Orcioni, and C. Turchetti, “A Multi-class ECG Beat Classifier Based on the Truncated KLT Representation,”
in Proceedings of the 2014 European Modelling Symposium, 2014, pp.
93–98.
[8] P. Crippa and E. Al, “Multi-Class ECG Beat Classification Based on a Gaussian Mixture Model of Karhunen-Loève Transform,” Int. J. Simul.
Syst. Sci. Technol., no. in press.
[9] C. Lin, “Frequency-domain features for ECG beat discrimination using grey relational analysis-based classifier,” Comput. Math. with Appl., vol. 55, no. 4, pp. 680–690, Feb. 2008.
[10] H. Gothwal, S. Kedawat, and R. Kumar, “Cardiac arrhythmias detection in an ECG beat signal using fast fourier transform and artificial neural network,” J. Biomed. Sci. Eng., vol. 2011, no. April, p. 44039, 2011. [11] S. Z. Mahmoodabadi, A. Ahmadian, and M. D. Abolhasani, “ECG
Feature Extraction Using Daubechies Wavelets,” in Proc. of the fifth IASTED International Conference Visualization, Imaging, and Image
Processing, 2005, vol. 2, no. 2, pp. 343–348.
[12] A. Daamouche, L. Hamami, N. Alajlan, and F. Melgani, “A wavelet optimization approach for ECG signal classification,” Biomed. Signal
Process. Control, vol. 7, no. 4, pp. 342–349, 2012.
[13] B. Hjorth, “The Technical Significance of Time Domain Descriptors in EEG Analysis,” Electroenchepalography Clin. Neurophysiol., vol. 34, pp. 321–325, 1973.
[14] Physionet.org, “ECG Database.” [Online]. Available: http://physionet.org/physiobank/database/#ecg.
[15] J. L. Schuster, C. Spence, M. Jacobs, and A. Wilkonson, “Living with Advanced Congestive Heart Failure : A Guide for Family Caregivers,” 2002.
[16] S. M. Al-khatib, N. A. Lapointe, and R. Chatterjee, “Treatment of Atrial,” Comp. Eff. Rev., no. 119, 2013.
[17] M. Mouzé-Amady and F. Horwat, “Evaluation of Hjorth parameters in forearm surface EMG analysis during an occupational repetitive task,”
Electroencephalogr. Clin. Neurophysiol. - Electromyogr. Mot. Control,
vol. 101, pp. 181–183, 1996.
[18] M. Blanco-velasco, F. Cruz-rold, J. Ignacio, and K. E. Barner, “Nonlinear Trend Estimation of the Ventricular Repolarization Segment for T-Wave Alternans Detection,” IEEE Trans. Biomed. Eng., vol. 57, no. 10, pp. 2402–2412, 2010.
[19] A. Rizal, R. Hidayat, and H. A. Nugroho, “Determining Lung Sound Characterization Using Hjorth Descriptor,” in 2015 International Conference on Control, Electronics, Renewable Energy and
Communication (ICCEREC), 2015, pp. 54–57.
[20] R. Palaniappan, Biological Signal Analysis. Ventus Publishing ApS, 2010.
[21] S. Reichert, R. Gass, C. Brandt, and E. Andrès, “Analysis of Respiratory Sounds : State of the Art,” Clin. Med. Circ. Respir. Pulm. Med., vol. 2, pp. 45–58, 2008.
[22] ANSI/AAMI EC57-2012, “Testing and reporting performance results of cardiac rhythm and ST segment measurement algorithms.” 2012. [23] A. Kandaswamy, C. S. C. S. Kumar, R. P. Ramanathan, S. Jayaraman,
and N. Malmurugan, “Neural classification of lung sounds using wavelet coefficients.,” Comput. Biol. Med., vol. 34, no. 6, pp. 523–37, Sep. 2004. [24] A. Hashemi, H. Arabalibiek, and K. Agin, “Classification of Wheeze Sounds Using Wavelets and Neural Networks,” in International
Conference on Biomedical Engineering and Technology (2011), 2011,