文献分享: 机器学习模型预测机械通气患者(数据库来源MIMIC-III)

Machine Learning Prediction Models for Mechanically Ventilated Patients: Analyses of the MIMIC-III Database

关注微信公众号【科研收录】,回复 “mimic3 Ventilated” 获取相关文献

 

摘要

实验目的:

ICU患者机械通气死亡率较高。评分标准众多,因此在诸多评分的基础上,添加其他变量,生成新的评分系统。

数据来源:

Medical Information Mart for Intensive Care (MIMIC-III) database。

模型选择:

K临近法(KNN), 逻辑回归, bagging, 决策树, 随机森林, Extreme Gradient Boosting (XGBoost), and 神经网络。

70%的测试集,30%的验证集;calibration plots(校准图)和Areas under the receiver operating characteristic curves(受试者曲线下面积)评估模型。

 

Methods

 

纳入标准:

Adult ICU patients treated with invasive mechanical ventilation during ICU stay were included.

排除标准:

Subjects aged younger than 18 years or older than 90 years or who lack information on the outcome measure were excluded.

 

疾病的定义:

 

The definition of the medical condition was referred to the ICD-9 code (13) and derived from the GitHub (GitHub - MIT-LCP/mimic-code: MIMIC Code Repository: Code shared by the research community for the MIMIC family of databases).

 

参考不同的评分:

The severity of respiratory, coagulation, liver, cardiovascular, central nervous system, or renal failure referred to the SOFA score of the specific organ (scores 0–4). The first day indicates the first 24 h of ICU admission. The SOFA, SAPS II, and OASIS scores refer to the first scores after ICU admission. After the extraction of the data, subjects who met the exclusion criteria were excluded.

统计方式:

 

该研究分为存活组和死亡组,两组间数据的统计方法,经典的连续性t检验,计数资料卡方检验.

 

The continuous variables are presented as the median and interquartile range (IQR) and compared using the t-test. The counting data are presented as numbers and percentages and compared using the chisquare test.

 

机器学习

 

K临近法(KNN), 逻辑回归, bagging, 决策树, 随机森林, 梯度增加 (XGBoost), and 神经网络。

 

70%的测试集,30%的验证集;calibration plots(校准图)和Areas under the receiver operating characteristic curves(受试者曲线下面积)评估模型。

 

Results

七个模型的受试者工作特征(ROC)曲线。 KNN,k-近邻; XGBoost,极端梯度提升。

The KNN, logistic regression, decision tree, random forest, neural network, bagging, and XGBoost models were established with the training set; the AUCs of the testing set were 0.806, 0.818, 0.743, 0.819, 0.780, 0.803, and 0.821, respectively (Figure 2).

图 3. 七个模型的校准图。 KNN,k-近邻; XGBoost,极端梯度提升。

The calibration curves of all the models, except that of the neural network, performed well. Among the seven models, XGBoost performed best, with the highest receiver operating characteristic (ROC) and the best calibration curve (Figure 3).

 

横坐标为预测的事件发生率(Predicted Probablity),纵坐标是观察到的实际事件发生率(Actual Rate),范围均为0到1,可以理解为事件发生率(百分比)。对角线的虚线是参考线,即预测值=实际值的情况。

 

最理想的情况下, 校准曲线是一条对角线(预测概率等于经验概率),校准曲线不一定会单调递增, 比如, 当分桶的数量比较多时或者分类器比较弱时,通常情况下, Logistic Regression的校准曲线非常贴近于对角线,缺乏自信的模型的校准曲线是sigmoid形的。

 

The significance of the predictors in the XGBoost model is presented in Figure 4. In the SHAP methodology, the top five predictors were age, respiratory dysfunction, SAPS II score, maximum hemoglobin, and minimum lactate (the importance values were 0.410, 0.309, 0.302, 0.209, and 0.194, respectively).

图 4. XGBoost 模型中预测变量的重要性。

  • CHF,慢性心力衰竭;
  • Diabetes_complicated,糖尿病并发症;
  • Diabetes_uncomplicated,无并发症的糖尿病;
  • Diasbp,舒张压; 高血压_复杂性,高血压合并并发症;
  • Hypertension_uncomplicated,高血压无并发症;
  • OASIS,牛津急性疾病严重程度评分;
  • Organ_failure,任何器官衰竭;
  • Perivasc,血管周围疾病;
  • SAPS II,简化急性生理学评分 II;
  • s心血管,严重心血管衰竭;
  • sCNS,严重中枢神经系统衰竭;
  • s凝血,严重凝血失败;
  • SOFA,序贯器官衰竭评估;
  • s 肾脏,严重肾功能衰竭;
  • s呼吸,严重呼吸衰竭;
  • Sysbp,收缩压;
  • Tempc,温度;
  • WBC,白细胞。

表 2. XGBoost 模型的混淆矩阵。

The confusion matrix of the XGBoost model is presented in Table 2. The SHAP plot and a decision tree of the XGBoost model are in the Supplementary Material.

 

关于混淆矩阵

 

混淆矩阵的每一列代表了预测类别,每一列的总数表示预测为该类别的数据的数目;

 

每一行代表了数据的真实归属类别,每一行的数据总数表示该类别的数据实例的数目;每一列中的数值表示真实数据被预测为该类的数目。

Limitations

 

Firstly, our models were retrospectively established based on a single-center database.

 

Secondly, there were missing data in our research.

 

Thirdly, external validation has not been employed in this study

 

Fourthly, our study only focused on hospital mortality, while other important outcome measures such as ventilator-free days within 28 days and long-term mortalities still needed further investigation.

 

Lastly, we did not exclude patients who were withdrawn from care, which may also provide bias.

 

 

 

Conclusion

 

Our results suggest that age, respiratory dysfunction, SAPS II score, maximum hemoglobin, and minimum lactate might be closely associated with hospital mortality in mechanically ventilated ICU patients. The XGBoost model performs better than the KNN, logistic regression, bagging, decision tree, random forest, and neural network models in our study. Further external validations are needed to test the generalization of our models and predictors.

 

 

 

补充

 

XGBoost是一个优化的分布式梯度增强库,旨在实现高效,灵活和便携,是梯度提升法的进阶版。

 

comments:

 

该文的研究流程可总结为以下几个部分:

(1)建立多种机器学习模型;

(2)模型比较:根据ROC/校准曲线选取最优模型XGBoost;

(3)优化XGBoost超参数,确定最终XGBoost;

(4)打印模型变量重要性和混淆矩阵;

(5)解释模型(SHAP);

(6)模型可视化(绘制决策树)。

 

针对这篇文章个人认为可以从以下几个方面进行优化(不一定正确,仅供参考):

(1)增加临床决策曲线评估模型的临床收益;

(2)最终建立的模型涉及到的变量众多,可以根据一定原则选择部分重要变量构建一个简化的模型,一方面使模型更符合临床意义,另一方面丰富文章的内容;

(3)机器学习模型的可视化最好采用网页,也看到有文章利用列线图可视化XGBoost,效果可能比决策树更直观;

(4)利用e-ICU数据库进行外部验证。

 

mimic数据库使用介绍:

MIMIC-IV,重症医学数据库介绍和使用说明

MIMIC数据库下载权限申请保姆级教程(上)

MIMIC数据库下载权限申请保姆级教程(下)

CITI 课程考试补充答案

​CITI 课程考试补充答案(二)

 

MIMIC数据库安装保姆级教程(上)

MIMIC数据库安装保姆级教程(下)

安装常见问题(一)

安装常见问题(二)

MIMIC-IV数据库安装常见问题(三)

MIMIC-IV数据库安装常见问题(四)

 

MIMIC数据库,常用查询指令SQL基础(一)

MIMIC数据库,常用查询SQL基础(二)

MIMIC数据库提取教程-提取某种疾病下的实验室指标

MIMIC数据库提取教程-提取某种疾病下的患者人口统计学指标

MIMIC数据库官方函数的安装与使用

手把手教会你认识跟安装MIMIC-IV物化视图

【重要】 MIMIC数据集直接下载!

Python连接MIMIC-IV数据库并图表可视化

MIMIC-IV数据库衍生表格mimic_derived配置和使用

MIMIC-IV 数据查询加速教程

MIMIC数据提取教程 - 如何提取外科患者信息

MIMIC数据提取教程 - 提取患者首次入ICU数据

MIMIC数据提取教程 - 官方提供的时间函数(一)

MIMIC-IV数据分析 - 使用Python进行心脏病案例分析

MIMIC-IV数据分析 - 使用Python进行心脏病案例分析(二)

MIMIC-IV数据分析 - 使用R语言探索icustay_detail视图

MIMIC数据提取教程 - 如何提取患者入ICU后第一个WBC和SpO2值

MIMIC数据提取教程 - 如何提取患有肥胖症疾病的患者?

MIMIC数据提取教程 - 提取入住ICU第一天生命体征(血氧饱和度、血压、呼吸、体温)

MIMIC数据提取教程 - 提取血管紧张素受体阻滞剂(ARB)药物

MIMIC-IV数据库,如何提取器官衰竭AKI的尿量指标?

MIMIC-IV-ED适合科研小白的安装方法(提供数据集下载)

MIMIC-IV-ED数据集介绍

MIMIC数据库, 使用Python研究万古霉素的剂量 (一)

MIMIC-IV数据库, 如何提取患者ICU生存时间?

MIMIC-IV官方视图解析 - cardiac_marker心脏标记表

MIMIC-IV官方视图解析-序贯器官衰竭评分(SOFA)

MIMIC-IV官方视图解析-格拉斯哥昏迷评分(GCS)