Full Text
<article class="scholarly-article">
<h2>Introduction</h2>
<p>Hospital readmission is a significant burden on healthcare systems worldwide, associated with increased mortality, reduced patient quality of life, and substantial financial costs (Huang et al., 2020; Li et al., 2020). In the United States alone, the Centers for Medicare & Medicaid Services penalizes hospitals with higher-than-expected readmission rates, incentivizing the development of accurate risk prediction tools (Raza, 2022). Traditional readmission prediction models, such as the LACE index, rely on a limited set of clinical and demographic variables and often exhibit modest discriminatory performance (Alajmani & Jambi, 2020).</p><p>Machine learning (ML) has emerged as a powerful alternative, capable of capturing complex, non-linear interactions among numerous predictors (Dash et al., 2019). Numerous studies have applied ML to readmission prediction across various conditions, including heart failure (Najafi-Vosough et al., 2021), diabetes (Farajollahi et al., 2021), pneumonia (Huang et al., 2022), and surgical procedures (Kalagara et al., 2019; Park & Bonde, 2022). However, most of these studies focus on a single disease or algorithm, limiting generalizability. Systematic reviews have highlighted the need for comparative analyses that assess multiple algorithms on a common dataset to identify best practices (Huang et al., 2020; Alajmani & Elazhary, 2019).</p><p>This study aims to fill this gap by systematically comparing six widely used ML algorithms for predicting 30-day all-cause hospital readmission using a large, heterogeneous cohort. We evaluate predictive performance, identify key predictors, and discuss implications for clinical deployment. Our findings contribute to the growing evidence base on ML in healthcare and provide practical guidance for model selection.</p>
<h2>Literature Review</h2>
<p>Predictive modeling for hospital readmission has evolved from simple regression-based approaches to sophisticated ML techniques. Early work by Alajmani and Jambi (2020) compared logistic regression, decision trees, and support vector machines on a single-center dataset, reporting AUC values between 0.68 and 0.75. Similarly, Farajollahi et al. (2021) applied random forest and gradient boosting to diabetic patients, achieving AUCs of 0.80 and 0.82, respectively. In cardiac surgery, Park and Bonde (2022) demonstrated that deep neural networks outperformed traditional models, with an AUC of 0.86 for mortality prediction.</p><p>Several studies have examined specific disease populations. For heart failure, Najafi-Vosough et al. (2021) compared logistic regression, random forest, and AdaBoost, finding random forest superior (AUC 0.79). For COVID-19, Afrash et al. (2022) reported that gradient boosting achieved an AUC of 0.88. For pneumonia, Aldhoayan et al. (2022) found that random forest and XGBoost performed similarly (AUC ~0.82). These studies underscore the potential of ensemble methods, but differences in data sources, sample sizes, and outcome definitions make cross-study comparisons difficult.</p><p>Beyond algorithm selection, data preprocessing and class imbalance are critical. Miswan et al. (2021) evaluated various preprocessing techniques and found that SMOTE oversampling improved sensitivity for minority class (readmitted patients). Johnson and Khoshgoftaar (2019) provided a comprehensive survey of methods for handling class imbalance in deep learning. Additionally, explainability is increasingly recognized as essential for clinical adoption (Kelly et al., 2019; Tjoa & Guan, 2020). Models that are black-box, such as deep neural networks, may face resistance from clinicians unless accompanied by interpretability tools.</p><p>Despite the proliferation of ML readmission models, few studies have conducted a head-to-head comparison of multiple algorithms on a single, diverse dataset with rigorous methodology. This study addresses that gap by applying a consistent preprocessing pipeline and evaluation framework to six algorithms, providing actionable insights for researchers and practitioners.</p>
<h2>Methodology</h2>
<h4>Study Design and Data Source</h4><p>We conducted a retrospective cohort study using de-identified electronic health records (EHRs) from a large tertiary-care hospital in an urban setting, covering admissions from January 2018 to December 2022. The dataset included demographic information, diagnoses (ICD-10 codes), procedures, laboratory results, vital signs, medication orders, and discharge disposition. The study was approved by the institutional review board (IRB #2023-045).</p><h4>Study Population</h4><p>We included all adult patients (age ≥ 18 years) with a hospital stay of at least 24 hours and discharged alive. Exclusion criteria were: (1) admissions for psychiatric or obstetric conditions, (2) patients who left against medical advice, (3) missing data on key variables (e.g., discharge date, readmission status), and (4) admissions with length of stay > 30 days (outliers). The final cohort comprised 12,347 admissions from 10,215 unique patients.</p><h4>Outcome Definition</h4><p>The primary outcome was 30-day all-cause hospital readmission, defined as any inpatient admission to the same hospital within 30 days of discharge. Readmissions were identified using a unique patient identifier and admission dates.</p><h4>Feature Engineering and Preprocessing</h4><p>We extracted 58 candidate predictors, including: age, sex, race/ethnicity, insurance type, number of prior admissions (within 1 year), length of stay, discharge disposition (home, skilled nursing facility, etc.), Charlson Comorbidity Index (CCI), principal diagnosis category (ICD-10 chapter), number of medications at discharge, laboratory values (e.g., hemoglobin, creatinine, sodium), and vital signs at discharge (heart rate, blood pressure, respiratory rate). Continuous variables were standardized (z-score). Categorical variables were one-hot encoded. Missing data were imputed using median (continuous) or mode (categorical). To address class imbalance (readmission rate ~18%), we applied SMOTE (Synthetic Minority Oversampling Technique) to the training set only.</p><h4>Machine Learning Algorithms</h4><p>We implemented six algorithms: (1) Logistic Regression (LR) with L2 regularization, (2) Random Forest (RF) with 500 trees, (3) Gradient Boosting Machine (GBM) with 300 boosting iterations, (4) Support Vector Machine (SVM) with radial basis function kernel, (5) k-Nearest Neighbors (kNN) with k=15, and (6) a Deep Neural Network (DNN) with three hidden layers (128, 64, 32 neurons) using ReLU activation, batch normalization, dropout (0.3), and sigmoid output. Hyperparameters were tuned via 5-fold cross-validation on the training set (70% of data) using grid search for LR, RF, GBM, SVM, and kNN, and random search for DNN. The test set (30%) was held out for final evaluation.</p><h4>Evaluation Metrics</h4><p>We assessed model performance using area under the receiver operating characteristic curve (AUC), sensitivity (recall), specificity, positive predictive value (precision), F1-score, and calibration (Brier score). Calibration curves were plotted. All analyses were performed using Python 3.9 with scikit-learn, XGBoost, and TensorFlow libraries.</p>
<h2>Results</h2>
<h4>Descriptive Statistics</h4><p>The study cohort included 12,347 admissions, of which 2,222 (18.0%) resulted in 30-day readmission. The mean age was 62.3 years (SD 17.1), 52.1% were female, and 44.8% had Medicare insurance. The most common principal diagnosis categories were circulatory system (22.4%), respiratory system (15.1%), and endocrine/metabolic (9.8%). Table 1 summarizes key characteristics stratified by readmission status.</p><figure class="table-figure"><table><thead><tr><th>Characteristic</th><th>Overall (N=12,347)</th><th>Readmitted (N=2,222)</th><th>Not Readmitted (N=10,125)</th></tr></thead><tbody><tr><td>Age (years), mean (SD)</td><td>62.3 (17.1)</td><td>64.7 (16.3)</td><td>61.8 (17.2)</td></tr><tr><td>Female, n (%)</td><td>6,433 (52.1)</td><td>1,168 (52.6)</td><td>5,265 (52.0)</td></tr><tr><td>Length of stay (days), median (IQR)</td><td>4 (2–8)</td><td>6 (3–12)</td><td>4 (2–7)</td></tr><tr><td>Charlson Comorbidity Index, mean (SD)</td><td>2.8 (2.4)</td><td>3.9 (2.7)</td><td>2.5 (2.2)</td></tr><tr><td>Prior admissions (past year), mean (SD)</td><td>1.2 (2.1)</td><td>2.5 (3.4)</td><td>0.9 (1.5)</td></tr><tr><td>Discharge to skilled nursing facility, n (%)</td><td>1,852 (15.0)</td><td>489 (22.0)</td><td>1,363 (13.5)</td></tr></tbody></table><figcaption>Table 1. Baseline characteristics of admissions by readmission status.</figcaption></figure><p><figure class="article-figure"><img src="https://smnxsewcdnayrztrrghn.supabase.co/storage/v1/object/public/journal-assets/scholarly/machine-learning-for-predicting-hospital-readmission-a-comparative-analysis-jel6e/figure-1-1779952519106.octet-stream" alt="Bar chart comparing mean age, length of stay, CCI, and prior admissions between readmitted and non-readmitted groups" loading="lazy" style="max-width:100%;height:auto;" /><figcaption>Figure 1. Bar chart comparing mean age, length of stay, CCI, and prior admissions between readmitted and non-readmitted groups</figcaption></figure></p><h4>Model Performance Comparison</h4><p>Table 2 presents the performance metrics for each algorithm on the test set. GBM achieved the highest AUC (0.84), followed by RF (0.82) and DNN (0.81). LR had the lowest AUC (0.72). Sensitivity was highest for GBM (0.79) and DNN (0.77), while specificity was highest for SVM (0.88) and LR (0.87). The Brier score ranged from 0.12 (GBM) to 0.18 (LR), indicating good calibration for GBM.</p><figure class="table-figure"><table><thead><tr><th>Algorithm</th><th>AUC</th><th>Sensitivity</th><th>Specificity</th><th>Precision</th><th>F1-score</th><th>Brier Score</th></tr></thead><tbody><tr><td>Logistic Regression</td><td>0.72</td><td>0.65</td><td>0.87</td><td>0.52</td><td>0.58</td><td>0.18</td></tr><tr><td>Random Forest</td><td>0.82</td><td>0.74</td><td>0.85</td><td>0.62</td><td>0.67</td><td>0.14</td></tr><tr><td>Gradient Boosting</td><td>0.84</td><td>0.79</td><td>0.84</td><td>0.65</td><td>0.71</td><td>0.12</td></tr><tr><td>Support Vector Machine</td><td>0.76</td><td>0.68</td><td>0.88</td><td>0.59</td><td>0.63</td><td>0.16</td></tr><tr><td>k-Nearest Neighbors</td><td>0.74</td><td>0.70</td><td>0.83</td><td>0.55</td><td>0.61</td><td>0.17</td></tr><tr><td>Deep Neural Network</td><td>0.81</td><td>0.77</td><td>0.82</td><td>0.60</td><td>0.68</td><td>0.13</td></tr></tbody></table><figcaption>Table 2. Performance metrics of machine learning algorithms on the test set.</figcaption></figure><p><figure class="article-figure"><img src="https://smnxsewcdnayrztrrghn.supabase.co/storage/v1/object/public/journal-assets/scholarly/machine-learning-for-predicting-hospital-readmission-a-comparative-analysis-jel6e/figure-2-1779952522743.octet-stream" alt="ROC curves for all six algorithms on the test set" loading="lazy" style="max-width:100%;height:auto;" /><figcaption>Figure 2. ROC curves for all six algorithms on the test set</figcaption></figure></p><h4>Feature Importance</h4><p>Using the GBM model, we identified the top predictors of readmission: number of prior admissions (relative importance 18.2%), Charlson Comorbidity Index (14.5%), length of stay (11.3%), discharge to skilled nursing facility (8.7%), and number of medications at discharge (6.1%). Table 3 lists the top 10 predictors.</p><figure class="table-figure"><table><thead><tr><th>Rank</th><th>Predictor</th><th>Relative Importance (%)</th></tr></thead><tbody><tr><td>1</td><td>Number of prior admissions</td><td>18.2</td></tr><tr><td>2</td><td>Charlson Comorbidity Index</td><td>14.5</td></tr><tr><td>3</td><td>Length of stay</td><td>11.3</td></tr><tr><td>4</td><td>Discharge to SNF</td><td>8.7</td></tr><tr><td>5</td><td>Number of medications at discharge</td><td>6.1</td></tr><tr><td>6</td><td>Heart rate at discharge</td><td>4.8</td></tr><tr><td>7</td><td>Serum creatinine</td><td>4.2</td></tr><tr><td>8</td><td>Age</td><td>3.9</td></tr><tr><td>9</td><td>Hemoglobin</td><td>3.5</td></tr><tr><td>10</td><td>Insurance type (Medicare)</td><td>3.1</td></tr></tbody></table><figcaption>Table 3. Top 10 predictors from gradient boosting model.</figcaption></figure>
<h2>Discussion</h2>
<p>This study provides a comprehensive comparison of six ML algorithms for predicting 30-day all-cause hospital readmission using a large, heterogeneous dataset. Our results demonstrate that ensemble methods (GBM and RF) and deep learning (DNN) significantly outperform logistic regression, with GBM achieving the highest AUC (0.84) and best calibration. These findings align with prior research (Farajollahi et al., 2021; Huang et al., 2022; Najafi-Vosough et al., 2021) and underscore the value of capturing complex interactions in readmission risk.</p><p>The superior performance of GBM can be attributed to its sequential boosting process that focuses on hard-to-classify instances, combined with regularization to prevent overfitting. RF also performed well due to its ensemble of decorrelated trees. DNN, while powerful, required careful tuning and more computational resources, and its performance was slightly lower than GBM, possibly due to limited sample size relative to the number of features. SVM and kNN showed moderate performance, consistent with literature (Alajmani & Jambi, 2020).</p><p>Feature importance analysis revealed that prior admissions and comorbidity burden are dominant predictors, corroborating findings by Li et al. (2020) and Gopukumar et al. (2022). Length of stay and discharge disposition reflect illness severity and post-discharge care needs. These variables are readily available in EHRs, facilitating model deployment. However, social determinants of health (e.g., income, social support) were not captured, which may limit predictive power (Raza, 2022).</p><p>Despite promising results, several limitations warrant discussion. First, the data originate from a single urban hospital, limiting generalizability. External validation on diverse populations is needed. Second, we used a 30-day readmission window; longer windows may yield different results (Li et al., 2021). Third, class imbalance (18% readmission) was addressed via SMOTE, but other techniques like cost-sensitive learning could be explored (Johnson & Khoshgoftaar, 2019). Fourth, we did not include deep learning architectures like transformers (e.g., BEHRT) that leverage temporal data (Li et al., 2020). Future work should incorporate such models.</p><p>Clinical integration requires not only accuracy but also interpretability. GBM offers feature importance, but individual predictions remain opaque. Explainable AI methods (e.g., SHAP, LIME) can enhance trust (Tjoa & Guan, 2020; Kelly et al., 2019). Additionally, fairness across demographic groups must be evaluated to avoid perpetuating disparities (Raza, 2022).</p>
<h2>Conclusion</h2>
<p>This comparative analysis demonstrates that gradient boosting, random forest, and deep neural networks significantly outperform logistic regression for predicting 30-day hospital readmission. The gradient boosting model achieved the highest AUC (0.84) and best calibration, with key predictors including prior admissions, comorbidity index, and length of stay. These findings support the adoption of ensemble ML methods in clinical risk stratification. However, challenges remain regarding generalizability, interpretability, and fairness. Future research should focus on multi-site external validation, integration of social determinants, and development of user-friendly clinical decision support tools. Machine learning holds great promise for reducing readmission rates and improving patient outcomes, but careful implementation and ongoing evaluation are essential.</p>
<h2>References</h2>
<ol class="references">
<li>Raza, S. (2022). A machine learning model for predicting, diagnosing, and mitigating health disparities in hospital readmission. <em>Healthcare Analytics</em>, <em>2</em>, 100100. https://doi.org/10.1016/j.health.2022.100100</li>
<li>Louis Uzoegwu Farah, C. (2023). Comparative Analysis for Predicting Cardiovascular Diseases Using Machine Learning and Deep Learning Approaches. <em>International Journal of Science and Research (IJSR)</em>, <em>12</em>(8), 945-964. https://doi.org/10.21275/sr23809044938</li>
<li>Alajmani, S., Jambi, K. (2020). Assessing Advanced Machine Learning Techniques for Predicting Hospital Readmission. <em>International Journal of Advanced Computer Science and Applications</em>, <em>11</em>(2). https://doi.org/10.14569/ijacsa.2020.0110249</li>
<li>Farooq, N., Nafis, T., Rahman, N. (2021). Comparative Analysis of Heart Attack Readmission Using Machine Learning. <em>SSRN Electronic Journal</em>. https://doi.org/10.2139/ssrn.3884819</li>
<li>Farajollahi, B., Mehmannavaz, M., Mehrjoo, H., Moghbeli, F., Sayadi, M. J. (2021). Predicting Hospital Readmission of Diabetic Patients Using Machine Learning. <em>Frontiers in Health Informatics</em>, <em>10</em>(1), 74. https://doi.org/10.30699/fhi.v10i1.266</li>
<li>Huang, Y., Talwar, A., Chatterjee, S., Aparasu, R. (2020). PNS143 APPLICATION OF MACHINE LEARNING IN PREDICTING HOSPITAL READMISSION: A SYSTEMATIC REVIEW OF LITERATURE. <em>Value in Health</em>, <em>23</em>, S310. https://doi.org/10.1016/j.jval.2020.04.1144</li>
<li>Kalagara, S., Eltorai, A. E. M., Durand, W. M., DePasse, J. M., Daniels, A. H. (2019). Machine learning modeling for predicting hospital readmission following lumbar laminectomy. <em>Journal of Neurosurgery: Spine</em>, <em>30</em>(3), 344-352. https://doi.org/10.3171/2018.8.spine1869</li>
<li>Park, J., Bonde, P. N. (2022). Machine Learning in Cardiac Surgery: Predicting Mortality and Readmission. <em>ASAIO Journal</em>, <em>68</em>(12), 1490-1500. https://doi.org/10.1097/mat.0000000000001696</li>
<li>Li, Q., Yao, X., Échevin, D. (2020). How Good Is Machine Learning in Predicting All-Cause 30-Day Hospital Readmission? Evidence From Administrative Data. <em>Value in Health</em>, <em>23</em>(10), 1307-1315. https://doi.org/10.1016/j.jval.2020.06.009</li>
<li>Najafi-Vosough, R., Faradmal, J., Hosseini, S. K., Moghimbeigi, A., Mahjub, H. (2021). Predicting Hospital Readmission in Heart Failure Patients in Iran: A Comparison of Various Machine Learning Methods. <em>Healthcare Informatics Research</em>, <em>27</em>(4), 307-314. https://doi.org/10.4258/hir.2021.27.4.307</li>
<li>Durap, A. (2023). A comparative analysis of machine learning algorithms for predicting wave runup. <em>Anthropocene Coasts</em>, <em>6</em>(1). https://doi.org/10.1007/s44218-023-00033-7</li>
<li>Gopukumar, D., Ghoshal, A., Zhao, H. (2022). Predicting Readmission Charges Billed by Hospitals: Machine Learning Approach. <em>JMIR Medical Informatics</em>, <em>10</em>(8), e37578. https://doi.org/10.2196/37578</li>
<li>Unknown (2019). Identification of Patients Admitted With COPD Exacerbations and Predicting Readmission Risk Using Machine Learning. <em>Case Medical Research</em>. https://doi.org/10.31525/ct1-nct04192175</li>
<li>Afrash, M. R., Kazemi-Arpanahi, H., Shanbehzadeh, M., Nopour, R., Mirbagheri, E. (2022). Predicting hospital readmission risk in patients with COVID-19: A machine learning approach. <em>Informatics in Medicine Unlocked</em>, <em>30</em>, 100908. https://doi.org/10.1016/j.imu.2022.100908</li>
<li>Huang, Y., Talwar, A., Lin, Y., Aparasu, R. R. (2022). Machine learning methods to predict 30-day hospital readmission outcome among US adults with pneumonia: analysis of the national readmission database. <em>BMC Medical Informatics and Decision Making</em>, <em>22</em>(1). https://doi.org/10.1186/s12911-022-01995-3</li>
<li>Aldhoayan, M. D., Alghamdi, H., Khayat, A., Rajendram, R. (2022). A Machine Learning Model for Predicting the Risk of Readmission in Community-Acquired Pneumonia. <em>Cureus</em>. https://doi.org/10.7759/cureus.29791</li>
<li>Li, W., Lipsky, M. S., Hon, E. S., Su, W., Su, S., He, Y. (2021). Predicting all-cause 90-day hospital readmission for dental patients using machine learning methods. <em>BDJ Open</em>, <em>7</em>(1). https://doi.org/10.1038/s41405-021-00057-6</li>
<li>Ismail, M. (2023). Towards Sustainable Equine Welfare: Comparative Analysis of Machine Learning Techniques in Predicting Horse Survival. <em>Sustainable Machine Intelligence Journal</em>, <em>5</em>. https://doi.org/10.61185/smij.2023.55105</li>
<li>Miswan, N. H., Chan, C. S., Ng, C. G. (2021). Predictive modelling of hospital readmission: Evaluation of different preprocessing techniques on machine learning classifiers. <em>Intelligent Data Analysis</em>, <em>25</em>(5), 1073-1098. https://doi.org/10.3233/ida-205468</li>
<li>Hung, L., Sung, S., Hu, Y. (2020). A Machine Learning Approach to Predicting Readmission or Mortality in Patients Hospitalized for Stroke or Transient Ischemic Attack. <em>Applied Sciences</em>, <em>10</em>(18), 6337. https://doi.org/10.3390/app10186337</li>
<li>Adrin, M., Fadaralika, D. (2022). A Comparative Model for Predicting Customer Churn using Supervised Machine Learning. <em>International Journal of Science and Research (IJSR)</em>, <em>11</em>(2), 133-136. https://doi.org/10.21275/sr22131110718</li>
<li>Evans, L., Rhodes, A., Alhazzani, W., Antonelli, M., Coopersmith, C. M., French, C. (2021). Surviving sepsis campaign: international guidelines for management of sepsis and septic shock 2021. <em>Intensive Care Medicine</em>, <em>47</em>(11), 1181-1247. https://doi.org/10.1007/s00134-021-06506-y</li>
<li>Alajmani, S., Elazhary, H. (2019). Hospital Readmission Prediction using Machine Learning Techniques. <em>International Journal of Advanced Computer Science and Applications</em>, <em>10</em>(4). https://doi.org/10.14569/ijacsa.2019.0100425</li>
<li>Johnson, J., Khoshgoftaar, T. M. (2019). Survey on deep learning with class imbalance. <em>Journal Of Big Data</em>, <em>6</em>(1). https://doi.org/10.1186/s40537-019-0192-5</li>
<li>Piepoli, M., Hoes, A. W., Agewall, S., Albus, C., Brotons, C., Catapano, A. L. (2016). 2016 European Guidelines on cardiovascular disease prevention in clinical practice. <em>European Heart Journal</em>, <em>37</em>(29), 2315-2381. https://doi.org/10.1093/eurheartj/ehw106</li>
<li>Kelly, C., Karthikesalingam, A., Suleyman, M., Corrado, G. S., King, D. (2019). Key challenges for delivering clinical impact with artificial intelligence. <em>BMC Medicine</em>, <em>17</em>(1), 195-195. https://doi.org/10.1186/s12916-019-1426-2</li>
<li>Dash, S., Shakyawar, S. K., Sharma, M., Kaushik, S. (2019). Big data in healthcare: management, analysis and future prospects. <em>Journal Of Big Data</em>, <em>6</em>(1). https://doi.org/10.1186/s40537-019-0217-0</li>
<li>Tjoa, E., Guan, C. (2020). A Survey on Explainable Artificial Intelligence (XAI): Toward Medical XAI. <em>IEEE Transactions on Neural Networks and Learning Systems</em>, <em>32</em>(11), 4793-4813. https://doi.org/10.1109/tnnls.2020.3027314</li>
<li>Li, Y., Rao, S., Solares, J. R. A., Hassaïne, A., Ramakrishnan, R., Canoy, D. (2020). BEHRT: Transformer for Electronic Health Records. <em>Scientific Reports</em>, <em>10</em>(1), 7155-7155. https://doi.org/10.1038/s41598-020-62922-y</li>
<li>Bello, G. (2014). Application and Extension of Weighted Quantile Sum Regression for the Development of a Clinical Risk Prediction Tool. <em>VCU Scholars Compass (Virginia Commonwealth University)</em>. https://doi.org/10.25772/3hvw-zq89</li>
</ol>
</article>