運用機器學習預測醫療照護相關血流感染個案風險因子
Using Machine Learning Techniques to Predict Risk Factors for Healthcare-Associated Bloodstream Infections
摘要
研究背景與目的:醫療照護相關血流感染(Healthcare-Associated Bloodstream Infection, HA-BSI)為住院病人常見且疾病負擔沉重之感染類型,與住院天數延長、醫療成本增加及死亡風險上升密切相關。本研究旨在運用機器學習技術建構HA-BSI臨床預測模型,以探討最佳預測效能之演算法、識別主要風險因子,並評估其於臨床實務之應用潛力。
研究方法:本研究採回溯性病例對照研究設計,以台灣北部某醫學中心2017年1月至2024年12月之住院病歷資料為來源,最終納入717名有效樣本(感染組405名、非感染組312名),依時間序列切分為兩部分:訓練集共641筆(2017年1月至2024年6月),用於模型訓練與內部驗證;時間序列驗證集共76筆(2024年7月至12月),作為獨立驗證之用。研究初始納入涵蓋六大面向之41項臨床變項,導入「邏輯斯迴歸」、「決策樹」、「隨機森林」及「極限梯度提升」四種監督式學習演算法,透過置換重要性結合多模型一致性策略進行特徵選取,並以「接收者操作特徵曲線下面積」、「準確率」、「精確率」、「召回率」、「F1分數」及「精確率-召回率曲線下面積」等六大指標評估模型效能。
研究結果:在模型訓練與內部驗證中,「隨機森林」之接收者操作特徵曲線下面積達 0.7981,於時間序列驗證中,「極限梯度提升」之精確率-召回率曲線下面積達 0.8648,召回率為 0.8000,整體表現略優於「隨機森林」,故選定「極限梯度提升」為最終推薦模型。置換重要性分析結果顯示,感染前住院天數(weight≈0.154)為最重要之預測因子,其次為人工血管 Port-A(weight≈0.110)與中心靜脈導管(weight≈0.091),血小板(weight≈0.060)、單核球(weight≈0.058)、嗜中性球(weight≈0.046)、平均紅血球血紅素濃度(weight≈0.042)、血紅素(weight≈0.038)、白血球總數(weight≈0.036)及肌酸酐(weight≈0.031)亦具一定預測貢獻,最終確立10項核心特徵。
結論:本研究證實機器學習方法可有效整合來自不同面向的臨床變項,建構具臨床應用潛力之HA-BSI預測模型。所識別之10項預測因子均為臨床常規收集之資料,無需額外檢驗,具備整合至臨床感染預防流程之可行性,可輔助醫護人員及早識別高風險個案,提升病人安全。惟本研究為單一醫學中心之回溯性資料分析,樣本規模有限,且模型之校正度與臨床實用性尚未進行系統性評估;未來研究宜納入多中心前瞻性驗證,並強化校正度分析與臨床實用性評估,以確認模型於實務推廣之可行性。
研究方法:本研究採回溯性病例對照研究設計,以台灣北部某醫學中心2017年1月至2024年12月之住院病歷資料為來源,最終納入717名有效樣本(感染組405名、非感染組312名),依時間序列切分為兩部分:訓練集共641筆(2017年1月至2024年6月),用於模型訓練與內部驗證;時間序列驗證集共76筆(2024年7月至12月),作為獨立驗證之用。研究初始納入涵蓋六大面向之41項臨床變項,導入「邏輯斯迴歸」、「決策樹」、「隨機森林」及「極限梯度提升」四種監督式學習演算法,透過置換重要性結合多模型一致性策略進行特徵選取,並以「接收者操作特徵曲線下面積」、「準確率」、「精確率」、「召回率」、「F1分數」及「精確率-召回率曲線下面積」等六大指標評估模型效能。
研究結果:在模型訓練與內部驗證中,「隨機森林」之接收者操作特徵曲線下面積達 0.7981,於時間序列驗證中,「極限梯度提升」之精確率-召回率曲線下面積達 0.8648,召回率為 0.8000,整體表現略優於「隨機森林」,故選定「極限梯度提升」為最終推薦模型。置換重要性分析結果顯示,感染前住院天數(weight≈0.154)為最重要之預測因子,其次為人工血管 Port-A(weight≈0.110)與中心靜脈導管(weight≈0.091),血小板(weight≈0.060)、單核球(weight≈0.058)、嗜中性球(weight≈0.046)、平均紅血球血紅素濃度(weight≈0.042)、血紅素(weight≈0.038)、白血球總數(weight≈0.036)及肌酸酐(weight≈0.031)亦具一定預測貢獻,最終確立10項核心特徵。
結論:本研究證實機器學習方法可有效整合來自不同面向的臨床變項,建構具臨床應用潛力之HA-BSI預測模型。所識別之10項預測因子均為臨床常規收集之資料,無需額外檢驗,具備整合至臨床感染預防流程之可行性,可輔助醫護人員及早識別高風險個案,提升病人安全。惟本研究為單一醫學中心之回溯性資料分析,樣本規模有限,且模型之校正度與臨床實用性尚未進行系統性評估;未來研究宜納入多中心前瞻性驗證,並強化校正度分析與臨床實用性評估,以確認模型於實務推廣之可行性。
Background and Objectives:Healthcare-associated bloodstream infection (HA-BSI) is a significant cause of morbidity, mortality, and increased healthcare costs among hospitalized patients. This study aimed to develop and validate machine learning-based clinical prediction models for HA-BSI, identify key risk factors, and evaluate their potential for clinical application.
Methods:This study employed a retrospective case-control design, using inpatient medical record data from a medical center in northern Taiwan between January 2017 and December 2024. A total of 717 valid samples were included (405 in the infection group and 312 in the non-infection group). The dataset was divided chronologically into two subsets: a training set of 641 records (January 2017 to June 2024) used for model training and internal validation, and a temporal validation set of 76 records (July to December 2024) used for independent validation. A total of 41 clinical variables spanning six major domains were initially included. Four supervised learning algorithms—logistic regression (LR), decision tree (DT), random forest (RF), and extreme gradient boosting (XGBoost)-were applied, with feature selection performed through permutation importance combined with a multi-model consensus strategy. Model performance was evaluated using six metrics: area under the receiver operating characteristic curve (AUROC), accuracy, precision, recall, F1-score, and precision-recall area under the curve (PR AUC).
Results:The model training and internal validation showed that RF achieved the highest overall performance (AUROC = 0.7981). In the time-series validation showed that XGBoost achieved an AUPRC (Precision-Recall AUC) of 0.8648 and a Recall of 0.8000, with overall performance slightly superior to that of RF; XGBoost was therefore selected as the final recommended model. Permutation importance analysis identified Pre-Infection Length of Stay (weight ≈ 0.154) as the most influential predictor, followed by implanted Port-A catheter (weight ≈ 0.110) and central venous catheter (CVC) (weight ≈ 0.091). Hematological indicators, including platelet count (weight ≈ 0.060), monocyte count (weight ≈ 0.058), neutrophil count (weight ≈ 0.046), mean corpuscular hemoglobin concentration (MCHC, weight ≈ 0.042), hemoglobin (weight ≈ 0.038), and white blood cell count (WBC, weight ≈ 0.036), as well as creatinine (weight ≈ 0.031), also contributed to prediction, yielding a final feature set of 10 variables.
Conclusion:This study demonstrates that machine learning methods can effectively integrate clinical variables from multiple domains to construct a predictive model for HA-BSI with potential clinical applicability. The 10 identified predictors are all routinely collected clinical data that require no additional testing, supporting the feasibility of integrating this model into clinical infection prevention workflows to assist healthcare providers in the early identification of high-risk cases and thereby enhance patient safety. However, this study was based on retrospective data from a single medical center with a limited sample size, and the model's calibration and clinical utility have not yet been systematically evaluated. Future research should incorporate multicenter prospective validation and strengthen calibration analysis and clinical utility assessment to confirm the model's feasibility for practical implementation.
Methods:This study employed a retrospective case-control design, using inpatient medical record data from a medical center in northern Taiwan between January 2017 and December 2024. A total of 717 valid samples were included (405 in the infection group and 312 in the non-infection group). The dataset was divided chronologically into two subsets: a training set of 641 records (January 2017 to June 2024) used for model training and internal validation, and a temporal validation set of 76 records (July to December 2024) used for independent validation. A total of 41 clinical variables spanning six major domains were initially included. Four supervised learning algorithms—logistic regression (LR), decision tree (DT), random forest (RF), and extreme gradient boosting (XGBoost)-were applied, with feature selection performed through permutation importance combined with a multi-model consensus strategy. Model performance was evaluated using six metrics: area under the receiver operating characteristic curve (AUROC), accuracy, precision, recall, F1-score, and precision-recall area under the curve (PR AUC).
Results:The model training and internal validation showed that RF achieved the highest overall performance (AUROC = 0.7981). In the time-series validation showed that XGBoost achieved an AUPRC (Precision-Recall AUC) of 0.8648 and a Recall of 0.8000, with overall performance slightly superior to that of RF; XGBoost was therefore selected as the final recommended model. Permutation importance analysis identified Pre-Infection Length of Stay (weight ≈ 0.154) as the most influential predictor, followed by implanted Port-A catheter (weight ≈ 0.110) and central venous catheter (CVC) (weight ≈ 0.091). Hematological indicators, including platelet count (weight ≈ 0.060), monocyte count (weight ≈ 0.058), neutrophil count (weight ≈ 0.046), mean corpuscular hemoglobin concentration (MCHC, weight ≈ 0.042), hemoglobin (weight ≈ 0.038), and white blood cell count (WBC, weight ≈ 0.036), as well as creatinine (weight ≈ 0.031), also contributed to prediction, yielding a final feature set of 10 variables.
Conclusion:This study demonstrates that machine learning methods can effectively integrate clinical variables from multiple domains to construct a predictive model for HA-BSI with potential clinical applicability. The 10 identified predictors are all routinely collected clinical data that require no additional testing, supporting the feasibility of integrating this model into clinical infection prevention workflows to assist healthcare providers in the early identification of high-risk cases and thereby enhance patient safety. However, this study was based on retrospective data from a single medical center with a limited sample size, and the model's calibration and clinical utility have not yet been systematically evaluated. Future research should incorporate multicenter prospective validation and strengthen calibration analysis and clinical utility assessment to confirm the model's feasibility for practical implementation.