Search for a command to run...
Objectives This study aims to systematically analyze the risk factors for to carbapenem-resistant Klebsiella pneumoniae (CRKP) infection and its impact on patient outcomes using the XGBoost machine learning algorithm, and to explore its resistance characteristics, thereby providing a basis for early clinical identification of high-risk patients and optimizing treatment strategies. Methods A single-center retrospective cohort study was conducted, including 491 patients with Klebsiella pneumoniae infections between January and December 2023. Based on drug susceptibility results, patients were divided into a resistant group (n = 187) and a susceptible group (n = 304). Univariate and multivariate logistic regression analyses were used to identify independent risk factors, and both logistic regression and XGBoost machine learning prediction models were constructed to evaluate their predictive performance and clinical applicability. Results Patients in the resistant group were older, had worse inflammatory and coagulation indicators, and exhibited significantly higher mortality rates from 30 to 180 days compared to the susceptible group ( P < 0.01). Multivariate logistic regression identified age, hemoglobin, lymphocyte percentage, prothrombin time, and creatinine as independent risk factors for CRKP infection, with an area under the curve (AUC) of 0.878. The XGBoost model further identified age, albumin, D-dimer, creatinine, and uric acid as key variables, with an AUC of 0.978, demonstrating superior predictive performance. Additionally, multivariate logistic regression determined age and mean platelet volume as independent risk factors for 90-day mortality in CRKP-infected patients. Based on the XGBoost algorithm, a prognostic prediction model was constructed, incorporating five key variables: age, D-dimer, creatine kinase, procalcitonin, and mean platelet volume. Drug susceptibility analysis revealed high resistance rates of CRKP to most antibiotics, with partial sensitivity only to amikacin, chloramphenicol, and cotrimoxazole. Conclusion The XGBoost machine learning-based prediction model effectively identifies the risk of CRKP infection and poor prognosis using five key variables (age, albumin, D-dimer, creatinine, and uric acid) for infection risk, demonstrating high clinical utility and providing data support for early intervention and individualized treatment.