基于可解释机器学习模型的急性 diverticulitis 患者住院时长预测研究
Admission-time prediction of hospital length of stay in diverticular disease using explainable machine learning models
148例急性 diverticulitis 患者住院时长预测模型显示,XGBoost 在全体患者中表现最佳(MAE=0.03,R²=0.99),但需更大样本验证。
- Article
- Open access
- Published: 26 October 2026
- Gürkan Güneri ORCID: orcid.org/0000-0001-6749-21591,
- Emre Dandıl2,
- Kevser Dilek Andıç3,
- Mücahit Ünal1,
- Özcan Emre4,
- Kadir Çorbacı1,
- Doğuşcan Kurular5 &
- …
- Mehmet Emin Gönüllü1
Scientific Reports (2026) Cite this article
We’re sharing this article early to provide faster access to peer-reviewed, accepted research. It is citable and carries a permanent DOI. This version is subject to further edits and will be replaced automatically by the final Version of Record. All legal disclaimers apply.
Abstract
Acute diverticulitis (AD) is a leading cause of emergency department admissions and hospitalizations worldwide. Accurately predicting hospital length of stay (LOS) at the time of admission is essential for optimizing the utilization of resources, planning discharges and managing patients. The aim of this study was to develop and validate an explainable machine learning framework for predicting LOS at the time of admission in patients with diverticulitis and diverticulosis. A retrospective dataset comprising 148 hospitalized patients was analyzed. Advanced feature engineering techniques were applied, including interaction terms, nonlinear transformations, logarithmic scaling and clinically derived inflammatory indices. Multiple regression-based and machine learning model such as Linear Regression, Ridge Regression, Random Forest, XGBoost and a Voting Regressor ensemble were trained using log-transformed LOS values. Model performance was evaluated using five-fold cross-validation, bootstrap-based stability analysis, calibration assessment, SHAP-based explainability and Kaplan-Meier-based risk stratification. The mean LOS was 2.08 ± 2.5 days. Tree-based ensemble models demonstrated better predictive performance compared to linear models. XGBoost performed best in the full cohort (mean absolute error (MAE) = 0.03; R² = 0.99), while Random Forest and ensemble approaches showed comparable or improved performance in the diverticulitis subgroup with MAE of 0.74 and R² of 0.77. XGBoost showed exceptionally high apparent performance in the full cohort. However, stricter internal validation produced more conservative estimates. Patient-level nested out-of-fold (OOF) evaluation resulted in an R² of approximately 0.57, while bootstrap optimism correction yielded an optimism-corrected R² of 0.8314 and MAE of 0.3512 days. SHAP analysis indicated that Hinchey class and inflammatory characteristics contributed substantially to model predictions. Calibration and residual analyses indicated acceptable agreement between predicted and observed LOS, while prediction intervals provided clinically relevant uncertainty estimates. Subgroup analysis revealed decreased predictive performance and increased variability, reflecting the challenges associated with reduced sample size and heterogeneity. Combining explainable machine learning with clinically informed feature engineering provides a promising framework for estimating LOS at the time of admission for diverticular disease. However, the more conservative nested cross-validation results highlight the need for larger, independent cohorts in order to establish the generalizability and potential utility of the proposed approach.
Acknowledgements
We would like to thank Bilecik Training and Research Hospital for providing the dataset used in our study. All scientific content in this study was produced by the authors, and ChatGPT v5.3 was used to improve the manuscript’s language and readability. Our study is dedicated to and pays tribute to the citizens who lost their lives in the Kahramanmaraş earthquake on February 6, 2023.
Funding
This research received no external funding.
Author information
Authors and Affiliations
Department of General Surgery, Faculty of Medicine, Bilecik Şeyh Edebali University, Bilecik, Turkey
Gürkan Güneri, Mücahit Ünal, Kadir Çorbacı & Mehmet Emin Gönüllü
Department of Computer Engineering, Faculty of Engineering, Bilecik Seyh Edebali University, Bilecik, Turkey
Emre Dandıl
Department of Anesthesiology and Reanimation, Faculty of Medicine, Bilecik Şeyh Edebali University, Bilecik, Turkey
Kevser Dilek Andıç
Department of Radiology, Assoc. Prof. Dr. Mustafa Kalemli State Hospital, Tavşanlı, Kütahya, Turkey
Özcan Emre
Department of General Surgery, Bilecik Training and Research Hospital, Bilecik, Turkey
Doğuşcan Kurular
Authors
- Gürkan Güneri
- Emre Dandıl
- Kevser Dilek Andıç
- Mücahit Ünal
- Özcan Emre
- Kadir Çorbacı
- Doğuşcan Kurular
- Mehmet Emin Gönüllü
Corresponding author
Correspondence to Gürkan Güneri.
Ethics declarations
Competing interests
The authors declare no competing interests.
Institutional review board statement
The study was conducted in accordance with the Declaration of Helsinki, and approved by the Ethics Committee of Non-Interventional Clinical Research of Bilecik Şeyh Edebali University (2nd meeting, Decision No. 19 and approval date of February 26, 2026).
Informed consent statement
Informed consent was obtained from all subjects involved in the study.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Güneri, G., Dandıl, E., Andıç, K.D. et al. Admission-time prediction of hospital length of stay in diverticular disease using explainable machine learning models. Sci Rep (2026). https://doi.org/10.1038/s41598-026-78128-7
Received: 02 June 2026
Accepted: 23 October 2026
Published: 26 October 2026
DOI: https://doi.org/10.1038/s41598-026-78128-7
Keywords
来源:Nature 健康护理主题 · nature.com