Hybrid CNN-LSTM deep learning model and ensemble technique for automatic detection of myocardial infarction using big ECG data | Applied Intelligence Skip to main content

Advertisement

Log in

Hybrid CNN-LSTM deep learning model and ensemble technique for automatic detection of myocardial infarction using big ECG data

  • Published:
Applied Intelligence Aims and scope Submit manuscript

Abstract

Automatic and accurate prognosis of myocardial infarction (MI) using electrocardiogram (ECG) signals is a challenging task for the diagnosis and treatment of heart diseases. MI is also referred as a “Heart Attack”, which is the most fatal cardiovascular disease. In many cases, MI does not show any symptoms, hence it is also called a “silent heart attack”. In such cases, patients do not get time to prepare themselves. Hence this disease is more dangerous and fatal with a high mortality rate. Hence, we have proposed an automated detection system of MI using electrocardiogram (ECG) signals by a convolutional neural network (CNN), hybrid CNN- long short-term memory network (LSTM), and ensemble technique to choose the optimum performing model. In this work, we have used 123,998 ECG beats obtained from the “PTB diagnostic database (PTBDB)” and “MIT-BIH arrhythmia database (MITDB) to develop the model. The experiment is performed in two stages: (i) using original and unbalanced datasets and (ii) using a balanced dataset, obtained from synthetic minority oversampling technique (SMOTE) data sampling technique. We have obtained the highest classification accuracy of 99.82 %, 99.88 %, and 99.89 % using CNN, hybrid CNN-LSTM, and ensemble techniques, respectively. Hence the proposed novel data balancing technique (SMOTE-Tomek Link) not only solves the imbalanced data problem but also increases the minority class accuracy significantly. Now our developed model is ready for the clinical application that can be installed in hospitals for the detection of MI.

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

Access this article

Subscribe and save

Springer+ Basic
¥17,985 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price includes VAT (Japan)

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

References

  1. Kulick DL, Marks JW, Davis CP (2014) Heart attack (Myocardial Infarction), Medicinet.Com,  1–14. https://my.clevelandclinic.org/health/diseases/16818-heart-attack-myocardial-infarction. Accessed 28 Aug 2020

  2. Acharya UR, Fujita H, Sudarshan VK, Oh SL, Adam M, Tan JH, Koo JH, Jain A, Lim CM, Chua KC (2017) Automated characterization of coronary artery disease, myocardial infarction, and congestive heart failure using contourlet and shearlet transforms of electrocardiogram signal. Knowl-Based Syst 132:156–166. https://doi.org/10.1016/j.knosys.2017.06.026

    Article  Google Scholar 

  3. Acharya UR, Fujita H, Oh SL, Hagiwara Y, Tan JH, Adam M (2017) Application of deep convolutional neural network for automated detection of myocardial infarction using ECG signals, Inf Sci (NY) 415–416:190–198. https://doi.org/10.1016/j.ins.2017.06.027

  4. Lui HW, Chow KL (2018) Multiclass classification of myocardial infarction with convolutional and recurrent neural networks for portable ECG devices. Inform Med Unlocked 13:26–33. https://doi.org/10.1016/j.imu.2018.08.002

    Article  Google Scholar 

  5. Kumar M, Pachori RB, Acharya UR (2017) Automated diagnosis of myocardial infarction ECG signals using sample entropy in flexible analytic wavelet transform framework. Entropy 19:488. https://doi.org/10.3390/e19090488

    Article  Google Scholar 

  6. Frellick M, Vega CP (2020) How big a problem is misdiagnosis in medicine?, Medscape.  https://www.medscape.org/viewarticle/933116. Accessed 14 Jul 2020

  7. Tripathy RK, Bhattacharyya A, Pachori RB (2019) A novel approach for detection of myocardial infarction from ECG signals of multiple electrodes. IEEE Sensors J 19:4509–4517. https://doi.org/10.1109/JSEN.2019.2896308

    Article  Google Scholar 

  8. Han C, Shi L (2019) Automated interpretable detection of myocardial infarction fusing energy entropy and morphological features. Comput Methods Programs Biomed 175:9–23. https://doi.org/10.1016/j.cmpb.2019.03.012

    Article  Google Scholar 

  9. Acharya UR, Fujita H, Sudarshan VK, Oh SL, Adam M, Koh JEW, Tan JH, Ghista DN, Martis RJ, Chua CK, Poo CK, Tan RS (2016) Automated detection and localization of myocardial infarction using electrocardiogram: A comparative study of different leads. Knowl-Based Syst 99:146–156. https://doi.org/10.1016/j.knosys.2016.01.040

    Article  Google Scholar 

  10. Acharya R, Bhat UPS, Kannathal N, Rao A, Choo ML (2005) Analysis of cardiac health using fractal dimension and wavelet transformation. Itbm-Rbm 26:133–139. https://doi.org/10.1016/j.rbmret.2005.02.001

    Article  Google Scholar 

  11. Jayachandran ES, Joseph PK, Acharya RU (2010) Analysis of myocardial infarction using discrete wavelet transform. J Med Syst 34:985–992. https://doi.org/10.1007/s10916-009-9314-5

    Article  Google Scholar 

  12. Fu J, Yang Y, Singhrao K, Ruan D, Chu FI, Low DA, Lewis JH (2019) Deep learning approaches using 2D and 3D convolutional neural networks for generating male pelvic synthetic computed tomography from magnetic resonance imaging. Med Phys 46:3788–3798. https://doi.org/10.1002/mp.13672

    Article  Google Scholar 

  13. Acharya UR, Fujita H, Adam M, Lih OS, Sudarshan VK, Hong TJ, Koh JE, Hagiwara Y, Chua CK, Poo CK, San TR (2017) Automated characterization and classification of coronary artery disease and myocardial infarction by decomposition of ECG signals: A comparative study. Inf Sci (NY) 377:17–29. https://doi.org/10.1016/j.ins.2016.10.013

    Article  Google Scholar 

  14. Dohare AK, Kumar V, Kumar R (2018) Detection of myocardial infarction in 12 lead ECG using support vector machine. Appl Soft Comput J 64:138–147. https://doi.org/10.1016/j.asoc.2017.12.001

    Article  Google Scholar 

  15. Acharya R, Kannathal UN, Hua LM, Yi LM (2005) Study of heart rate variability signals at sitting and lying postures. J Bodyw Mov Ther 9:134–141. https://doi.org/10.1016/j.jbmt.2004.04.001

    Article  Google Scholar 

  16. Pławiak P, Acharya UR (2020) Novel deep genetic ensemble of classifiers for arrhythmia detection using ECG signals. Neural Comput Appl 32:11137–11161. https://doi.org/10.1007/s00521-018-03980-2

    Article  Google Scholar 

  17. Gupta V, Mittal M (2020) Efficient R-peak detection in electrocardiogram signal based on features extracted using Hilbert transform and burg method. J Inst Eng Ser B 101:23–34. https://doi.org/10.1007/s40031-020-00423-2

    Article  Google Scholar 

  18. Liu W, Zhang M, Zhang Y, Liao Y, Huang Q, Chang S, Wang H, He J (2018) Real-time multilead convolutional neural network for myocardial infarction detection. IEEE J Biomed Health Inform 22:1434–1444. https://doi.org/10.1109/JBHI.2017.2771768

    Article  Google Scholar 

  19. Baloglu UB, Talo M, Yildirim O, Tan RS, Acharya UR (2019) Classification of myocardial infarction with multi-lead ECG signals and deep CNN. Pattern Recognit Lett 122:23–30. https://doi.org/10.1016/j.patrec.2019.02.016

    Article  Google Scholar 

  20. Acharya UR, Fujita H, Oh SL, Hagiwara Y, Tan JH, Adam M, Tan RS (2019) Deep convolutional neural network for the automated diagnosis of congestive heart failure using ECG signals. Appl Intell 49:16–27. https://doi.org/10.1007/s10489-018-1179-1

    Article  Google Scholar 

  21. Han C, Shi L (2020) ML–ResNet: A novel network to detect and locate myocardial infarction using 12 leads ECG. Comput Methods Prog Biomed 185:105138. https://doi.org/10.1016/j.cmpb.2019.105138

    Article  Google Scholar 

  22. Xu C, Xu L, Brahm G, Zhang H, Li S (2018) MuTGAN: Simultaneous segmentation and quantification of myocardial infarction without contrast agents via joint adversarial learning. In: Lect. Notes Comput. Sci. (Including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), Springer Verlag, Berlin, pp 525–534. https://doi.org/10.1007/978-3-030-00934-2_59

  23. Zhang J, Lin F, Xiong P, Du H, Zhang H, Liu M, Hou Z, Liu X (2019) Automated detection and localization of myocardial infarction with staked sparse autoencoder and treebagger. IEEE Access 7:70634–70642. https://doi.org/10.1109/ACCESS.2019.2919068

    Article  Google Scholar 

  24. Rahhal MMA, Bazi Y, Alhichri H, Alajlan N, Melgani F, Yager RR (2016) Deep learning approach for active classification of electrocardiogram signals. Inf Sci (NY) 345:340–354. https://doi.org/10.1016/j.ins.2016.01.082

    Article  Google Scholar 

  25. Kora P (2017) ECG based myocardial infarction detection using hybrid firefly algorithm. Comput Methods Prog Biomed 152:141–148. https://doi.org/10.1016/j.cmpb.2017.09.015

    Article  Google Scholar 

  26. Acharya UR, Fujita H, Lih OS, Adam M, Tan JH, Chua CK (2017) Automated detection of coronary artery disease using different durations of ECG segments with convolutional neural network. Knowl-Based Syst 132:62–71. https://doi.org/10.1016/j.knosys.2017.06.003

    Article  Google Scholar 

  27. Sharma M, Tan RS, Acharya UR (2018) A novel automated diagnostic system for classification of myocardial infarction ECG signals using an optimal biorthogonal filter bank. Comput Biol Med 102:341–356. https://doi.org/10.1016/j.compbiomed.2018.07.005

    Article  Google Scholar 

  28. Faust O, Shenfield A, Kareem M, San TR, Fujita H, Acharya UR (2018) Automated detection of atrial fibrillation using long short-term memory network with RR interval signals. Comput Biol Med 102:327–335. https://doi.org/10.1016/j.compbiomed.2018.07.001

    Article  Google Scholar 

  29. Fujita H, Cimr D (2019) Computer aided detection for fibrillations and flutters using deep convolutional neural network. Inf Sci (NY) 486:231–239. https://doi.org/10.1016/j.ins.2019.02.065

    Article  Google Scholar 

  30. Kayikcioglu İ, Akdeniz F, Köse C, Kayikcioglu T (2020) Time-frequency approach to ECG classification of myocardial infarction. Comput Electr Eng 84. https://doi.org/10.1016/j.compeleceng.2020.106621

  31. Liu W, Wang F, Huang Q, Chang S, Wang H, He J (2020) MFB-CBRNN: A hybrid network for MI detection using 12-Lead ECGs. IEEE J Biomed Health Inform 24:503–514. https://doi.org/10.1109/JBHI.2019.2910082

    Article  Google Scholar 

  32. Physionet MIT-BIH (2005) Arrhythmia Database-v1. https://doi.org/10.13026/C2F30500

  33. Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PC, Mark RG, Mietus JE, Moody GB, Peng C, Stanley HE (2000) PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals. Circulation 101:23. https://doi.org/10.1161/01.CIR.101.23.e215

    Article  Google Scholar 

  34. Bousseljot AN, Kreiseler R, Schnabel D (1995) The PTB diagnostic ECG database. Biomed Tech 40:317. https://doi.org/10.13026/C28C71

    Article  Google Scholar 

  35. Fazeli S (2018) ECG heartbeat categorization dataset, Kaggle.  https://www.kaggle.com/shayanfazeli/heartbeat. Accessed 21 Aug 2020

  36. Kachuee M, Fazeli S, Sarrafzadeh M ( 2018) ECG heartbeat classification: A deep transferable representation. In: Proc. – 2018 IEEE Int. Conf. Healthc. Informatics, ICHI 2018, pp 443–444. https://doi.org/10.1109/ICHI.2018.00092

  37. Madasamy K, Ramaswami M (2017) Data imbalance and classifiers: impact and solutions from a big data perspective. International Journal of Computational Intelligence Research, Volume 13, Number 9 (2017), pp. 2267-2281. Accessed August 23, 2020

  38. Younes C (2019) Resampling to properly handle imbalanced datasets in machine learning |. Heartbeat. https://heartbeat.fritz.ai/resampling-to-properly-handle-imbalanced-datasets-in-machine-learning-64d82c16ceaa. Accessed 28 Aug 2020

  39. Gonzalez CI, Melin P, Castro JR, Castillo O (2017) Metrics for edge detection methods. SpringerBriefs Appl Sci Technol:17–19. https://doi.org/10.1007/978-3-319-53994-2_4

  40. Jahani Heravi E, Habibi Aghdam H, Puig D (2018) An optimized convolutional neural network with bottleneck and spatial pyramid pooling layers for classification of foods. Pattern Recognit Lett 105:50–58. https://doi.org/10.1016/j.patrec.2017.12.007

    Article  Google Scholar 

  41. Escontrela A (2020) Convolutional neural networks from the ground up - Towards data science, Towardsdatascience.Com. https://towardsdatascience.com/convolutional-neural-networks-mathematics-1beb3e6447c0. Accessed 8 Dec 2020

  42. Kabir Anaraki A, Ayati M, Kazemi F (2019) Magnetic resonance imaging-based brain tumor grades classification and grading via convolutional neural networks and genetic algorithms. Biocybern Biomed Eng 39:63–74. https://doi.org/10.1016/j.bbe.2018.10.004

    Article  Google Scholar 

  43. Phi M (2018) Illustrated Guide to LSTM’s and GRU’s: A step by step explanation, Medium.Com, 1–15. https://towardsdatascience.com/illustrated-guide-to-lstms-and-gru-s-a-step-by-step-explanation-44e9eb85bf21. Accessed 23 Aug 2020

  44. Omkar N (2019) Activation functions with derivative and python code: Sigmoid Vs Tanh Vs Relu. https://medium.com/@omkar.nallagoni/activation-functions-with-derivative-and-python-code-sigmoid-vs-tanh-vs-relu-44d23915c1f4. Accessed 23 Aug 2020

  45. Lih OS, Jahmunah V, San TR, Ciaccio EJ, Yamakawa T, Tanabe M, Kobayashi M, Faust O, Acharya UR (2020) Comprehensive electrocardiographic diagnosis based on deep learning. Artif Intell Med 103:101789. https://doi.org/10.1016/j.artmed.2019.101789

    Article  Google Scholar 

  46. Lutins E (2017) Ensemble methods in machine learning: What are they and why use them? | by Evan Lutins | Towards Data Science, Towardsdatascience.Com https://towardsdatascience.com/ensemble-methods-in-machine-learning-what-are-they-and-why-use-them-68ec3f9fef5f. Accessed 11 Dec 2020

  47. Brownlee J (2016) What is a confusion matrix in machine learning, Machinelearningmastery.  https://machinelearningmastery.com/confusion-matrix-machine-learning/. Accessed 7 Dec 2020

  48. Leonel J (2019) Hyperparameters in machine/deep learning, Medium.Com https://medium.com/@jorgesleonel/hyperparameters-in-machine-deep-learning-ca69ad10b981. Accessed 23 May 2020

  49. Liu W, Huang Q, Chang S, Wang H, He J (2018) Multiple-feature-branch convolutional neural network for myocardial infarction diagnosis using electrocardiogram. Biomed Signal Process Control 45:22–32. https://doi.org/10.1016/j.bspc.2018.05.013

    Article  Google Scholar 

  50. Sharma LD, Sunkaria RK (2018) Inferior myocardial infarction detection using stationary wavelet transform and machine learning approach. Signal Image Video Process 12:199–206. https://doi.org/10.1007/s11760-017-1146-z

    Article  Google Scholar 

  51. Sadhukhan D, Pal S, Mitra M (2018) Automated identification of myocardial infarction using harmonic phase distribution pattern of ECG Data. IEEE Trans Instrum Meas 67:2303–2313. https://doi.org/10.1109/TIM.2018.2816458

    Article  Google Scholar 

  52. Savostin AA, Ritter DV, Savostina GV (2019) Using the K-nearest neighbors algorithm for automated detection of myocardial infarction by electrocardiogram data entries. Pattern Recognit Image Anal 29:730–737. https://doi.org/10.1134/S1054661819040151

    Article  Google Scholar 

  53. Sharma LD, Sunkaria RK (2020) Myocardial infarction detection and localization using optimal features based lead specific approach. Irbm 41:58–70. https://doi.org/10.1016/j.irbm.2019.09.003

    Article  Google Scholar 

  54. Alghamdi A, Hammad M, Ugail H, Abdel-Raheem A, Muhammad K, Khalifa HS (2020) A.A. Abd El-Latif, Detection of myocardial infarction based on novel deep transfer learning methods for urban healthcare in smart cities. Multimed Tools Appl. https://doi.org/10.1007/s11042-020-08769-x

    Article  Google Scholar 

  55. Jafarian K, Vahdat V, Salehi S, Mobin M (2020) Automating detection and localization of myocardial infarction using shallow and end-to-end deep neural networks. Appl Soft Comput J 93:106383. https://doi.org/10.1016/j.asoc.2020.106383

    Article  Google Scholar 

  56. Lin Z, Gao Y, Chen Y, Ge Q, Mahara G, Zhang J (2020) Automated detection of myocardial infarction using robust features extracted from 12-lead ECG. Signal Image Video Process 14:857–865. https://doi.org/10.1007/s11760-019-01617-y

    Article  Google Scholar 

  57. Heo J, Lee JJ, Kwon S, Kim B, Hwang SO, Yoon YR (2020) A novel method for detecting ST segment elevation myocardial infarction on a 12-lead electrocardiogram with a three-dimensional display. Biomed Signal Process Control 56:101700. https://doi.org/10.1016/j.bspc.2019.101700

    Article  Google Scholar 

  58. Yildirim O, Talo M, Ciaccio EJ, Tan RS, Acharya UR (2020) Accurate deep neural network model to detect cardiac arrhythmia on more than 10,000 individual subject ECG Records. Comput Methods Prog Biomed 197:105740. https://doi.org/10.1016/j.cmpb.2020.105740

    Article  Google Scholar 

  59. Sridhar C, Lih OS, Jahmunah V, Koh JEW, Ciaccio EJ, San TR, Arunkumar N, Kadry S (2020) U. Rajendra Acharya, Accurate detection of myocardial infarction using non linear features with ECG signals. J Ambient Intell Humaniz Comput. https://doi.org/10.1007/s12652-020-02536-4

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hari Mohan Rai.

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

Rai, H.M., Chatterjee, K. Hybrid CNN-LSTM deep learning model and ensemble technique for automatic detection of myocardial infarction using big ECG data. Appl Intell 52, 5366–5384 (2022). https://doi.org/10.1007/s10489-021-02696-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10489-021-02696-6

Keywords

Navigation