Leveraging machine learning for duration of surgery prediction in knee and hip arthroplasty – a development and validation study - Langenberger, Benedikt; Schrednitzki, Daniel; Halder, Andreas; Busse, Reinhard; Pross, Christoph (BMC medical informatics and decision making, 2025)
Background Duration of surgery (DOS) varies substantially for patients with hip and knee arthroplasty (HA/KA) and is a major risk factor for adverse events. We therefore aimed (1) to identify whether machine learning can predict DOS in HA/KA patients using retrospective data available before surgery with reasonable performance, (2) to compare whether machine learning is able to outperform multivariable regression in predictive performance and (3) to identify the most important predictor variables for DOS both in a multi- and single-hospital context. Methods eXtreme Gradient Boosting (XGBoost) and multivariable linear regression were used for predictions. Both models were applied to both the whole dataset which included multiple hospitals (3,704 patients), and a single-hospital dataset (1,815 patients) of the hospital with the highest case-volumes of our sample. Data was split into training (75%) and test data (25%) for both datasets. Models were trained using 5-fold cross-validation (CV) on the training datasets and applied to test data for performance comparison. Results On test data in the multi-hospital setting, the mean absolute error (MAE) was 12.13 min (HA) / 13.61 min (KA) for XGBoost. In the single-hospital analysis, performance on test data was MAE 10.87 min (HA) / MAE 12.53 min (KA) for XGBoost. Predictive ability of XGBoost was tended to be better than of regression in all setting, however not statistically significantly. Important predictors for XGBoost were physician experience, age, body mass index, patient reported outcome measures and, for the multi-hospital analysis, the hospital. Conclusion Machine learning can predict DOS in both a multi-hospital and single-hospital setting with reasonable performance. Performance between regression and machine learning differed slightly, however insignificantly, while larger datasets may improve predictive performance. The study found that hospital indicators matter in the multi-hospital setting despite controlling for various variables, highlighting potential quality differences between hospitals. Trial registration The study was registered at the German Clinical Trials Register (DRKS) under DRKS00019916. Highlights Machine learning predicts surgery duration for hip and knee arthroplasty with a mean error of slightly above 10 min. Performance was comparable for a multi-hospital and a single-hospital setting. Hospital indicators were highly relevant predictors in the multi-hospital setting. Patients age, body composition and surgery-team related variables were major drivers of predictive power in both settings.