Automatic detection of arrhythmia from imbalanced ECG database using CNN model with SMOTE

  • Saroj Kumar PandeyEmail author
  • Rekh Ram Janghel
Scientific Paper


Timely prediction of cardiovascular diseases with the help of a computer-aided diagnosis system minimizes the mortality rate of cardiac disease patients. Cardiac arrhythmia detection is one of the most challenging tasks, because the variations of electrocardiogram(ECG) signal are very small, which cannot be detected by human eyes. In this study, an 11-layer deep convolutional neural network model is proposed for classification of the MIT-BIH arrhythmia database into five classes according to the ANSI–AAMI standards. In this CNN model, we designed a complete end-to-end structure of the classification method and applied without the denoising process of the database. The major advantage of the new methodology proposed is that the number of classifications will reduce and also the need to detect, and segment the QRS complexes, obviated. This MIT-BIH database has been artificially oversampled to handle the minority classes, class imbalance problem using SMOTE technique. This new CNN model was trained on the augmented ECG database and tested on the real dataset. The experimental results portray that the developed CNN model has better performance in terms of precision, recall, F-score, and overall accuracy as compared to the work mentioned in the literatures. These results also indicate that the best performance accuracy of 98.30% is obtained in the 70:30 train-test data set.


Arrhythmia Convolutional Neural Network Electrocardiogram Imbalance Heartbeat 



This study was not funded by any agencies.

Compliance with ethical standards

Conflict of interest

All authors declare that they have no conflict of interest.

Ethical approval

This article does not contain any studies with human participants or animals performed by any of the authors.


  1. 1.
    Mehra R (2007) Global public health problem of sudden cardiac death. J Electrocardiol 40(6):S118–S122PubMedGoogle Scholar
  2. 2.
    World Health Organization (2017) Noncommunicable diseases: progress monitor 2017Google Scholar
  3. 3.
    Hadhoud MM, Eladawy MI, Farag A (2006) “Computer aided diagnosis of cardiac arrhythmias.” Computer Engineering and Systems, The 2006 International Conference on. IEEEGoogle Scholar
  4. 4.
    Singh S et al (2018) Classification of ECG arrhythmia using recurrent neural networks. Proced Comput Sci 132:1290–1297Google Scholar
  5. 5.
    De Chazal P, O’Dwyer M, Reilly RB (2004) Automatic classification of heartbeats using ECG morphology and heartbeat interval features. IEEE Trans Biomed Eng 51(7):1196–1206PubMedGoogle Scholar
  6. 6.
    Alonso-Atienza F et al (2014) Detection of life-threatening arrhythmias using feature selection and support vector machines. IEEE Trans Biomed Eng 61(3):832–840PubMedGoogle Scholar
  7. 7.
    Khadra L, Al-Fahoum AS, Al-Nashash H (1997) Detection of life-threatening cardiac arrhythmias using the wavelet transformation. Med Biol Eng Comput 35(6):626–632PubMedGoogle Scholar
  8. 8.
    Sörnmo L, Laguna P (2005) Bioelectrical signal processing in cardiac and neurological applications, vol 8. Academic Press, AmsterdamGoogle Scholar
  9. 9.
    Melillo P et al (2015) “Wearable technology and ECG processing for fall risk assessment, prevention and detection.” Engineering in Medicine and Biology Society (EMBC), 2015 37th Annual International Conference of the IEEE. IEEEGoogle Scholar
  10. 10.
    Jain S et al (2017) QRS detection using adaptive filters: a comparative study. ISA Trans 66:362–375PubMedGoogle Scholar
  11. 11.
    Adam G, Witold P (2011) ECG signal processing, classification and interpretation: a comprehensive framework of computational intelligence. Springer, LondonGoogle Scholar
  12. 12.
    Singh BN, Tiwari AK (2006) Optimal selection of wavelet basis function applied to ECG signal denoising. Digital Signal Proc 16(3):275–287Google Scholar
  13. 13.
    Sameni R et al (2007) A nonlinear Bayesian filtering framework for ECG denoising. IEEE Trans Biomed Eng 54(12):2172–2185PubMedGoogle Scholar
  14. 14.
    Pasolli E, Melgani F (2015) Genetic algorithm-based method for mitigating label noise issue in ECG signal classification. Biomed Signal Proc Control 19:130–136Google Scholar
  15. 15.
    Roonizi EK, Sassi R (2016) A signal decomposition model-based Bayesian framework for ECG components separation. IEEE Trans Signal Proc 64(3):665–674Google Scholar
  16. 16.
    da Silva Luz EJ et al (2016) ECG-based heartbeat classification for arrhythmia detection: a survey. Comput Methods Programs Biomed 127:144–164Google Scholar
  17. 17.
    Pinheiro E, Postolache O, Girão P (2011) “Method for segmentation of cardiac signals based on four parameter sine fitting.” EUROCON-International Conference on Computer as a Tool (EUROCON), 2011 IEEE. IEEEGoogle Scholar
  18. 18.
    Ceylan R, Özbay Y (2007) Comparison of FCM, PCA and WT techniques for classification ECG arrhythmias using artificial neural network. Expert Syst Appl 33(2):286–295Google Scholar
  19. 19.
    Ye C, Coimbra MT, Vijaya Kumar BVK (2010) Arrhythmia detection and classification using morphological and dynamic features of ECG signals. Engineering in Medicine and Biology Society (EMBC), 2010 Annual International Conference of the IEEE. IEEEGoogle Scholar
  20. 20.
    Kutlu Y, Kuntalp D (2012) Feature extraction for ECG heartbeats using higher order statistics of WPD coefficients. Comput Methods Progr Biomed 105(3):257–267Google Scholar
  21. 21.
    Shinde AA, Kanjalkar P (2011) The comparison of different transform based methods for ECG data compression. Signal processing, communication, computing and networking technologies (ICSCCN), 2011 International Conference on IEEEGoogle Scholar
  22. 22.
    Gu Z, Zhang N, Qian S (2013) Analyzing electrocardiogram signals with multiscale short-time fourier transforms. U.S. Patent No. 8,494,622. 23 JulGoogle Scholar
  23. 23.
    Uslu E, Bilgin G (2012) Exploiting locality based Fourier transform for ECG signal diagnosis. Applied Electronics (AE), 2012 International Conference on. IEEEGoogle Scholar
  24. 24.
    Lin CC, Yang CM (2014) Heartbeat classification using normalized RR intervals and morphological features. Math Probl Eng. CrossRefGoogle Scholar
  25. 25.
    Ye Can, Vijaya Kumar BVK, Coimbra MT (2012) Heartbeat classification using morphological and dynamic features of ECG signals. IEEE Trans Biomed Eng 59(10):2930–2941PubMedGoogle Scholar
  26. 26.
    Martis RJ et al (2013) Cardiac decision making using higher order spectra. Biomed Signal Proc Control 8(2):193–203Google Scholar
  27. 27.
    Chawla MPS (2009) A comparative analysis of principal component and independent component techniques for electrocardiograms. Neural Comput Appl 18(6):539–556Google Scholar
  28. 28.
    Imah EM et al (2011) A comparative study on Daubechies Wavelet Transformation, Kernel PCA and PCA as feature extractors for arrhythmia detection using SVM.” TENCON 2011-2011 IEEE Region 10 Conference. IEEEGoogle Scholar
  29. 29.
    Lu W et al (2018) Wearable computing for internet of things: a discriminant approach for human activity recognition. IEEE Internet of Things J 6(2):2749–2759Google Scholar
  30. 30.
    Jing P et al (2018) A framework of joint low-rank and sparse regression for image memorability prediction. IEEE Trans Circuits Syst Video Technol 29(5):1296–1309Google Scholar
  31. 31.
    Wang JS et al (2013) ECG arrhythmia classification using a probabilistic neural network with a feature reduction method. Neurocomputing 116:38–45Google Scholar
  32. 32.
    Kiranyaz S et al (2015) Convolutional Neural Networks for patient-specific ECG classification. Engineering in Medicine and Biology Society (EMBC), 2015 37th Annual International Conference of the IEEE. IEEEGoogle Scholar
  33. 33.
    Pourbabaee B, Roshtkhari MJ, Khorasani K (2017) Deep convolutional neural networks and learning ecg features for screening paroxysmal atrial fibrillation patients. IEEE Trans Syst Man Cybern 99:1–10Google Scholar
  34. 34.
    Khalaf AF, Owis MI, Yassine IA (2015) A novel technique for cardiac arrhythmia classification using spectral correlation and support vector machines. Expert Syst Appl 42(21):8361–8368Google Scholar
  35. 35.
    Varatharajan R, Manogaran G, Priyan MK (2018) A big data classification approach using LDA with an enhanced SVM method for ECG signals in cloud computing. Multimed Tools Appl 77(8):10195–10215Google Scholar
  36. 36.
    Raj S, Ray KC (2017) ECG signal analysis using DCT-based DOST and PSO optimized SVM. IEEE Trans Instrum Meas 66(3):470–478Google Scholar
  37. 37.
    Alickovic E, Subasi A (2016) Medical decision support system for diagnosis of heart arrhythmia using DWT and random forests classifier. J Med Syst 40(4):108PubMedGoogle Scholar
  38. 38.
    Kropf M, Hayn D, Schreier G (2017) ECG classification based on time and frequency domain features using random forests. Computing 44:1Google Scholar
  39. 39.
    Xiong Z et al (2018) ECG signal classification for the detection of cardiac arrhythmias using a convolutional recurrent neural network. Physiol Meas 39(9):094006PubMedPubMedCentralGoogle Scholar
  40. 40.
    Nurmaini S, Gani A (2018) Cardiac arrhythmias classification using deep neural networks and principle component analysis algorithm. Int J Adv Soft Comput Appl 10(2):14–32Google Scholar
  41. 41.
    Muthuvel K et al (2015) Classification of ECG signal using hybrid feature extraction and neural network classifier. New Delhi, power electronics and renewable energy systems. Springer, New Delhi, pp 1537–1544Google Scholar
  42. 42.
    Acharya UR et al (2017) Automated detection of arrhythmias using different intervals of tachycardia ECG segments with convolutional neural network. Inform Sci 405:81–90Google Scholar
  43. 43.
    Acharya UR et al (2017) Application of deep convolutional neural network for automated detection of myocardial infarction using ECG signals. Inform Sci 415:190–198Google Scholar
  44. 44.
    Wu Z, Ding X, Zhang G (2016) A novel method for classification of ECG arrhythmias using deep belief networks. Int J Comput Intell Appl 15(04):1650021Google Scholar
  45. 45.
    Al Rahhal MM et al (2016) Deep learning approach for active classification of electrocardiogram signals. Inform Sci 345:340–354Google Scholar
  46. 46.
    Acharya UR et al (2017) A deep convolutional neural network model to classify heartbeats. Comput Biol Med 89:389–396PubMedGoogle Scholar
  47. 47.
    Wikipedia contributors (2018) Feature scaling. Wikipedia, The Free Encyclopedia. Wikipedia, The Free Encyclopedia, 24 Jun 2018.
  48. 48.
    Chen S et al (2017) Heartbeat classification using projected and dynamic features of ECG signal. Biomed Signal Proc Control 31:165–173Google Scholar
  49. 49.
    Chawla NV et al (2002) SMOTE: synthetic minority over-sampling technique. J Artif Intell Res 16:321–357Google Scholar
  50. 50.
    Prati RC, Batista GEAPA, Monard MC (2008) A study with class imbalance and random sampling for a decision tree learning system. IFIP International Conference on Artificial Intelligence in Theory and Practice. Springer, BostonGoogle Scholar
  51. 51.
    Yi Z et al (2014) Time series classification using multi-channels deep convolutional neural networks. International Conference on Web-Age Information Management. Springer, ChamGoogle Scholar
  52. 52.
    Krizhevsky A, Sutskever I, Hinton GE (2012) Imagenet classification with deep convolutional neural networks. Advances in neural information processing systemsGoogle Scholar
  53. 53.
    Goldberger AL et al (2000) PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals. Circulation 101(23):e215–e220PubMedGoogle Scholar
  54. 54.
    Kutlu Y, Kuntalp D (2011) A multi-stage automatic arrhythmia recognition and classification system. Comput Biol Med 41(1):37–45PubMedGoogle Scholar
  55. 55.
    De Chazal P (2013) A switching feature extraction system for ECG heartbeat classification. Computing in Cardiology Conference (CinC), 2013. IEEE, USAGoogle Scholar
  56. 56.
    Raj S, Maurya K, Ray KC (2015) A knowledge-based real time embedded platform for arrhythmia beat classification. Biomed Eng Lett 5(4):271–280Google Scholar
  57. 57.
    Zubair M, Kim J, Yoon C (2016) An automated ECG beat classification system using convolutional neural networks. IT Convergence and Security (ICITCS), 2016 6th International Conference on. IEEEGoogle Scholar
  58. 58.
    Li T, Zhou M (2016) ECG classification using wavelet packet entropy and random forests. Entropy 18(8):285Google Scholar
  59. 59.
    Shadmand S, Mashoufi B (2016) A new personalized ECG signal classification algorithm using block-based neural network and particle swarm optimization. Biomed Signal Proc Control 25:12–23Google Scholar
  60. 60.
    Yang W et al (2018) Automatic recognition of arrhythmia based on principal component analysis network and linear support vector machine. Comput Biol Med 101:22–32PubMedGoogle Scholar
  61. 61.
    Kachuee M, Fazeli S, Sarrafzadeh M (2018) ECG heartbeat classification: a deep transferable representation. arXiv preprint arXiv:1805.00794
  62. 62.
    Li J, Chen R (2018) Detection of premature ventricular contractions using densely connected deep convolutional neural network with spatial pyramid pooling layer.” arXiv preprint arXiv:1806.04564

Copyright information

© Australasian College of Physical Scientists and Engineers in Medicine 2019

Authors and Affiliations

  1. 1.Department of Information TechnologyNational Institute of Information TechnologyRaipurIndia

Personalised recommendations