Development and validation of machine learning models based on stacked generalization to predict psychosocial maladjustment in patients with acute myocardial infarction.
{"title":"Development and validation of machine learning models based on stacked generalization to predict psychosocial maladjustment in patients with acute myocardial infarction.","authors":"Yan-Feng Wang, Xiao-Han Li, Xin-Yi Zhou, Qi-Qi Ke, Hua-Long Ma, Zi-Han Li, Yi-Shang Zhuo, Jia-Yu Liu, Xian-Liang Liu, Qiao-Hong Yang","doi":"10.1186/s12888-025-06549-1","DOIUrl":null,"url":null,"abstract":"<p><strong>Background: </strong>Psychosocial maladjustment threatens the recovery of patients with acute myocardial infarction (AMI), and early identification of patients with psychosocial maladjustment may facilitate provision of reference to targeted interventions. The aims of this study were to: (1) identify key factors influencing patient psychosocial maladjustment, and (2) develop a machine learning predictive model based on Stacked Generalization.</p><p><strong>Methods: </strong>Young and middle-aged patients with AMI (n = 734) were recruited from two tertiary hospitals (Center I and Center II) in Guangdong Province. Sociodemographic Characteristics, Perceived Stress Scale, Fear of Progression Questionnaire-Short Form, and Social Support Rating Scale data were collected before discharge, and psychosocial adjustment assessed one month after discharge using the Psychosocial Adjustment to Illness Scale. Six machine learning methods were trained on Center I to analyze the collected data and build a predictive model. Stacked Generalization was adopted to ensemble the models and build a final predictive model. Key factors and their contributions to the model were determined using SHapley Additive exPlanations (SHAP).</p><p><strong>Results: </strong>One month after discharge, psychosocial maladjustment incidence rates in Centers I and II were 59.2% and 58.3%, respectively. Eight key predictors of psychosocial adjustment were selected: employment status, exercise habits, diabetes, number of vascular lesions, chest tightness or chest pain, perceived stress, fear of disease progression, and social support. In the internal validation, Support Vector Classification (SVC) performed better in terms of Brier score, sensitivity, and negative predictive value; Decision Tree (DT) performed better in calibration slope, specificity, and precision; while Random Forest (RF) performed better in terms of area under the curve (AUC), Youden, and accuracy values. An LDS-R model stacked by SVC, logistic regression, DT, and RF, achieved the best comprehensive performance and generalization error, with accuracy = 0.834, AUC = 0.909, precision = 0.855, and calibration slope = 1.066 in external validation, indicating that the model is robust and the most suitable for promotion. SHAP provided insights into the model's predictions.</p><p><strong>Conclusion: </strong>The LDS-R model is a practical tool for identifying patients at high risk for psychosocial maladjustment before discharge. Our identification of significant factors influencing psychosocial maladjustment may inform future development of interventions.</p>","PeriodicalId":9029,"journal":{"name":"BMC Psychiatry","volume":"25 1","pages":"152"},"PeriodicalIF":3.4000,"publicationDate":"2025-02-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"BMC Psychiatry","FirstCategoryId":"3","ListUrlMain":"https://doi.org/10.1186/s12888-025-06549-1","RegionNum":2,"RegionCategory":"医学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"PSYCHIATRY","Score":null,"Total":0}
引用次数: 0
Abstract
Background: Psychosocial maladjustment threatens the recovery of patients with acute myocardial infarction (AMI), and early identification of patients with psychosocial maladjustment may facilitate provision of reference to targeted interventions. The aims of this study were to: (1) identify key factors influencing patient psychosocial maladjustment, and (2) develop a machine learning predictive model based on Stacked Generalization.
Methods: Young and middle-aged patients with AMI (n = 734) were recruited from two tertiary hospitals (Center I and Center II) in Guangdong Province. Sociodemographic Characteristics, Perceived Stress Scale, Fear of Progression Questionnaire-Short Form, and Social Support Rating Scale data were collected before discharge, and psychosocial adjustment assessed one month after discharge using the Psychosocial Adjustment to Illness Scale. Six machine learning methods were trained on Center I to analyze the collected data and build a predictive model. Stacked Generalization was adopted to ensemble the models and build a final predictive model. Key factors and their contributions to the model were determined using SHapley Additive exPlanations (SHAP).
Results: One month after discharge, psychosocial maladjustment incidence rates in Centers I and II were 59.2% and 58.3%, respectively. Eight key predictors of psychosocial adjustment were selected: employment status, exercise habits, diabetes, number of vascular lesions, chest tightness or chest pain, perceived stress, fear of disease progression, and social support. In the internal validation, Support Vector Classification (SVC) performed better in terms of Brier score, sensitivity, and negative predictive value; Decision Tree (DT) performed better in calibration slope, specificity, and precision; while Random Forest (RF) performed better in terms of area under the curve (AUC), Youden, and accuracy values. An LDS-R model stacked by SVC, logistic regression, DT, and RF, achieved the best comprehensive performance and generalization error, with accuracy = 0.834, AUC = 0.909, precision = 0.855, and calibration slope = 1.066 in external validation, indicating that the model is robust and the most suitable for promotion. SHAP provided insights into the model's predictions.
Conclusion: The LDS-R model is a practical tool for identifying patients at high risk for psychosocial maladjustment before discharge. Our identification of significant factors influencing psychosocial maladjustment may inform future development of interventions.
期刊介绍:
BMC Psychiatry is an open access, peer-reviewed journal that considers articles on all aspects of the prevention, diagnosis and management of psychiatric disorders, as well as related molecular genetics, pathophysiology, and epidemiology.