JSES International (Mar 2024)

Random forest identifies predictors of discharge destination following total shoulder arthroplasty

  • Jun Ho Chung, MD,
  • Damien Cannon, MD,
  • Matthew Gulbrandsen, MD,
  • Dheeraj Yalamanchili, MD,
  • Wesley P. Phipatanakul, MD,
  • Joseph Liu, MD,
  • Anirudh Gowd, MD,
  • Anthony Essilfie, MD

Journal volume & issue
Vol. 8, no. 2
pp. 317 – 321

Abstract

Read online

Background: Machine learning algorithms are finding increasing use in prediction of surgical outcomes in orthopedics. Random forest is one of such algorithms popular for its relative ease of application and high predictability. In the process of sample classification, algorithms also generate a list of variables most crucial in the sorting process. Total shoulder arthroplasty (TSA) is a common orthopedic procedure after which most patients are discharged home. The authors hypothesized that random forest algorithm would be able to determine most important variables in prediction of nonhome discharge. Methods: Authors filtered the National Surgical Quality iImprovement Program database for patients undergoing elective TSA (Current Procedural Terminology 23472) between 2008 and 2018. Applied exclusion criteria included avascular necrosis, trauma, rheumatoid arthritis, and other inflammatory arthropathies to only include surgeries performed for primary osteoarthritis. Using Python and the scikit-learn package, various machine learning algorithms including random forest were trained based on the sample patients to predict patients who had nonhome discharge (to facility, nursing home, etc.). List of applied variables were then organized in order of feature importance. The algorithms were evaluated based on area under the curve of the receiver operating characteristic, accuracy, recall, and the F-1 score. Results: Application of inclusion and exclusion criteria yielded 18,883 patients undergoing elective TSA, of whom 1813 patients had nonhome discharge. Random forest outperformed other machine learning algorithms and logistic regression based on American Society of Anesthesiologists (ASA) classification. Random forest ranked age, sex, ASA classification, and functional status as the most important variables with feature importance of 0.340, 0.130, 0.126, and 0.120, respectively. Average age of patients going to facility was 76 years, while average age of patients going home was 68 years. 78.1% of patients going to facility were women, while 52.7% of patients going home were. Among patients with nonhome discharge, 80.3% had ASA scores of 3 or 4, while patients going home had 54% of patients with ASA scores 3 or 4. 10.5% of patients going to facility were considered of partially/totally dependent functional status, whereas 1.3% of patients going home were considered partially or totally dependent (P value < .05 for all). Conclusion: Of various algorithms, random forest best predicted discharge destination following TSA. When using random forest to predict nonhome discharge after TSA, age, gender, ASA scores, and functional status were the most important variables. Two patient groups (home discharge, nonhome discharge) were significantly different when it came to age, gender distribution, ASA scores, and functional status.

Keywords