Skip to content
Open access

Machine learning prediction of inpatient length of stay in hospitalised patients with diabetes

2026 · The Atlantic Journal of Medical Science and Research · 0 citations

TL;DR

Polypharmacy, laboratory workload, and discharge disposition were identified as the primary drivers of prolonged hospitalisation, suggesting that targeted monitoring of these factors may support more effective resource allocation strategies in hospital settings.

Abstract

Aim: This study aimed to identify clinical, demographic, and pharmaceutical predictors of inpatient hospital length of stay (LOS) among diabetic patients using supervised machine learning classifiers, and to evaluate the comparative predictive performance of these models for LOS risk stratification. Materials and Methods: The University of California, Irvine (UCI) Diabetes 130-US Hospitals dataset (N = 101,763 encounters; 1999–2008) was used as the analytical sample. Following systematic preprocessing—including International Classification of Diseases, Ninth Revision (ICD-9) diagnostic grouping, ordinal age encoding, and medication status encoding—length of stay was operationalised as a three-class outcome: short (1–3 days; 48.3%), medium (4–7 days; 36.6%), and long (8–14 days; 15.0%). Spearman rank correlations and non-parametric group comparisons (Kruskal-Wallis test) were applied to examine univariate associations. Three supervised machine learning classifiers were then evaluated on held-out test data (n = 25,441): Logistic Regression, Decision Tree, and Gradient Boosting. Results: Spearman rank correlations revealed that polypharmacy (rs = 0.465, p < 0.001) and the number of laboratory procedures (rs = 0.337, p < 0.001) exhibited the strongest associations with LOS. Patient age demonstrated a statistically significant positive association with LOS (rs = 0.120, p < 0.001). Non-parametric group comparisons demonstrated significant variation in LOS across primary diagnosis categories (Kruskal-Wallis H = 1,780.77, p < 0.001) and age groups (H = 1,582.78, p < 0.001). The Gradient Boosting classifier achieved the highest classification accuracy (62.2%) and macro F1-score (0.56), with polypharmacy, laboratory workload, and discharge disposition emerging as the three most influential predictive features. Conclusion: These findings highlight the utility of ensemble machine learning methods for LOS risk stratification in diabetic inpatients. Polypharmacy, laboratory workload, and discharge disposition were identified as the primary drivers of prolonged hospitalisation, suggesting that targeted monitoring of these factors may support more effective resource allocation strategies in hospital settings.

Read PDF

Similar papers

Open access Sep 2026

Development and comparative analysis of predictive length of stay models using machine learning in Malaysian tertiary hospitals

Hospital length of stay (LOS) is a critical indicator of healthcare efficiency and resource allocation. While predictive modelling has escalated globally, there is a notable sparsity of literature utilising large-scale, real-world data from the Malaysian public health framework. This study developed and evaluated l...

Suhana Hasan, Ezzeddin Kamil Mohamed Hashim, Afiq Izzudin A. Rahim et al. · 0 citations
Sep 2026

Interpretable Machine Learning for In-Hospital Mortality Prediction in Patients With Diabetes and ARDS: Development and External Validation.

Logistic Regression showed potential as an interpretable early ICU risk-stratification tool and externally validated machine learning models for in-hospital mortality prediction in patients with diabetes and ARDS.

Ya-Lin Dong, Meng-Xue Hou, Qian-Qian Wang et al. · 0 citations
#protein folding Review Open access Aug 2026

Comparison of seven machine learning models for predicting prolonged PACU length of stay: performance evaluation and identification of key influencing factors

The XGBoost model developed in this study achieved a relatively high AUC of 0.901, indicating that the model’s ability to confirm prolonged PACU stay remains somewhat insufficient, and can be used as an auxiliary screening tool in clinical rather than a definitive diagnostic tool.

Na Zhu, Xiang Xiong, Xuan-Zhao Wu et al. · 0 citations
Open access Oct 2026

Machine Learning Prediction of 90-Day Readmission and Mortality in General Internal Medicine: A Retrospective Cohort Study

Background/Objectives: Predicting post-discharge outcomes in general internal medicine (GIM) is essential for targeted intervention. This study developed machine learning (ML) models to predict 90-day hospital readmission and 90-day all-cause post-discharge mortality using routine clinical data. Methods: This retrospec...

Laila Al Wahaibi, Said Al Jaadi, M. Al-Hinai et al. · 0 citations
Open access Sep 2026

Determinants and Prediction of In-Hospital Mortality in Pneumonia Patients Using Machine Learning Models

Machine-learning models, particularly RF, SVM, and NNET, outperformed LR in internal prediction, however, due to the retrospective single-hospital design and lack of external validation, further multicenter validation is needed before routine clinical use.

Akemat Wongpairin, Ibteesan Che-u-bong, Kulaya Chaibunma et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.