Skip to main content
Log in

Heartbeat classification by using a convolutional neural network trained with Walsh functions

  • Original Article
  • Published:
Neural Computing and Applications Aims and scope Submit manuscript

Abstract

From recent studies, it is observed that convolutional neural networks are proved to be extremely successful in classification problems. Accurate and fast classification of electrocardiogram (ECG) beats is a crucial step in the implementation of real-time arrhythmia diagnosis systems. In this study, convolutional neural networks are employed to classify eleven different ECG beat types in the MIT-BIH arrhythmia database. We aimed to implement a computer-aided mobile diagnosis system equipped with artificial intelligence that detects the classes of heartbeats by visual inspection of the ECG records in the manner as the cardiologists do. Since doctors make their decisions basing heavily on the 2D visual appearances of the ECG signals without doing numerical calculations on 1D time samples, 2D images of 1D ECG records were given to the classifier as the input data. It would not be surprising that the structure of the network classifying 2D ECG data has to be larger than the one used to classify 1D ECG signals. The small size of a neural network is an important property for real-time use of the system. In this study, smaller network structures that provide high performances using the Walsh functions (WF), and drawbacks of converting 1D signals to 2D images have been investigated. The network structures using the WF during the training stage have been applied to different databases and successful results have been obtained. Classification results and sizes of the network structures are compared for the ECG beats in one dimension and in the form of 2D visuals. The training of ECG signals in the form of 2D visuals takes much longer time than that of the 1D signals. However, it is observed that training and testing times of both networks were quite fast. Moreover, average success rates of 99% were achieved for all beat types by using small-size networks.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

References

  1. Alajlan N, Bazi Y, Melgani F, Malek S, Bencherif MA (2014) Detection of premature ventricular contraction arrhythmias in electrocardiogram signals with kernel methods. Signal Image Video Process 8:931–942

    Article  Google Scholar 

  2. Alonso-Atienza F, Morgado E, Fernandez-Martinez L, Garcia-Alberola A, Rojo-Alvarez JL (2014) Detection of life-threatening arrhythmias using feature selection and support vector machines. IEEE Trans Biomed Eng 61:832–840

    Article  Google Scholar 

  3. Javadi M, Arani SAAA, Sajedin A, Ebrahimpour R (2013) Classification of ECG arrhythmia by a modular neural network based on mixture of experts and negatively correlated learning. Biomed Signal Process Control 8:289–296

    Article  Google Scholar 

  4. Wang J, Ye Y, Pan X, Gao X (2015) Parallel-type fractional zero-phase filtering for ECG signal denoising. Biomed Signal Process Control 18:36–41

    Article  Google Scholar 

  5. Yadav SK, Sinha R, Bora PK (2015) Electrocardiogram signal denoising using non-local wavelet transform domain filtering. IET Signal Process 9:88–96

    Article  Google Scholar 

  6. Bono V, Mazomenos EB, Chen T, Rosengarten JA, Acharyya A, Maharatna K et al (2014) Development of an automated updated Selvester QRS scoring system using SWT-based QRS fractionation detection and classification. IEEE J Biomed Health Inform 18:193–204

    Article  Google Scholar 

  7. Phukpattaranont P (2015) QRS detection algorithm based on the quadratic filter. Expert Syst Appl 42:4867–4877

    Article  Google Scholar 

  8. De Chazal P, O’Dwyer M, Reilly M (2004) Automatic classification of heartbeats using ECG morphology and heartbeat interval features. IEEE Trans Biomed Eng 51:1196–1206

    Article  Google Scholar 

  9. Dima S-M, Panagiotou C, Mazomenos EB, Rosengarten JA, Maharatna K, Gialelis JV et al (2013) On the detection of myocadial scar based on ECG/VCG analysis. IEEE Trans Biomed Eng 60:3399–3409

    Article  Google Scholar 

  10. De Chazal P, Reilly RB (2006) A patient-adapting heartbeat classifier using ECG morphology and heartbeat interval features. IEEE Trans Biomed Eng 53:2535–2543

    Article  Google Scholar 

  11. Kutlu Y, Kuntalp D (2012) Feature extraction for ECG heartbeats using higher order statistics of WPD coefficients. Comput Methods Progr Biomed 105:257–267

    Article  Google Scholar 

  12. Yang H, Kan C, Liu G, Chen Y (2013) Spatiotemporal differentiation of myocardial infarctions. IEEE Trans Autom Sci Eng 10:938–947

    Article  Google Scholar 

  13. de Lannoy G, Francois D, Delbeke J, Verleysen M (2012) Weighted conditional random fields for supervised interpatient heartbeat classification. IEEE Trans Biomed Eng 59:241–247

    Article  Google Scholar 

  14. Chang P-C, Lin J-J, Hsieh J-C, Weng J (2012) Myocardial infarction classification with multi-lead ECG using hidden Markov models and Gaussian mixture models. Appl Soft Comput 12:3165–3175

    Article  Google Scholar 

  15. Martis RJ, Acharya UR, Min LC (2013) ECG beat classification using PCA, LDA, ICA and discrete wavelet transform. Biomed Signal Process Control 8:437–448

    Article  Google Scholar 

  16. Jiang W, Kong SG (2007) Block-based neural networks for personalized ECG signal classification. IEEE Trans Neural Netw 18:1750–1761

    Article  Google Scholar 

  17. Wang JS, Chiang WC, Hsu YL, Yang YTC (2013) ECG arrhythmia classification using a probabilistic neural network with a feature reduction method. Neurocomputing 116:38–45

    Article  Google Scholar 

  18. Dutta S, Chatterjee A, Munshi S (2010) Correlation technique and least square support vector machine combine for frequency domain based ECG beat classification. Med Eng Phys 32:1161–1169

    Article  Google Scholar 

  19. Luz EJS, Nunes TM, de Albuquerque VHV, Papa JP, Menotti D (2013) ECG arrhythmia classification based on optimum-path forest. Expert Syst Appl 40:3561–3573

    Article  Google Scholar 

  20. Melgani F, Bazi Y (2008) Detecting premature ventricular contractions in ECG signals with Gaussian processes. In: Computer in cardiology, pp 237–240

  21. Sannino G, Pietro G (2018) A deep learning approach for ECG-based heartbeat classification for arrhythmia detection. Future Gen Comput Syst 86:446–455

    Article  Google Scholar 

  22. Rahhal MM, Bazi Y, AlHichri H, Alajlan N, Melgani F, Yager RR (2016) Deep learning approach for active classification of electrocardiogram signals. Inf Sci 345:340–354

    Article  Google Scholar 

  23. Jun TJ, Park HJ, Kim YH (2016) Premature ventricular contraction beat detection with deep neural networks. In: 15th IEEE international conference on machine learning and applications, pp 859–864

  24. Zhou L, Van V, Qin X, Yuan C, Que D, Wang L (2016) Deep learning-based classification of massive electrocardiography data. In: IEEE advanced information management, communicates, electronic and automation control conference, pp 780–785

  25. Pourbabaee B, Roshtkhariand MJ, Khorasani K (2017) Deep convolutional neural networks and learning ECG features for screening paroxysmal atrial fibrillation patients. IEEE Trans Syst Man Cybern Syst 2017:1–10

    Google Scholar 

  26. Wu Z, Ding X, Zhang G, Xu X, Wang X, Tao Y, Ju C (2016) A novel features learning method for ECG arrhythmias using deep belief networks. In: 6th international conference on digital home, pp 192–196

  27. Assodiky H, Syarif I, Badriyah T (2017) Deep learning algorithm for arrhythmia detection. In: International electronics symposium on knowledge creation and intelligent computing, pp 26–32

  28. Xia Y, Zhang H, Xu L, Gao Z, Zhang H, Liu H, Li S (2018) An automatic cardiac arrhythmia classification system with wearable electrocardiogram. IEEE J Mag 6:16529–16538

    Google Scholar 

  29. Ji J, Chen X, Luo C, Li P (2018) A deep multi-task learning Approach for ECG data analysis. In: IEEE EMBS international conference on biomedical & health informatics (BHI), pp 124–127

  30. Paul T, Chakraborty A, Kundu S (2018) Hybrid shallow and deep learned feature mixture model for arrhythmia classification. In: Electric electronics, computer science, biomedical engineerings’ meeting (EBBT)

  31. Acharya UR, Oh SL, Hagiwara Y, Tan JH, Adam M, Gertych A, Tan RS (2017) A deep convolutional neural network model to classify heartbeats. Comput Biol Med 89:389–396

    Article  Google Scholar 

  32. Kachuee M, Fazeli S, Sarrafzadeh M (2018) ECG heartbeat classification: a deep transferable representation. In: IEEE international conference on healthcare informatics, pp 443–444

  33. Pyakillya B, Kazachenkoand N, Mikhailovsky N (2017) Deep learning for ECG classification. IOP Conf Ser J Phys 913:012004

    Article  Google Scholar 

  34. Wu Y, Yang F, Liu Y, Zha X, Yuan S (2018) A comparison of 1-D and 2-D deep convolutional neural networks in ECG classification. In: Conference proceedings: IEEE engineering in medicine and biology society, pp 324–327

  35. Jun TJ, Nguyen HM, Kang D, Kim D, Kim DY, Kim YH (2018) ECG arrhythmia classification using a 2-D convolutional neural network. Comput Vis Pattern Recognit. arXiv:1804.06812

  36. Rubin J, Abreu R, Ganguli A, Nelaturi S, Matei I, Sricharan K (2016) Classifying heart sound recordings using deep convolutional neural networks and mel-frequency cepstral coefficients. In: Computing in cardiology conference (CinC), pp 813–816

  37. Park C, ChoiG, Kim JY, Kim S, Kim TJ, Min K, Jung KY, Chong J (2018) Epileptic seizure detection for multi-channel EEG with deep convolutional neural network. In: International conference on electronics, information, and communication

  38. Abbas W, Khan NA (2018) DeepMI: Deep learning for multiclass motor imagery classification. In: 40th annual international conference of the IEEE engineering in medicine and biology society, pp 219–222

  39. Liu Y, Lin Y, Gao S, Zhang H, Wang Z, Gao Y, Chen G (2017) Respiratory sounds feature learning with deep convolutional neural networks, pp 170–177. https://doi.org/10.1109/DASC-PICom-DataCom-CyberSciTec.2017.41

  40. Hur T, Bang J, Huynh-The T, Lee J, Kim J-I, Lee S (2018) Iss2Image: a novel signal-encoding technique for CNN-based human activity recognition. Sensors 18:3910

    Article  Google Scholar 

  41. Han S, Pool J, Tran J, Dally W (2015) Learning both weights and connections for efficient neural network. In: Advances in neural information processing systems, pp 1135–1143

  42. Han S, Mao H, Dally WJ (2015) Deep compression: Compressing deep neural networks with pruning, trained quantization and Huffman coding. arXiv:1510.00149

  43. Gong Y, Liu L, Yang M, Bourdev L (2014) Compressing deep convolutional networks using vector quantization. arXiv:1412.6115

  44. Ba J, Caruana R, (2014) Do deep nets really need to be deep? In: Advances in neural information processing systems, 27

  45. Chen W, Wilson J, Tyree S, Weinberger K, Chen Y (2015) Compressing neural networks with the hashing trick. In: International conference on machine learning, pp 2285–2294

  46. Moody GB, Mark RG (2001) The impact of the MIT-BIH arrhythmia database. IEEE Eng Med Biol 20(3):45–50

    Article  Google Scholar 

  47. Jiang W, Kong SG (2007) Block-based neural networks for personalized ECG signal classification. IEEE Trans Neural Netw 18(6):1750–1761

    Article  Google Scholar 

  48. Ince T, Kiranyaz S, Gabbouj M (2009) A generic and robust system for automated patient-specific classification of ECG signals. IEEE Trans Biomed Eng 56(5):1415–1426

    Article  Google Scholar 

  49. Kallas M, Francis C, Kanaan L, Merheb D, Honeine P, Hassan Amoud H (2012) Multi-class SVM classification combined with kernel PCA feature extraction of ECG signals. In: 19th international conference on telecommunications (ICT)

  50. Balouchestani M, Krishnan S (2014) Fast clustering algorithm for large ECG datasets based on CS theory in combination with PCA and K-NN methods. In: 36th annual international conference of the IEEE engineering in medicine and biology society

  51. Chazal P, O’Dwyer M, Reilly BR (2004) Automatic classification of heartbeats using ECG morphology and heart beat interval features. IEEE Trans Biomed Eng 51(7):1196–1206

    Article  Google Scholar 

  52. Zhang Z, Dong J, Luo X, Choi K, Wu X (2014) Heartbeat classification using disease-specific feature selection. Comput Biol Med 46:79–89

    Article  Google Scholar 

  53. Martis RJ, Acharya UR, Adeli H, Prasad H, Tan JH, Chua KC, Too CL, Yeo SWJ, Tong L (2014) Computer aided diagnosis of atria larrhythmia using dimensionality reduction methods on transform domain representation. Biomed Signal Process Control 13:295–305

    Article  Google Scholar 

  54. Li T, Zhou M (2016) ECG classification using wavelet packet entropy and random forests. Entropy 18:285. https://doi.org/10.3390/e18080285

    Article  Google Scholar 

  55. Graham B (2015) Fractional max-pooling. Comput Vis Pattern Recognit. arXiv:141a2.6071

  56. Krizhevsky A (2009) Learning multiple layers of features from tiny images. Master’s thesis. Comput. Sci. Dept. Univ Toronto

  57. LeCun Y, Bottou L, Bengio Y, Haffner P (1998) Gradient-based learning applied to document recognition. Proc IEEE 86(11):2278–2324

    Article  Google Scholar 

  58. Wan L, Zeiler M, Zhang S, LeCun Y, Fergus R (2013) Regularization of neural networks using DropConnect. In: Proceedings of the 30th international conference on machine learning, PMLR, vol 28(3), pp 1058–1066

  59. Cui Y, Jia M, Lin TY, Song Y, Belongie S (2019) Class-balanced loss based on effective number of samples, arXiv:1901.05555v1

Download references

Acknowledgements

This work is supported by the Istanbul Technical University Scientific Research Project Unit (ITU-BAP Project No. MYL-2018-41621). The authors would like to thank student intern Bora Elci for his support in the necessary installations for preparing and reading ECG records of the MIT-BIH arrhythmia database using Python programs running on a workstation in the Medical Electronics Laboratory at Istanbul Technical University.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zümray Dokur.

Ethics declarations

Conflict of interest

The authors declare that there is no conflict of interests regarding the publication of this paper.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Dokur, Z., Ölmez, T. Heartbeat classification by using a convolutional neural network trained with Walsh functions. Neural Comput & Applic 32, 12515–12534 (2020). https://doi.org/10.1007/s00521-020-04709-w

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00521-020-04709-w

Keywords

Navigation