Survival Analysis of Patients with COVID-19 using Deep Neural Network and Random Forrest Techniques

Azita Yazdani, Leila Erfannia, Ali Farzaneh, Omar Ali



Introduction: The prediction of the survival chance of coronavirus disease 2019 (COVID-19) patients is as important as the early detection of the coronavirus. Since patient mortality, factors may differ by location, this study concentrated on identifying the influential factors and predicting survival for COVID-19 patients using machine learning methods in Fars province, Iran.

Material and Methods: The research dataset was extracted in the period January 21, 2020, to September 25, 2020, and contains 25858 hospitalized patients’ records with 51 features. These records were classified into two categories: death (label 1) and survival (label 0). The methodology of this research is CRISP standard. A comparison was made between the efficiency of two deep neural network and random forest algorithms in predicting survival. Modeling steps were done with Python language in the Google Colab environment.

Results: Experimental results demonstrated that the deep neural network algorithm had better performance than random forest with accuracy, precision, recall, F-score, and receiver operating characteristic of 97.2%, 100%, 93.54%, 96.66%, and 97.9%, respectively. Based on the results of the random forest model, history of hypertension, chronic neurological disorders, chronic lung diseases, asthma, chronic kidney disease and, heart disease were the most important risk factors related to death.

Conclusion: Deployment of our proposed model allows medical professionals to exercise greater caution during the treatment of patients who are most likely to die due to their medical conditions.


Machine Learning; Deep learning; COVID-19; Survival;


Moulaei K, Shanbehzadeh M, Mohammadi-Taghiabad Z, Kazemi-Arpanahi H. Comparing machine learning algorithms for predicting COVID-19 mortality. BMC Med Inform Decis Mak. 2022; 22(1): 2. PMID: 34983496 DOI: 10.1186/s12911-021-01742-0

Alyasseri ZAA, Al‐Betar MA, Doush IA, Awadallah MA, Abasi AK, Makhadmeh SN, et al. Review on COVID‐19 diagnosis models based on machine learning and deep learning approaches. Expert Syst. 2022; 39(3): e12759. PMID: 34511689 DOI: 10.1111/exsy.12759

Rezaee R, Asadi S, Yazdani A, Rezvani A, Kazeroon AM. Development, usability and quality evaluation of the resilient mobile application for women with breast cancer. Health Sci Rep. 2022; 5(4): e708. PMID: 35782301 DOI: 10.1002/hsr2.708

Yazdani A, Sharifian R, Ravangard R, Zahmatkeshan M. COVID-19 and information communication technology: a conceptual model. Journal of Advanced Pharmacy Education and Research. 2021; 11: 83-97.

Afrash MR, Erfannia L, Amraei M, Mehrabi N, Jelvay S, Shanbehzadeh M. Machine learning-based clinical decision support system for automatic diagnosis of COVID-19 based on the routine blood test. Journal of Biostatistics and Epidemiology. 2022; 8(1): 77-89.

Almalki YE, Qayyum A, Irfan M, Haider N, Glowacz A, Alshehri FM, et al. A novel method for COVID-19 diagnosis using artificial intelligence in chest X-ray images. Healthcare. 2021; 9(5): 522.

Irfan M, Iftikhar MA, Yasin S, Draz U, Ali T, Hussain S, et al. Role of hybrid deep neural networks (HDNNs), computed tomography, and chest X-rays for the detection of COVID-19. Int J Environ Res Public Health. 2021; 18(6): 3056. PMID: 33809665 DOI: 10.3390/ijerph18063056

Meng L, Dong D, Li L, Niu M, Bai Y, Wang M, et al. A deep learning prognosis model help alert for COVID-19 patients at high-risk of death: a multi-center study. IEEE J Biomed Health Inform. 2020; 24(12): 3576-84. PMID: 33108303 DOI: 10.1109/JBHI.2020.3034296

Ikemura K, Bellin E, Yagi Y, Billett H, Saada M, Simone K, et al. Using automated machine learning to predict the mortality of patients with COVID-19: Prediction model development study. J Med Internet Res. 2021; 23(2): e23458. PMID: 33539308 DOI: 10.2196/23458

Nemati M, Ansary J, Nemati N. Machine-learning approaches in COVID-19 survival analysis and discharge-time likelihood prediction using clinical data. Patterns (N Y). 2020; 1(5): 100074. PMID: 32835314 DOI: 10.1016/j.patter.2020.100074

Wang P, Li Y, Reddy CK. Machine learning for survival analysis: A survey. ACM Computing Surveys. 2019; 51(6): 1-36.

Suresh K, Severn C, Ghosh D. Survival prediction models: an introduction to discrete-time modeling. BMC Med Res Methodol. 2022; 22(1): 207. PMID: 35883032 DOI: 10.1186/s12874-022-01679-6

Qiu X, Gao J, Yang J, Hu J, Hu W, Kong L, et al. A comparison study of machine learning (random survival forest) and classic statistic (cox proportional hazards) for predicting progression in high-grade glioma after proton and carbon ion radiotherapy. Front Oncol. 2020; 10: 551420. PMID: 33194609 DOI: 10.3389/fonc.2020.551420

Shanbehzadeh M, Nopour R, Kazemi-Arpanahi H. Design of an artificial neural network to predict mortality among COVID-19 patients. Inform Med Unlocked. 2022; 31: 100983. PMID: 35664686 DOI: 10.1016/j.imu.2022.100983

Kazemi-Arpanahi H, Moulaei K, Shanbehzadeh M. Design and development of a web‐based registry for Coronavirus (COVID‐19) disease. Med J Islam Repub Iran. 2020; 34: 68. PMID: 32974234 DOI: 10.34171/mjiri.34.68

Atlam M, Torkey H, El-Fishawy N, Salem H. Coronavirus disease 2019 (COVID-19): survival analysis using deep learning and Cox regression model. Pattern Anal Appl. 2021; 24(3): 993-1005. PMID: 33613099 DOI: 10.1007/s10044-021-00958-0

Sankaranarayanan S, Balan J, Walsh JR, Wu Y, Minnich S, Piazza A, et al. COVID-19 mortality prediction from deep learning in a large multistate electronic health record and laboratory information system data set: Algorithm development and validation. J Med Internet Res. 2021; 23(9): e30157. PMID: 34449401 DOI: 10.2196/30157

Khozeimeh F, Sharifrazi D, Izadi NH, Joloudari JH, Shoeibi A, Alizadehsani R, et al. Combining a convolutional neural network with autoencoders to predict the survival chance of COVID-19 patients. Sci Rep. 2021; 11(1): 15343. PMID: 34321491 DOI: 10.1038/s41598-021-93543-8

Näppi JJ, Uemura T, Watari C, Hironaka T, Kamiya T, Yoshida H. U-survival for prognostic prediction of disease progression and mortality of patients with COVID-19. Sci Rep. 2021; 11(1): 9263. PMID: 33927287 DOI: 10.1038/s41598-021-88591-z

Shu M, Bowen RS, Herrmann C, Qi G, Santacatterina M, Zabih R. Deep survival analysis with longitudinal X-rays for COVID-19. International Conference on Computer Vision. IEEE; 2021.

Wang J, Yu H, Hua Q, Jing S, Liu Z, Peng X, et al. A descriptive study of random forest algorithm for predicting COVID-19 patients outcome. PeerJ. 2020; 8: e9945. PMID: 32974109 DOI: 10.7717/peerj.9945

Sharma SK, Lilhore UK, Simaiya S, Trivedi NK. An improved random forest algorithm for predicting the COVID-19 pandemic patient health. Annals of the Romanian Society for Cell Biology. 2021; 25(1): 67-75.

Gupta VK, Gupta A, Kumar D, Sardana A. Prediction of COVID-19 confirmed, death, and cured cases in India using random forest model. Big Data Mining and Analytics. 2021; 4(2): 116-23.

COVID live: Coronavirus statistics [Internet]. 2022 [cited: 10 Aug 2023]. Available from:

Talebi SS, Hosseinzadeh A, Zare F, Daliri S, Atergeleh HJ, Khosravi A, et al. Risk factors associated with mortality in COVID-19 patient’s: Survival analysis. Iran J Public Health. 2022; 51(3): 652-8. PMID: 35865069 DOI: 10.18502/ijph.v51i3.8942

Chapman P. CRISP-DM 1.0: Step-by-step data mining guide. SPSS Inc; 2000.

Chen Y, Ouyang L, Bao FS, Li Q, Han L, Zhu B, et al. An interpretable machine learning framework for accurate severe vs non-severe COVID-19 clinical type classification. J Med Internet Res. 2021; 23(4): e23948. PMID: 33714935 DOI: 10.2196/23948

Cutler DR, Edwards TC, Beard KH, Cutler A, Hess KT, Gibson J, et al. Random forests for classification in ecology. Ecology. 2007; 88(11): 2783-92. PMID: 18051647 DOI: 10.1890/07-0539.1

Cisterna-Garcia A, Guillen-Teruel A, Caracena M, Perez E, Jimenez F, Francisco-Verdu FJ, et al. A predictive model for hospitalization and survival to COVID-19 in a retrospective population-based study. Sci Rep. 2022; 12(1): 18126. PMID: 36307436 DOI: 10.1038/s41598-022-22547-9

Wirth R, Hipp J. CRISP-DM: Towards a standard process model for data mining. International Conference on the Practical Applications of Knowledge Discovery and Data Mining. Practical Application Company Ltd; 2000.

Xu H, Kinfu KA, LeVine W, Panda S, Dey J, Ainsworth M, et al. When are deep networks really better than decision forests at small sample sizes, and how? arXiv Preprint. 2021; 210813637.

Sarker IH. Deep learning: A comprehensive overview on techniques, taxonomy, applications and research directions. SN Comput Sci. 2021; 2(6): 420. PMID: 34426802 DOI: 10.1007/s42979-021-00815-1

Shaban WM, Rabie AH, Saleh AI, Abo-Elsoud M. Detecting COVID-19 patients based on fuzzy inference engine and deep neural network. Appl Soft Comput. 2021; 99: 106906. PMID: 33204229 DOI: 10.1016/j.asoc.2020.106906

Hossin M, Sulaiman MN. A review on evaluation metrics for data classification evaluations. International Journal of Data Mining & Knowledge Management Process. 2015; 5(2): 1-11.

Bradley AP. The use of the area under the ROC curve in the evaluation of machine learning algorithms. Pattern Recognition. 1997; 30(7): 1145-59.

Hajian-Tilaki K. Receiver operating characteristic (ROC) curve analysis for medical diagnostic test evaluation. Caspian J Intern Med. 2013; 4(2): 627-35. PMID: 24009950

Ahmed TU, Jamil MN, Hossain MS, Islam RU, Andersson K. An integrated deep learning and belief rule base intelligent system to predict survival of COVID-19 patient under uncertainty. Cognit Comput. 2022; 14(2): 660-76. PMID: 34931129 DOI: 10.1007/s12559-021-09978-8



  • There are currently no refbacks.