Development and comparative analysis of predictive length of stay models using machine learning in Malaysian tertiary hospitals
Abstract
Abstract 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 localised machine learning models to predict LOS in tertiary public hospitals in Kelantan, Malaysia, calibrated to regional operational dynamics. A retrospective cohort study was conducted utilising eight years of inpatient records (2017–2024). From an initial cohort of 849,593 admissions, a final analytic sample of 251,321 was retained after systematic exclusion and stratified sampling to handle heterogeneous records and to optimise the models against extremely skewed LOS distribution. Predictive performance was compared across four supervised regression models: Decision Tree, Elastic Net, Random Forest, and eXtreme Gradient Boosting (XGBR). The XGBR model emerged as the superior architecture ( R 2 = 0.305, MAE = 5.075). SHAP analysis identified clinical discipline as the primary determinant, while systemic factors such as public holidays and night-shift admissions significantly influenced stay durations. This research establishes an empirical foundation for the digital transformation of hospital resource management in Malaysia, providing a pathway to optimise bed management and ensure healthcare sustainability.
// Source
Authors: Suhana Hasan, Ezzeddin Kamil Mohamed Hashim, Afiq Izzudin A Rahim, Mohd Ismail Ibrahim, Zaidi Zakaria
Institutions: Hospital Universiti Sains Malaysia