Predicting Length of Hospital stay for patients undergoing discectomy surgery using clinical and surgical parameters via machine learning

As one of the most frequent spine procedures, discectomy significantly impacts healthcare systems by extending postoperative length of stay (PLOS), which affects both patient recovery and resource management. This study evaluated machine learning models to identify key clinical predictors and accurately estimate hospital stay duration following discectomy. Potential factors influencing length of stay were initially gathered from existing literature and verified by a clinical expert panel. Medical records of 400 patients who underwent discectomy across three medical centers in Tabriz were analyzed. To address missing data (< 3.5%), simple imputation was applied after removing cases with high missingness. Data were partitioned into an 80% training set ( n = 320) and a 20% independent hold-out test set ( n = 80), with 5-fold cross-validation applied strictly during training. Six predictive algorithms—Linear Regression, LASSO Regression, Random Forest, XGBoost, Multilayer Perceptron (MLP), and Deep Neural Network (DNN)—were developed and evaluated. Model interpretability was further examined using global SHAP analysis. Postoperative blood loss, intraoperative blood loss, body mass index, age, duration of surgery, surgical instrumentation, and procedure location emerged as the highest-ranked predictors, whereas blood transfusion had the lowest impact. On the unseen test dataset, tree-based ensemble models achieved superior predictive accuracy compared to linear and deep learning approaches. The Random Forest model demonstrated the best overall performance (Mean Squared Error: 0.452, Explained Variance Score: 0.874, \(\:{R}^{2}\) : 0.874), closely followed by XGBoost ( \(\:{R}^{2}\) : 0.858), while LASSO ( \(\:{R}^{2}\) : 0.129) and linear baseline models yielded lower performance due to non-linear clinical feature interactions. Tree-based machine learning models, particularly Random Forest, offer promising capabilities for predicting hospital length of stay after discectomy. Identifying these key perioperative drivers can support clinical discharge planning, optimize bed capacity allocation, and improve hospital resource management.

Authors

Institutions

Publication Details

Journal
BMC Medical Informatics and Decision Making
Published
2026-10-17
DOI
https://doi.org/10.1186/s12911-026-03915-1
Primary Topic
Artificial Intelligence in Healthcare
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Predicting Length of Hospital stay for patients undergoing discectomy surgery using clinical and surgical parameters via machine learning

Ebrahim Rafiei, Behzad Imani, Samad Moslehi, Alireza Jafarkhani et al.
BMC Medical Informatics and Decision Making
Artificial Intelligence in Healthcare
article

Predicting Length of Hospital stay for patients undergoing discectomy surgery using clinical and surgical parameters via machine learning

Ebrahim Rafiei, Behzad Imani, Samad Moslehi, Alireza Jafarkhani, Faezeh Mehdipour
article en

Abstract

As one of the most frequent spine procedures, discectomy significantly impacts healthcare systems by extending postoperative length of stay (PLOS), which affects both patient recovery and resource management. This study evaluated machine learning models to identify key clinical predictors and accurately estimate hospital stay duration following discectomy. Potential factors influencing length of stay were initially gathered from existing literature and verified by a clinical expert panel. Medical records of 400 patients who underwent discectomy across three medical centers in Tabriz were analyzed. To address missing data (< 3.5%), simple imputation was applied after removing cases with high missingness. Data were partitioned into an 80% training set ( n = 320) and a 20% independent hold-out test set ( n = 80), with 5-fold cross-validation applied strictly during training. Six predictive algorithms—Linear Regression, LASSO Regression, Random Forest, XGBoost, Multilayer Perceptron (MLP), and Deep Neural Network (DNN)—were developed and evaluated. Model interpretability was further examined using global SHAP analysis. Postoperative blood loss, intraoperative blood loss, body mass index, age, duration of surgery, surgical instrumentation, and procedure location emerged as the highest-ranked predictors, whereas blood transfusion had the lowest impact. On the unseen test dataset, tree-based ensemble models achieved superior predictive accuracy compared to linear and deep learning approaches. The Random Forest model demonstrated the best overall performance (Mean Squared Error: 0.452, Explained Variance Score: 0.874, \(\:{R}^{2}\) : 0.874), closely followed by XGBoost ( \(\:{R}^{2}\) : 0.858), while LASSO ( \(\:{R}^{2}\) : 0.129) and linear baseline models yielded lower performance due to non-linear clinical feature interactions. Tree-based machine learning models, particularly Random Forest, offer promising capabilities for predicting hospital length of stay after discectomy. Identifying these key perioperative drivers can support clinical discharge planning, optimize bed capacity allocation, and improve hospital resource management.

BMC Medical Informatics and Decision Making
Hamedan University of Medical Sciences (IR), Tabriz University of Medical Sciences (IR), Urmia University (IR), Urmia University of Medical Sciences (IR)
Vice Chancellor for Research and Technology, Hamadan University of Medical Sciences
Good health and well-being
Openalex Percentile: Top 8%
Artificial Intelligence in Healthcare
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.