Predictors of in-hospital length of stay among cardiac patients: A machine learning approach

Tahani A. Daghistani, Radwa Elshawi, Sherif Sakr, Amjad M. Ahmed, Abdullah Al-Thwayee, Mouaz H. Al-Mallah

Research output: Contribution to journalArticlepeer-review

107 Scopus citations


Objective: The In-hospital length of stay (LOS) is expected to increase as cardiovascular diseases complexity increases and the population ages. This will affect healthcare systems especially with the current situation of decreased bed capacity and increasing costs. Therefore, accurately predicting LOS would have a positive impact on healthcare metrics. The aim of this study is to develop a machine learning-based model approach for predicting in-hospital LOS for cardiac patients. Design: Using electronic medical records, we retrospectively extracted all records of patients' visits that were admitted under adult cardiology service. Admission diagnosis and primary treating physician were reviewed to verify selection criteria. A predictive machine learning-based model approach was applied to incorporate simple baseline health data at admission time to predict LOS. Patients were divided into three groups based on their LOS: short (<3 days), intermediate (3–5 days) and long (>5 days). Information gain algorithm was utilized to select the most relevant attributes. Only attributes with information gain of more than zero were used in model building. Four different machine learning techniques were evaluated and their diagnostic accuracy measures were compared. Setting: The dataset of this study included adult patients who were admitted between 2008 and 2016 in King Abdulaziz Cardiac Center (KACC). The center is located in King Abdulaziz Medical City Complex in Riyadh, the capital of Saudi Arabia. Participants (dataset): A total of 16,414 consecutive inpatient visits for 12,769 unique patients (mean age of 58.8 ± 16 years of which 68.2% were males) between 2008 and 2016 were included. The study cohort had a high prevalence of cardiovascular risk factors (hypertension 56%, diabetes 56%, dyslipidemia 52%, obesity 33% and smoking 24%). The most common admitting diagnosis was acute coronary syndrome (36%). Results: The variables with highest impact on the prediction of in-hospital LOS were on admission heart rate, on admission systolic and diastolic blood pressure, age and insurance status (eligibility). Using machine learning models; Random Forest (RF) model outperformed among all other models (sensitivity (0.80), accuracy (0.80), and AUROC (0.94)). Conclusion: We showed that machine learning methods provide accurate prediction of LOS for cardiac patients. This is can be used in clinical bed management and resources allocation.

Original languageEnglish (US)
Pages (from-to)140-147
Number of pages8
JournalInternational Journal of Cardiology
StatePublished - Aug 1 2019


  • Cardiac science
  • Classification techniques
  • In-hospital length of stay
  • Machine learning
  • Prediction model

ASJC Scopus subject areas

  • Cardiology and Cardiovascular Medicine


Dive into the research topics of 'Predictors of in-hospital length of stay among cardiac patients: A machine learning approach'. Together they form a unique fingerprint.

Cite this