Machine learning algorithms to predict risk of postoperative pneumonia in elderly with hip fracture

J Orthop Surg Res. 2023 Aug 5;18(1):571. doi: 10.1186/s13018-023-04049-0.

Abstract

Background: Hip fracture (HF) is one of the most common fractures in the elderly and is significantly associated with high mortality and unfavorable prognosis. Postoperative pneumonia (POP), the most common postoperative complication of HF, can seriously affect patient prognosis and increase the burden on the healthcare system. The aim of this study was to develop machine learning models for identifying elderly patients at high risk of pneumonia after hip fracture surgery.

Methods: From May 2016 to November 2022, patients admitted to a single central hospital for HF served as the study population. We extracted data that could be collected within 24 h of patient admission. The dataset was divided into training and validation sets according to 70:30. Based on the screened risk factors, prediction models were developed using seven machine learning algorithms, namely CART, GBM, KNN, LR, NNet, RF, and XGBoost, and their performance was evaluated.

Results: Eight hundred five patients were finally included in the analysis and 75 (9.3%) patients suffered from POP. Age, CI, COPD, WBC, HB, GLU, STB, GLOB, Ka+ which are used as features to build machine learning models. By evaluating the model's AUC value, accuracy, sensitivity, specificity, Kappa value, MCC value, Brier score value, calibration curve, and DCA curve, the model constructed by XGBoost algorithm has the best and near-perfect performance.

Conclusion: The machine learning model we created is ideal for detecting elderly patients at high risk of POP after HF at an early stage.

Keywords: Hip fractures; Machine learning; Postoperative pneumonia; Predictive models; Risk factors.

MeSH terms

  • Aged
  • Algorithms
  • Calibration
  • Hip Fractures* / surgery
  • Humans
  • Machine Learning
  • Pneumonia* / diagnosis
  • Pneumonia* / etiology