| 注册
首页|期刊导航|实用心脑肺血管病杂志|基于机器学习算法的社区获得性肺炎患者住院时间延长风险预测模型构建与验证

基于机器学习算法的社区获得性肺炎患者住院时间延长风险预测模型构建与验证

刘杰 李慧 杨翠 杨涛 仝延萍

实用心脑肺血管病杂志2026,Vol.34Issue(9):34-39,50,7.
✕
实用心脑肺血管病杂志2026,Vol.34Issue(9):34-39,50,7.DOI:10.12114/j.issn.1008-5971.2026.00.191

基于机器学习算法的社区获得性肺炎患者住院时间延长风险预测模型构建与验证

Construction and Verification of Risk Prediction Model for Prolonged Length of Stay in Patients with Community-Acquired Pneumonia Based on Machine Learning Algorithm

刘杰 1李慧 1杨翠 1杨涛 2仝延萍2

作者信息

  • 1. 100101 北京市第一中西医结合医院呼吸科
  • 2. 100070 北京市,首都医科大学附属北京天坛医院中医科
  • 折叠

摘要

Abstract

Objective To construct and validate the risk prediction models for prolonged length of stay in patients with community-acquired pneumonia(CAP)using machine learning algorithm,and screen the best model.Methods A total of 301 patients with CAP who were hospitalized in the Department of Respiratory Medicine of Beijing First Hospital of Integrated Chinese and Western Medicine from March 2024 to May 2025 were retrospectively selected as the study subjects.The patients were divided into the prolonged length of stay group(≥8 d,164 cases)and the non-prolonged length of stay group(<8 d,137 cases)according to the length of stay.The clinical data of the patients were collected.LASSO regression analysis was used to screen characteristic variables.Random forest(RF),support vector machine(SVM)and Logistic regression(LR)were used to construct the risk prediction models for prolonged length of stay in patients with CAP.The performance,fitting degree and clinical applicability of each model were evaluated.At the same time,the 10-fold cross-validation method with 10 replicates was used for internal verification again,the best model was screened,and the SHapley Additive exPlanations(SHAP)method was used to visualize the best model.Results The results of LASSO regression analysis showed that age,history of diabetes,history of hypertension,TCM syndrome type,neutrophil/lymphocyte ratio(NLR)and serum amyloid A(SAA)might be the influencing factors of prolonged length of stay in CAP patients(P<0.05).Based on the above influencing factors,RF,SVM,and LR were used to construct the risk prediction models for prolonged length of stay in CAP patients.The performance analysis results of each model showed that in model construction and 10-fold cross-validation,the RF model had the highest AUC,accuracy and F1 score.In the model construction,the sensitivity of RF model was the highest,the specificity of LR model was the highest,and the Brier scores of SVM model and LR model were higher than those of RF model.In the 10-fold cross-validation,the LR model had the highest sensitivity and Brier score,and the SVM model had the highest specificity.The results of Hosmer-Lemeshow goodness-of-fit test showed that RF and SVM models had better fitting degree in model construction(both P values were>0.05),but poor fitting degree in 10-fold cross-validation(both P values were<0.05);the fitting degree of LR model in model construction and 10-fold cross validation was good(both P values were>0.05).The results of the decision curve analysis showed that in the model construction,when the threshold probabilities were 0-0.92,0-0.93,and 0-0.92,respectively,the net benefit rates of the RF,SVM,and LR models were>0;in the 10-fold cross-validation,when the threshold probabilities were 0-0.92,0-0.88,and 0-0.89,respectively,the net benefit rates of RF,SVM,and LR models were>0.In summary,the RF model was the best model.The results of SHAP visualization showed that in the RF model,the characteristic variables with average|SHAP value|from high to low were age(0.197),NLR(0.092),SAA(0.063),TCM syndrome type(0.055),history of hypertension(0.041),and history of diabetes(0.032);age,NLR,SAA,phlegm-heat obstructing lung syndrome in TCM syndrome type,history of hypertension,and history of diabetes had a positive contribution to the risk of prolonged length of stay in CAP patients.Conclusion Based on age,diabetes history,hypertension history,TCM syndrome type,NLR and SAA,this study uses RF,SVM and LR to construct the risk prediction models for prolonged length of stay in CAP patients,among which RF model is the best model.

关键词

社区获得性肺炎/住院时间/机器学习算法/预测

Key words

Community-acquired pneumonia/Length of stay/Machine learning algorithms/Forecasting

分类

医药卫生

引用本文复制引用

刘杰,李慧,杨翠,杨涛,仝延萍..基于机器学习算法的社区获得性肺炎患者住院时间延长风险预测模型构建与验证[J].实用心脑肺血管病杂志,2026,34(9):34-39,50,7.

基金项目

国家自然科学基金资助项目(81973599) (81973599)

北京市第一中西医结合医院传承与创新科研项目(ZDZK2024-07) (ZDZK2024-07)

第六批北京市级中医药专家学术经验继承工作项目(京中医科字[2021]169号) (京中医科字[2021]169号)

北京市属医院科研培育计划项目(PZ2021006) (PZ2021006)

实用心脑肺血管病杂志

1008-5971

访问量0
|
下载量0
段落导航相关论文