Pediatric patient hospital length of stay prediction: A comparative analysis of Bayesian inference and machine learning approaches

Predicting patient length of stay (LoS) is crucial for optimizing resource allocation and enhancing healthcare efficiency. However, achieving accurate LoS predictions remains a challenging and complex task. This study presents a non-disease-specific predictive model that integrates machine learning (ML) methods and Bayesian inference techniques to accurately predict hospital LoS using static patient admission data. While traditional statistical regression techniques have been widely used for LoS prediction within hospital settings, this research investigates the capabilities of ML and Bayesian inference algorithms in this context. By leveraging Bayesian inference techniques, our model captures complex relationships within the data and quantifies uncertainty, offering a more nuanced understanding of the outcomes. This methodological approach offers a more comprehensive and probabilistically grounded framework for LoS prediction, allowing more informed decision-making in resource allocation and patient management. Among the evaluated models, extreme boosting and support vector machine regressor models demonstrated the highest efficiency, achieving mean squared logarithmic error (MSLE) values of 0.23 and 0.24, respectively. The Bayesian model also showed competitive performance with an MSLE of 0.25. While it did not outperform other models in terms of error metrics, the Bayesian model’s ability to provide additional uncertainty output enhances its utility, offering valuable supplementary information for informed decision-making. This research highlights the potential of ML and Bayesian inference in predicting patient LoS, emphasizing their significance in effective resource allocation and patient care management within the healthcare sector.

- Chen M, Hao Y, Hwang K, Wang L, Wang L. Disease prediction by machine learning over big data from healthcare communities. IEEE Access. 2017;5:8869-8879. doi: 10.1109/access.2017.2694446
- Jain R, Singh M, Rao AR, Garg R. Predicting hospital length of stay using machine learning on a large open health dataset. BMC Health Serv Res. 2024;24(1):860. doi: 10.1186/s12913-024-11238-y
- Bopche R, Gustad LT, Afset JE, Ehrnström B, Damås JK, Nytrø Ø. In-hospital mortality, readmission, and prolonged length of stay risk prediction leveraging historical electronic patient records. JAMIA Open. 2024;7(3):ooae074. doi: 10.1093/jamiaopen/ooae074
- Kothinti RR. Deep learning in healthcare: Transforming disease diagnosis, personalized treatment, and clinical decision-making through AI-driven innovations. World J Adv Res Rev. 2024;24(2):2841-2856. doi: 10.30574/wjarr.2024.24.2.3435
- Van Houdenhoven M, Nguyen DT, Eijkemans MJ, et al. Optimizing intensive care capacity using individual length-of-stay prediction models. Crit Care. 2007;11(2):R42. doi: 10.1186/cc5730
- Barnes SL, Hamrock E, Toerper MF, Siddiqui S, Levin SR. Real-time prediction of inpatient length of stay for discharge prioritization. J Am Med Inform Assoc. 2016;23(e1):e2-e10. doi: 10.1093/jamia/ocv106
- Mahyoub MA, Dougherty K, Yadav RR, Berio-Dorta R, Shukla A. Development and validation of a machine learning model integrated with the clinical workflow for inpatient discharge date prediction. Front Digit Health. 2024;6:1455446. doi: 10.3389/fdgth.2024.1455446
- Wessman T, Ärnlöv J, Carlsson AC, et al. The association between length of stay in the emergency department and short-term mortality. Intern Emerg Med. 2021;17(1):233-240. doi: 10.1007/s11739-021-02783-z
- Arabi Y, Venkatesh S, Haddad S, Al Shimemeri A, Al Malik S. A prospective study of prolonged stay in the intensive care unit: Predictors and impact on resource utilization. Int J Qual Health Care. 2002;14(5):403-410. doi: 10.1093/intqhc/14.5.403
- Gruenberg DA, Shelton W, Rose SL, Rutter AE, Socaris S, McGee G. Factors influencing length of stay in the intensive care unit. Am J Crit Care. 2019;15(5):502-509. doi: 10.4037/ajcc2006.15.5.502
- Gustafson DH. Length of stay: Prediction and explanation. Health Serv Res. 2025;3(1):12-34.
- Baek H, Cho M, Kim S, Hwang H, Song M, Yoo S. Analysis of length of hospital stay using electronic health records: A statistical and data mining approach. PLoS One. 2018;13(4):e0195901. doi: 10.1371/journal.pone.0195901
- Awad A, Bader-El-Den M, McNicholas J. Patient length of stay and mortality prediction: A survey. Health Serv Manag Res. 2017;30(2):105-120. doi: 10.1177/0951484817696212
- Stone K, Zwiggelaar R, Jones P, Mac Parthaláin N. A systematic review of the prediction of hospital length of stay: Towards a unified framework. PLOS Digital Health. 2022;1(4):e0000017. doi: 10.1371/journal.pdig.0000017
- Morton A, Marzban E, Giannoulis G, Patel A, Aparasu R, Kakadiaris IA. A Comparison of Supervised Machine Learning Techniques for Predicting Short-Term in-Hospital Length of Stay among Diabetic Patients. United States: IEEE Xplore; 2014. p. 428-431. doi: 10.1109/ICMLA.2014.76
- Ma F, Yu L, Ye L, Yao DD, Zhuang W. Length-of-stay prediction for pediatric patients with respiratory diseases using decision tree methods. IEEE J Biomed Health Inform. 2020;24(9):2651-2662. doi: 10.1109/jbhi.2020.2973285
- Goh KH, Wang L, Yeow AYK, et al. Artificial intelligence in sepsis early prediction and diagnosis using unstructured data in healthcare. Nat Commun. 2021;12(1):711. doi: 10.1038/s41467-021-20910-4
- Turgeman L, May JH, Sciulli R. Insights from a machine learning model for predicting the hospital length of stay (LOS) at the time of admission. Exp Syst Appl. 2017;78:376-385. doi: 10.1016/j.eswa.2017.02.023
- Fortuin V. Priors in bayesian deep learning: A review. Int Statis Rev. 2022;90:563-591. doi: 10.1111/insr.12502
- Austin PC, Naylor CD, Tu JV. A comparison of a bayesian vs. A frequentist method for profiling hospital performance. J Eval Clin Pract. 2001;7(1):35-45. doi: 10.1046/j.1365-2753.2001.00261.x
- Abdullah AA, Hassan MM, Mustafa YT. A review on bayesian deep learning in healthcare: Applications and challenges. IEEE Access. 2022;10:36538-36562. doi: 10.1109/access.2022.3163384
- Ruhe D, Cinà G, Tonutti M, Bruin D, Elbers P. Bayesian Modelling in Practice: Using Uncertainty to Improve Trustworthiness in Medical Applications; 2019. Available from: https://arxiv.org/abs/1906.08619 [Last accessed on 2025 Jul 10].
- Yang Y, Yang KS, Hsann YM, Lim V, Ong BC. The effect of comorbidity and age on hospital mortality and length of stay in patients with sepsis. J Crit Care. 2010;25(3):398-405. doi: 10.1016/j.jcrc.2009.09.001
- Liu V, Kipnis P, Gould MK, Escobar GJ. Length of stay predictions: Improvements through the use of automated laboratory and comorbidity variables. Med Care. 2010;48(8):739-744. doi: 10.1097/mlr.0b013e3181e359f3
- Durango MC, Torres-Silva EA, Orozco-Duque A. Named entity recognition in electronic health records: A methodological review. Healthc Inform Res. 2023;29(4):286-300. doi: 10.4258/hir.2023.29.4.286
- Mitchell T. Machine Learning; 1997. Available from: https://www.cs.cmu.edu/~tom/files/MachineLearningTomMitchell.pdf
- Bishop CM. Pattern Recognition and Machine Learning. Berlin: Springer; 2006.
- Fernández-Delgado M, Cernadas E, Barro S, Amorim D. Do we need hundreds of classifiers to solve real world classification problems? J Mach Learn Res. 2014;15:3133-3181.
- Williford E, Haley V, McNutt LA, Lazariu V. Dealing with highly skewed hospital length of stay distributions: The use of Gamma mixture models to study delivery hospitalizations. PLoS One. 2020;15(4):e0231825. doi: 10.1371/journal.pone.0231825
- Lee H, Bennett MV, Schulman J, Gould JB, Profit J. Estimating length of stay by patient type in the neonatal intensive care unit. Am J Perinatol. 2016;33(8):751-757. doi: 10.1055/s-0036-1572433
- Muhlestein WE, Akagi DS, Davies JM, Chambless LB. Predicting inpatient length of stay after brain tumor surgery: Developing machine learning ensembles to improve predictive performance. Neurosurgery. 2018;85(3):384-393. doi: 10.1093/neuros/nyy343
- Medeiros NB, Fogliatto FS, Rocha MK, Tortorella GL. Forecasting the length-of-stay of pediatric patients in hospitals: A scoping review. BMC Health Serv Res. 2021;21(1):938. doi: 10.1186/s12913-021-06912-4
- Alsinglawi B, Alnajjar F, Mubin O, et al. Predicting Length of Stay for Cardiovascular Hospitalizations in the Intensive Care Unit: Machine Learning Approach. United States: IEEE Xplore; 2020. p. 5442-5445. doi: 10.1109/EMBC44109.2020.9175889
- Zolbanin HM, Davazdahemami B, Delen D, Zadeh AH. Data analytics for the sustainable use of resources in hospitals: Predicting the length of stay for patients with chronic diseases. Inform Manag. 2020;59:103282. doi: 10.1016/j.im.2020.103282
- Fang J, Zhu J, Zhang X. Prediction of length of stay on the intensive care unit based on bayesian neural network. J Phys Conf Ser. 2020;1631(1):012089. doi: 10.1088/1742-6596/1631/1/012089
- Abdurrab I, Mahmood T, Sheikh S, et al. Predicting the length of stay of cardiac patients based on pre-operative variables-bayesian models vs. Machine learning models. Healthcare (Basel). 2024;12(2):249. doi: 10.3390/healthcare12020249
- Lequertier V, Wang T, Fondrevelle J, Augusto V, Polazzi S, Duclos A. Length of stay prediction with standardized hospital data from acute and emergency care using a deep neural network. Med Care. 2024;62(4):225-234. doi: 10.1097/mlr.0000000000001975
- Hu Z, Qiu H, Wang L, Shen M. Network analytics and machine learning for predicting length of stay in elderly patients with chronic diseases at point of admission. BMC Med Inform Decis Mak. 2022;22(1):62. doi: 10.1186/s12911-022-01802-z
- Rocheteau E, Liò P, Hyland SL. Temporal Pointwise Convolutional Networks for Length of Stay Prediction in the Intensive Care Unit. United States: Cornell University; 2021. doi: 10.1145/3450439.3451860