Machine Learning Models Based on a National-Scale Cohort Identify Patients at High Risk for Prolonged Lengths of Stay Following Primary Total Hip Arthroplasty

J Arthroplasty. 2023 Oct;38(10):1967-1972. doi: 10.1016/j.arth.2023.06.009. Epub 2023 Jun 12.

Abstract

Background: Existing machine learning models that predicted prolonged lengths of stay (LOS) following primary total hip arthroplasty (THA) were limited by the small training volume and exclusion of important patient factors. This study aimed to develop machine learning models using a national-scale data set and examine their performance in predicting prolonged LOS following THA.

Methods: A total of 246,265 THAs were analyzed from a large database. Prolonged LOS was defined as exceeding the 75th percentile of all LOSs in the cohort. Candidate predictors of prolonged LOS were selected by recursive feature elimination and used to construct four machine learning models-artificial neural network, random forest, histogram-based gradient boosting, and k-nearest neighbor. The model performance was assessed by discrimination, calibration, and utility.

Results: All models exhibited excellent performance in discrimination (area under the receiver operating characteristic curve [AUC] = 0.72 to 0.74) and calibration (slope: 0.83 to 1.18, intercept: -0.01 to 0.11, Brier score: 0.185 to 0.192) during both training and testing sessions. The artificial neural network was the best performer with an AUC of 0.73, calibration slope of 0.99, calibration intercept of -0.01, and Brier score of 0.185. All models showed great utility by producing higher net benefits than the default treatment strategies in the decision curve analyses. Age, laboratory tests, and surgical variables were the strongest predictors of prolonged LOS.

Conclusion: The excellent prediction performance of machine learning models demonstrated their capacity to identify patients prone to prolonged LOS. Many factors contributing to prolonged LOS can be optimized to minimize hospital stay for high-risk patients.

Keywords: artificial neural network; length of stay; machine learning model; model interpretability; total hip arthroplasty.

MeSH terms

  • Arthroplasty, Replacement, Hip*
  • Humans
  • Machine Learning
  • Neural Networks, Computer
  • Patients
  • ROC Curve