Journals / Gazi University Journal of Science / 2026 / Volume: 39 Issue: 3

Hybrid GAM–XGB Model for Predicting Hospital Length of Stay

Hastanede Kalış Süresini Tahmin Etmek İçin Hibrit GAM–XGB Modeli

Gizem İklil Koçyiğit(GAZİ ÜNİVERSİTESİ, FEN BİLİMLERİ ENSTİTÜSÜ)0000-0002-0068-5471
M. Akif Bakır(GAZİ ÜNİVERSİTESİ, FEN FAKÜLTESİ)0000-0003-0774-0338
Mustafa Candemir(GAZİ ÜNİVERSİTESİ, TIP FAKÜLTESİ)0000-0002-3645-3912
Pages
—
Publication Date
2026-09-01
🏛️Bibliographic metadata and full text access for this article are provided via DergiPark.
DergiPark Record ↗
✨

AI Summary & Key Takeaways

AI Insight
⚡ TL;DR(Too Long; Didn't Read)

The transfer of partial effects from GAM into the XGB model, utilizing them as new features, was instrumental in achieving a significant improvement in the model's overall prediction and generalization performance.

📌 3 Key Takeaways

🎯
Objective & Hypothesis:Due to the rise in both chronic illnesses and longevity, healthcare systems are now compelled to manage their resources more strategically.
📊
Key Findings & Data:In this context, Length of Stay (LOS) stands out as a key performance indicator for measuring the efficiency of healthcare services.
💡
Conclusion & Impact:The transfer of partial effects from GAM into the XGB model, utilizing them as new features, was instrumental in achieving a significant improvement in the model's overall prediction and generalization performance.
🔬Design:Modeling & Simulation
📍Scope:Comprehensive Sample
⚙️Variables:GAM · Hybrid algorithms · Healthcare efficiency

Abstract

Due to the rise in both chronic illnesses and longevity, healthcare systems are now compelled to manage their resources more strategically. In this context, Length of Stay (LOS) stands out as a key performance indicator for measuring the efficiency of healthcare services. This study analyzed the effects of homogram findings and demographic data on LOS for 6560 patients admitted to the cardiology clinic with a diagnosis of decompensated heart failure. To overcome the limitations of existing statistical and machine learning models, a new hybrid model combining Generalized Additive Models (GAM) and Xtreme Gradient Boosting (XGB) was introduced. The transfer of partial effects from GAM into the XGB model, utilizing them as new features, was instrumental in achieving a significant improvement in the model's overall prediction and generalization performance. The results show that the proposed model offers higher performance and clinical interpretability in LOS prediction compared to other models. The proposed method is poised to significantly advance healthcare planning by mitigating critical shortcomings in existing LOS prediction tools and establishing a robust framework for advanced clinical decision support systems.

Özet

Kronik hastalıkların ve yaşam süresinin artmasıyla birlikte, sağlık sistemleri kaynaklarını daha stratejik bir şekilde yönetmek zorunda kalmaktadır. Bu bağlamda, Hastanede Kalış Süresi (Length of Stay, LOS) sağlık hizmetlerinin verimliliğini ölçmede temel bir performans göstergesi olarak öne çıkmaktadır. Bu çalışmada, dekompanse kalp yetmezliği tanısıyla kardiyoloji kliniğine yatırılan 6560 hastaya ait hemogram bulguları ve demografik verilerin LOS üzerindeki etkileri analiz edilmiştir. Mevcut istatistiksel ve makine öğrenmesi modellerinin sınırlamalarını aşmak amacıyla, Genelleştirilmiş Toplamsal Modeller (GAM) ile Xtreme Gradient Boosting (XGB) yöntemlerini birleştiren yeni bir hibrit model önerilmiştir. GAM modelinden elde edilen kısmi etkilerin XGB modeline yeni özellikler olarak aktarılması, modelin genel tahmin doğruluğu ve genelleme performansında anlamlı bir iyileşme sağlamıştır. Elde edilen sonuçlar, önerilen modelin LOS tahmininde diğer modellere kıyasla daha yüksek performans ve klinik yorumlanabilirlik sunduğunu göstermektedir. Önerilen yöntemin, mevcut LOS tahmin araçlarındaki kritik eksiklikleri gidererek ve gelişmiş klinik karar destek sistemleri için sağlam bir çerçeve oluşturarak sağlık hizmetleri planlamasına önemli katkılar sağlaması beklenmektedir.

🔖

Cite This Article

Koçyiğit, G. İ., Bakır, M. A., Candemir, M. (2026). Hybrid GAM–XGB Model for Predicting Hospital Length of Stay. Gazi University Journal of Science, Volume: 39 Issue: 3. https://doi.org/10.35378/gujs.1876013

📄 Full Text PDF Viewer

📄

PDF görüntüleyici hazırlanıyor...

References (43)

  1. Wang, Z., Rostami-Tabar, B., Haider, J., Haider, J., and Naim, M., “Patient length of stay in trauma networks: Insights from advanced modelling”, Expert Systems with Applications, 289:127801, (2025). DOI: https://doi.org/10.1016/j.eswa.2025.127801
  2. https://www.who.int/news-room/facts-in-pictures/detail/patient-safety. Access date: 24.01.2026.
  3. Borghans, I., Heijink, R., Kool, T., Lagoe, R.J.,, and Westert, G.P., “Benchmarking and reducing length of stay in Dutch hospitals”, BMC Health Services Research, 8:220, (2008). DOI: https://doi.org/10.1186/1472-6963-8-220
  4. Fine, M.J., Pratt, H.M., Obrosky, D.S., Lave, J.R., McIntosh L.J., Singer D.S., Coley C.M., and Kapoor W.N., “Relation between length of hospital stay and costs of care for patients with community-acquired pneumonia”, The American Journal of Medicine, 109(5):378–385, (2000). DOI: https://doi.org/10.1016/s0002-9343(00)00500-3
  5. Su, M., Pan, D., Zhao, Y., Chen, C., Wang, X., Lu, W., Meng, H., Su, X., and Liang, P., “The direct and indirect effects of length of hospital stay on the costs of inpatients with stroke”, Frontiers in Public Health, 10:881273, (2022). DOI: https://doi.org/10.3389/fpubh.2022.881273
  6. Graves, N., “Economics of preventing hospital infection”, Emerging Infectious Diseases, 10(4):561–566, (2004). DOI: https://doi.org/10.3201/eid1004.020754
  7. Clarke, A., “Length of stay: How short should hospital care be?”, European Journal of Public Health, 11(2):166–170, (2001). DOI: https://doi.org/10.1093/eurpub/11.2.166
  8. Hirani, R., Podder, D., Stala, O., Mohebpour, R., Tiwari, R.K., and Etienne, M., “Strategies to reduce hospital length of stay: Evidence and challenges”, Medicina, 61(5):922, (2025). DOI: https://doi.org/10.3390/medicina61050922
  9. Kjekshus, L., and Hagen, T., “Do hospital mergers increase hospital efficiency?”, Journal of Health Services Research & Policy, 12(4):230–235, (2007). DOI: https://doi.org/10.1258/135581907782101561
  10. Lasater, K.B., Aiken, L.H., Sloane, D.M., French, R., Martin, B., Alexander, M., and McHugh, M.D., “Patient outcomes and cost savings associated with hospital safe nurse staffing legislation: an observational study”, BMJ Open, 11(12):e052899, (2021). DOI: https://doi.org/10.1136/bmjopen-2021-052899
  11. Almashrafi, A., Elmontsri, M., and Aylin, P., “Factors influencing length of stay in ICU after adult cardiac surgery”, BMC Health Services Research, 16: (2016). DOI: https://doi.org/10.1186/s12913-016-1591-3
  12. Lequertier, V., Wang, T., Fondrevelle, J., Augusto, V., and Duclos, A., “Hospital length of stay prediction methods: A systematic review”, Medical Care, 59(10):929–938, (2021). DOI: https://doi.org/10.1097/MLR.0000000000001596
  13. Stone, K., Zwiggelaar, R., Jones, P., and Mac Parthaláin, N., “A systematic review of the prediction of hospital length of stay: Towards a unified framework”, PLOS Digital Health, 1(4):e0000017, (2022). DOI: https://doi.org/10.1371/journal.pdig.0000017
  14. Alharbi, A.A., Muhayya, M., Alkhudairy, R., Alhussain, A.A., Muaddi, M.A., Alqassim, A.Y., AlOmar R.S., and Alabdulaali M.K., “The pattern of emergency department length of stay in Saudi Arabia: an epidemiological nationwide analyses of secondary surveillance data”, Frontiers in Public Health, 11:1265707, (2023). DOI: https://doi.org/10.3389/fpubh.2023.1265707
  15. Erickson, L.A., Ricketts, A., Swanson, T., Weiner, J., Hasnie, U.A., Bonessa, K., Noel-Macdonnell, J. and Russell, C.L., “Determinants of length of stay after neonatal cardiac surgery”, Western Journal of Nursing Research, 45(4):306–315, (2023). DOI: https://doi.org/10.1177/01939459221126978
  16. Mezzich, J.E., and Coffman, G.A., “Factors influencing length of hospital stay”, Psychiatric Services, 36(12):1262–1270, (1985). DOI: https://doi.org/10.1176/ps.36.12.1262
  17. Moore, L., Stelfox, H.T., Turgeon, A.F., Nathens, A.B., Bourgeois, G., Lapointe, J., and Lavoie, A., “Hospital length of stay after admission for traumatic injury in Canada”, Annals of Surgery, 260(1):179–187, (2014). DOI: https://doi.org/10.1097/SLA.0000000000000624
  18. Şahin, S., Doğan, U., Özdemir, K., and Gök, H., “Evaluation of clinical and demographic characteristics and their association with length of hospital stay in patients admitted to cardiac intensive care unit with the diagnosis of acute heart failure”, The Anatolian Journal of Cardiology, 12(2):123–131, (2012). DOI: https://doi.org/10.5152/akd.2012.035
  19. Trunfio, T.A., Scala, A., Giglio, C., Rossi, G.A., Borrelli, A., Romano, M., and Improta G., “Multiple regression model to analyze the total length of stay for patients undergoing laparoscopic appendectomy”, BMC Medical Informatics and Decision Making, 22:141, (2022). DOI: https://doi.org/10.1186/s12911-022-01884-9
  20. Zeleke, A.J., Moscato, S., Miglio, R., and Chiari, L., “Length of stay analysis of COVID-19 hospitalizations using a count regression model and quantile regression: A study in Bologna, Italy”, International Journal of Environmental Research and Public Health, 19(4):2224, (2022). DOI: https://doi.org/10.3390/ijerph19042224
  21. Farhadi Hassankiadeh, R., Kazemnejad, A., Gholami Fesharaki, M., Kargar Jahromi, S., and Vahabi, N., “Assessment of length of stay in a general surgical unit using a zero-inflated generalized poisson regression”, Medical Journal of the Islamic Republic of Iran, 31:530–534, (2017). DOI: https://doi.org/10.14196/mjiri.31.91
  22. Shaaban, A.N., Peleteiro, B., and Martins, M.R.O., “Predictors of length of stay among HIV patients in portugal using a multilevel model”, BMC Health Services Research, 21:372, (2021). DOI: https://doi.org/10.1186/s12913-021-06389-1
  23. Heit, D.R., Ortiz-Calo, W., Poisson, M.K.P., Butler, A.R., and Moll, R.J., “Generalized nonlinearity in animal ecology: Research, review, and recommendations”, Ecology and Evolution, 14(7):e11387, (2024). DOI: https://doi.org/10.1002/ece3.11387
  24. Wood, S.N., Generalized Additive Models: An Introduction with R, 2nd ed., Chapman and Hall/CRC, Boca Raton, (2017).
  25. Subbiah, M., and Srinivasan, M.R., “Fitting length of stay in hospitals using transformed distributions”, Communications in Statistics, 4(1):1–8, (2018). DOI: https://doi.org/10.1080/23737484.2018.1445979
  26. Alangari, N., Menai, M.E.B., Mathkour, H., and Almosallam, I., “Intrinsically interpretable Gaussian mixture model”, Information, 14(3):164, (2023). DOI: https://doi.org/10.3390/info14030164
  27. Cole, V.T., Bauer, D.J., and Hussong, A.M., “Robustness of mixture models”, Multivariate Behavioral Research, 54(6):882–905, (2019). DOI: https://doi.org/10.1080/00273171.2019.1596781
  28. Abdurrab, I., Mahmood, T., Sheikh, S., Aijaz, S., Kashif, M., Memon, A., Ali, I., Peerwani, G., Pathan, A., Alkhodre, A.B., Siddiqui, M.S., “Predicting the length of stay of cardiac patients based on pre-operative variables-Bayesian models vs. machine learning models”, Healthcare, 12(2):249, (2024). DOI: https://doi.org/10.3390/healthcare12020249
  29. Barsasella, D., Gupta, S., Malwade, S., Aminin, A., Susanti, Y., Tirmadi, B., Mutamakin, A. Jonnagaddala, J., and Syed-Abdul, S., “Predicting length of stay and mortality among hospitalized patients with type 2 diabetes mellitus and hypertension”, International Journal of Medical Informatics, 154:104569, (2021). DOI: https://doi.org/10.1016/j.ijmedinf.2021.104569
  30. Mensah, A.C., Asante, L.S., and Darkoh, E., “Predictors of in-hospital length of stay among cardiac patients: A machine learning approach”, Journal of Community Medicine and Public Health, 9(4):535, (2025). DOI: https://doi.org/10.29011/2577-2228.100535
  31. Ahmad, M.A., Eckert, C., and Teredesai, A., “Interpretable machine learning in healthcare”, ACM Conference on Bioinformatics, Computational Biology, and Health Informatics (ACM BCB), Washington DC, 559–560, (2018). DOI: https://doi.org/10.1145/3233547.3233667
  32. Caruana, R., Lou, Y., Gehrke, J., Koch, P., Sturm, M., and Elhadad, N., “Intelligible models for healthcare”, Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (ACM SIGKDD), 1721–1730, (2015). DOI: https://doi.org/10.1145/2783258.2788613
  33. Bushling, C., “Understanding the impact of the Medicaid expansion on hospital length of stay”, PhD Thesis, University of Kentucky, USA, (2025). DOI: https://doi.org/10.13023/etd.2025.147
  34. Fernandez, G.A., and Vatcheva, K.P., “Modeling count data for hospital length of stay”, BMC Medical Research Methodology, 22(1):211, (2022). DOI: https://doi.org/10.1186/s12874-022-01685-8
  35. Lee, H., Kim, S., Moon, H.-W., Lee, H.-Y., Kim, K., Jung, S.Y., and Yoo, S., “Hospital length of stay prediction”, Journal of Medical Internet Research, 26:e59260, (2024). DOI: https://doi.org/10.2196/59260
  36. Montgomery, D.C., Peck, E.A., and Vining, G.G., Introduction to Linear Regression Analysis, 4th ed., Wiley, New York, (2012).
  37. Hastie, T., and Tibshirani, R., “Generalized additive models”, Statistical Science, 1(3):297–318, (1986).
  38. Lou, Y., Caruana, R., and Gehrke, J., “Intelligible models for classification and regression”, Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Beijing, 150–158, (2012). DOI: https://doi.org/10.1145/2339530.2339556
  39. Barreñada, L., Dhiman, P., Timmerman, D., Boulesteix, A.-L., and Van Calster, B., “Understanding overfitting in random forest for probability estimation: a visualization and simulation study”, Diagnostic and Prognostic Research, 8:14, (2024). DOI: https://doi.org/10.1186/s41512-024-00177-1
  40. Peng, B., and Gao, S., “Prediction of hospital length of stay: leveraging ensemble tree models and intelligent feature selection”, Journal of Hospital Management and Health Policy, 9(4):13, (2025). DOI: https://doi.org/10.21037/jhmhp-24-129
  41. Daghistani, T.A., Elshawi, R., Sakr, S., Ahmed, A.M., Al-Thwayee, A., and Al-Mallah, M.H., “Predictors of in-hospital length of stay”, International Journal of Cardiology, 288:140–147, (2019). DOI: https://doi.org/10.1016/j.ijcard.2019.01.046
  42. Jain, R., Singh, M., Rao, A.R., and Garg, R., “Predicting hospital length of stay using machine learning on a large open health dataset”, BMC Health Services Research, 24:860, (2024). DOI: https://doi.org/10.1186/s12913-024-11238-y
  43. Ma, F., Yu, L., Ye, L., Yao, D.D., and Zhuang, W., “Length-of-stay prediction for pediatric patients with respiratory diseases using decision tree methods”, IEEE Journal of Biomedical and Health Informatics, 24(9):2651–2662, (2020). DOI: https://doi.org/10.1109/JBHI.2020.2973285