Background: Chronic postsurgical pain is common, affecting more than 30% of the world’s population, with patients undergoing open-heart surgery being a high-risk group for chronic postsurgical pain.
Methods: We retrospectively analyzed the clinical data of 830 patients who underwent open-heart surgery, screened the key variables of chronic postsurgical pain using multifactorial logistic regression, and constructed and compared eight machine-learning models. Finally, the models were interpreted using the SHapley Additive exPlanations package.
Results: Nine key characteristics were screened: age, diabetes, coronary artery disease, length of hospitalization, history of preoperative pain, number of pain medications required (>3), postoperative incision infection, length of surgery, and use of remifentanil. Among the eight algorithms, the logistic regression algorithm exhibited the best performance. Following reconstruction with the logistic regression algorithm, the areas under the curve for the training and validation sets were 0.846 and 0.836, respectively. The algorithm also demonstrated strong performance on the test set (area under the curve=0.825, accuracy=76.8%, sensitivity=79.2%, F1 score=0.736). The validation set’s area under the curve was within 10% of that of the test set, indicating a well-fitted model.
Conclusions: A machine-learning model, utilizing accessible clinical data, can accurately predict chronic postsurgical pain in open-heart surgery patients at an early stage, which helps to accurately identify and improve their prognosis.