Machine learning approach to predicting persistent opioid use following lower extremity joint arthroplasty

Reg Anesth Pain Med. 2022 May;47(5):313-319. doi: 10.1136/rapm-2021-103299. Epub 2022 Feb 3.

Abstract

Background: The objective of this study is to develop predictive models for persistent opioid use following lower extremity joint arthroplasty and determine if ensemble learning and an oversampling technique may improve model performance.

Methods: We compared various predictive models to identify at-risk patients for persistent postoperative opioid use using various preoperative, intraoperative, and postoperative data, including surgical procedure, patient demographics/characteristics, past surgical history, opioid use history, comorbidities, lifestyle habits, anesthesia details, and postoperative hospital course. Six classification models were evaluated: logistic regression, random forest classifier, simple-feedforward neural network, balanced random forest classifier, balanced bagging classifier, and support vector classifier. Performance with Synthetic Minority Oversampling Technique (SMOTE) was also evaluated. Repeated stratified k-fold cross-validation was implemented to calculate F1-scores and area under the receiver operating characteristics curve (AUC).

Results: There were 1042 patients undergoing elective knee or hip arthroplasty in which 242 (23.2%) reported persistent opioid use. Without SMOTE, the logistic regression model has an F1 score of 0.47 and an AUC of 0.79. All ensemble methods performed better, with the balanced bagging classifier having an F1 score of 0.80 and an AUC of 0.94. SMOTE improved performance of all models based on F1 score. Specifically, performance of the balanced bagging classifier improved to an F1 score of 0.84 and an AUC of 0.96. The features with the highest importance in the balanced bagging model were postoperative day 1 opioid use, body mass index, age, preoperative opioid use, prescribed opioids at discharge, and hospital length of stay.

Conclusions: Ensemble learning can dramatically improve predictive models for persistent opioid use. Accurate and early identification of high-risk patients can play a role in clinical decision making and early optimization with personalized interventions.

Keywords: chronic pain; pain; pain management; postoperative.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Analgesics, Opioid / adverse effects
  • Arthroplasty, Replacement, Hip* / adverse effects
  • Arthroplasty, Replacement, Knee* / adverse effects
  • Humans
  • Lower Extremity
  • Machine Learning
  • Opioid-Related Disorders* / diagnosis
  • Opioid-Related Disorders* / epidemiology
  • Opioid-Related Disorders* / prevention & control

Substances

  • Analgesics, Opioid