Related Experiment Video
Updated: Jan 31, 2026

Constructing and Visualizing Models using Mime-based Machine-learning Framework
Published on: July 22, 2025
Length of postoperative stay prediction in elderly patients with hip fractures based on machine learning
Yanli Hu1,2, Hong Qu3, Feifan Wang4
1Department of Orthopedics, Yichang Central People's Hospital, Yichang, China.
Background:
Length of postoperative stay (LOPS) is an important indicator for resource allocation and clinical management in elderly patients with hip fractures. However, previous studies have mostly dichotomized this continuous variable to determine whether it is prolonged, a practice that inherently reduces information and introduces limitations. This study aimed to develop and validate a machine learning (ML) model to accurately predict the specific LOPS in elderly patients with hip fractures.
Methods:
This retrospective cohort study included electronic health records (EHRs) of elderly patients with hip fractures admitted to Yichang Central People's Hospital from January 2016 to December 2022, with a total of 734 patients. Variables commonly measured preoperatively were extracted based on a review of previous studies, and features were selected using Pearson correlation coefficients combined with LASSO regression to construct a backpropagation neural network (BP-NN) model. For comparative evaluation, support vector machine (SVM) and random forest (RF) regression models were developed under the same dataset split (8:2), feature set, and hyperparameter optimization strategy. Model performance was assessed by comparing predicted values versus actual LOPS and calculating root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and error thresholds (20%, 30%). The feature importance of the BP-NN model was analyzed via SHapley Additive exPlanations (SHAP) values.
Results:
Among 734 elderly patients with hip fractures, 503 (68.53%) were female, with an average LOPS of 17.42± 3.77 days. Femoral neck fracture (59.26%) and hemiarthroplasty (41.96%) were the most common fracture type and surgical type, respectively. Pearson correlation analysis and LASSO regression showed that age, age-adjusted Charlson comorbidity index (ACCI), and surgical type were the predictors of LOPS. Further sensitivity analysis adjusting for confounding factors revealed that the very old elderly group (aged or above 90 years) had the longest LOPS (15.84± 0.15 days vs. 17.85± 0.14 days vs. 21.99 ± 0.66 days), with no statistically significant difference in LOPS between different surgical type subgroup (P > 0.05). The predicted values of the BP-NN were consistent with the trend of actual LOPS (R 2 = 0.83), with the vast majority of prediction results falling within 30% clinically acceptable error threshold. Its RMSE, MAE and MAPE of 1.23 days, 1.57 days and 7.69% respectively. SHAP analysis revealed that ACCI and age were the main factors influencing LOPS.
Conclusion:
The BP-NN model, enhanced by multimethod feature selection, rigorous parameter tuning, and SHAP based interpretability, provides early and accurate LOPS prediction for elderly hip fracture patients. It can be used as a tool to assist in clinical decision-making, resource planning, and discharge preparation, without increasing the clinical burden. Future external validation across multiple centers is needed to confirm generalizability.
More Related Videos
09:51The Transition to an Anterior-Based Muscle Sparing Approach Improves Early Postoperative Function but is Associated with a Learning Curve
Published on: September 7, 2022
06:58Method and Instrumented Fixture for Femoral Fracture Testing in a Sideways Fall-on-the-Hip Position
Published on: August 17, 2017
Related Concept Videos
Predicting Molecular Geometry
Machines
A free-body diagram of the...
Machines: Problem Solving II
Prediction Intervals
However, the point estimate is most likely not the exact value of the population parameter, but close to it. After calculating point estimates, we construct interval estimates, called confidence intervals or prediction intervals. This prediction interval comprises a range of values unlike the point estimate and is a better predictor of the observed sample value, y.
Machines: Problem Solving I
The toggle clamp system is a machine structure consisting of movable, pin-connected multi-force members that form a stabilized system to transmit forces. The...
Fractures: Bone Repair
Minor fractures with no bone displacement are treated by immobilizing the fractured bone using a cast or splint. However, in the case of fractures with displaced bones, the broken bones are repositioned before immobilization to ensure successful healing without deformation and loss of function. The realignment of fractured bone ends is performed through a process called reduction. If the...