Univariate analysis
Among a cohort of 425 inpatients with K. pneumoniae infections, 303 patients were identified as having carbapenem-resistant K. pneumoniae (CRKP), while the remaining 122 patients were diagnosed with carbapenem-susceptible K. pneumoniae (CSKP). In our analysis of 425 K. pneumoniae isolates, a diverse range of 70 sequence types (STs) was identified (Fig. 2. A). Notably, ST11 emerged as the most prevalent sequence type, accounting for 207 isolates (48.7%, 95%CI: 43.9–53.6%), followed by ST15, which represented 35 isolates (8.2%, 95%CI: 5.8–11.3%). In addition to sequence types, 46 distinct serotypes were ascertained (Fig. 2. B). Among these, KL64 was the most predominant, present in 144 isolates (33.9%, 95%CI: 29.4–38.6%), followed by KL47, which was observed in 49 isolates (11.5%, 95%CI: 8.7–15.0%). Given the pronounced prevalence of ST11 and KL64, these factors were selected as key risk variables for subsequent modeling exercises. They were included alongside other variables.
A comprehensive distribution of each variable relative to CRKP status is elucidated in Table 1. Variables that demonstrated a p-value less than 0.2 were considered to exhibit statistically significant differences across groups categorized by CRKP status and were consequently retained for subsequent modeling. These significant variables encompassed age, the site of K. pneumoniae isolation, the presence of cancer in the patient, intensive care unit (ICU) admission status, the utilization of catheters within a 90-day post-admission period, and the specific sequence types ST11 and KL64 of the K. pneumoniae strains.
In addition to the analysis focused on carbapenem resistance, outcome data were available for 416 out of the 425 patients within the cohort. Of these, 250 patients succumbed to their illness, representing the poor prognosis, while the remaining 166 patients recovered. In the univariate analysis aimed at identifying determinants associated with patient outcomes, several variables demonstrated statistical significance at a p-value threshold of less than 0.2 (Table 2). These variables included age, residential status, site of K. pneumoniae isolation, infection status, utilization of catheters within a 90-day post-admission period, carbapenem resistance status, and the presence of the ST11 sequence type.
Table 1
Univariable analysis of risk factors for acquiring CRKP
Variables | Groups | CRKP | Total (N = 425) | Percentage of Positivity (95%CI) | Odds Ratio (95%CI) | Chi-square p-value |
Gender | Male | 214 | 297 | 72.1 (66.6–77.1) | 1.1 (0.7–1.8) | 0.598 |
| Female | 89 | 128 | 69.5 (60.8–77.4) | 1.0 | |
Age | > 60 | 166 | 224 | 74.1 (67.9–79.7) | 1.3 (0.9-2.0) | 0.176* |
| 0 ≤ 60 | 137 | 201 | 68.2 (61.2–74.5) | 1.0 | |
Residence | City | 193 | 269 | 71.7 (66.0–77.0) | 1.1 (0.7–1.7) | 0.718 |
| Village | 103 | 147 | 70.1 (62.0-77.3) | 1.0 | |
| Missing | - | 9 | - | - | - |
Isolation Position | Blood | 128 | 228 | 56.1 (49.4–62.7) | 0.2 (0.1–0.3) | < 0.001* |
| Intestine | 175 | 197 | 88.8 (83.6–92.9) | 1.0 | |
Infection | Yes | 97 | 131 | 74.0 (65.7–81.3) | 1.2 (0.8–1.9) | 0.403 |
| No | 206 | 294 | 70.1 (64.5–75.2) | 1.0 | |
Cancer | Yes | 37 | 62 | 59.7 (46.4–71.9) | 0.5 (0.3–0.9) | 0.029* |
| No | 266 | 363 | 73.3 (68.4–77.8) | 1.0 | |
ICU | Yes | 211 | 249 | 84.7 (79.7–89.0) | 5.0 (3.1–7.9) | < 0.001* |
| No | 88 | 167 | 52.7 (44.8–60.5) | 1.0 | |
| Missing | - | 9 | - | - | - |
Catheter < 90 days | Yes | 276 | 356 | 77.5 (72.8–81.8) | 5.2 (2.9–9.2) | < 0.001* |
| No | 24 | 60 | 40.0 (27.6–53.5) | 1.0 | |
| Missing | - | 9 | - | - | - |
ST11 | Yes | 204 | 207 | 98.6 (95.8–99.7) | 81.7 (25.4-263.5) | < 0.001* |
| Others | 99 | 218 | 45.4 (38.7–52.3) | 1.0 | |
KL64 | Yes | 139 | 144 | 96.5 (92.1–98.9) | 19.8 (7.9–49.9) | < 0.001* |
| Others | 164 | 281 | 58.4 (53.4–64.2) | 1.0 | |
*Variables with p-value < 0.2 were kept for further analyses.
Table 2
Univariable analysis of risk factors for poor prognosis
Variables | Groups | Poor prognosis | Total (N = 416) | Percentage of Positivity (95%CI) | Odds Ratio (95%CI) | Chi-square p-value |
Gender | Male | 177 | 293 | 60.4 (54.6–66.0) | 1.0 (0.7–1.6) | 0.840 |
| Female | 73 | 123 | 59.3 (50.1–68.1) | 1.0 | |
Age | > 60 | 143 | 219 | 65.3 (58.6–71.6) | 1.6 (1.1–2.3) | 0.022* |
| 0 ≤ 60 | 107 | 197 | 54.3 (47.1–61.4) | 1.0 | |
Residence | City | 148 | 261 | 56.7 (50.5–62.8) | 0.7 (0.5–1.1) | 0.099* |
| Village | 95 | 146 | 65.1 (56.7–72.8) | 1.0 | |
| Missing | - | 9 | - | - | - |
Isolation Position | Blood | 105 | 219 | 47.9 (41.2–54.8) | 0.3 (0.2–0.5) | < 0.001* |
| Intestine | 145 | 197 | 73.6 (66.9–79.6) | 1.0 | |
Infection | Yes | 71 | 129 | 55.0 (46.0-63.8) | 0.7 (0.5–1.1) | 0.158* |
| No | 179 | 287 | 62.4 (56.5–68.0) | 1.0 | |
Cancer | Yes | 39 | 62 | 62.9 (49.7–74.8) | 1.1 (0.7-2.0) | 0.625 |
| No | 211 | 354 | 59.6 (54.3–64.8) | 1.0 | |
ICU | Yes | 151 | 249 | 60.6 (54.3–66.8) | 1.1 (0.7–1.6) | 0.743 |
| No | 98 | 166 | 59.0 (51.166.6) | 1.0 | |
| Missing | - | 1 | - | - | |
Catheter < 90 days | Yes | 220 | 355 | 62.0 (56.7–67.0) | 1.6 (0.9–2.8) | 0.080* |
| No | 30 | 60 | 50.0 (36.8–63.2) | 1.0 | |
| Missing | - | 1 | - | - | - |
Carbapenem Resistance | CRKP | 199 | 300 | 66.3 (60.7–71.7) | 2.5 (1.6–3.9) | < 0.001* |
| CSKP | 51 | 116 | 44.0 (34.8–53.5) | 1.0 | |
ST11 | Yes | 133 | 205 | 64.9 (57.9–71.4) | 1.5 (1.0-2.2) | 0.050* |
| Others | 117 | 211 | 55.5 (48.5–62.3) | 1.0 | |
KL64 | Yes | 92 | 143 | 64.3 (55.9–72.2) | 1.3 (0.9-2.0) | 0.201 |
| Others | 158 | 273 | 57.9 (51.8–63.8) | 1.0 | |
*Variables with p-value < 0.2 were kept for further analyses.
Two-Step Clustering
Ten genes of interests were extracted from the NGS dataset including hypervirulence genes encoding Aerobactin, Salmochelin, RmpA/RmpA2, virulence genes encoding Yersiniabactin and Colibactin, and AMR genes including polymyxin resistance gene pmrB, tetracycline resistance gene tet, Extended-Spectrum Beta-Lactamase (ESBL) encoding gene blaSHV/blaCTX−M and carbapenem resistance gene blaKPC.
In the context of the two-step cluster analysis, a comprehensive evaluation of the Bayesian Information Criterion (BIC) has yielded. Upon examination of the BIC line chart, a distinct elbow point is observed, delineating a pivotal juncture in the plot. As the number of clusters increases beyond this elbow, the decrease in BIC becomes less pronounced, suggesting a diminishing return in model refinement. The reduction in BIC from Cluster-1 to Cluster-2 reflects a significant enhancement in model fit, thereby highlighting the distinctness and separation of the clustered patterns within the data. The employment of two clusters is deemed optimal for this study.
Subsequent to the two-step cluster analysis, a novel binary variable emerged, encompassing two distinct groups. Group-1, designated as the ‘Virulent Group’, exhibits a prominent presence of virulence genes (Fig. 3). In contrast, Group-2, termed the ‘AMR Group’, demonstrates a discernibly lower prevalence of virulence genes (Fig. 3). This newly derived variable holds paramount significance, serving as a pivotal input for subsequent analyses, including logistic regression, CRT and ANN algorithms.
Models towards CRKP
Logistic regression
In our analysis, seven significant variables identified through univariable analysis, along with a newly generated variable from clustering (either virulent or AMR), were incorporated into a binary logistic regression model. In the final model, four variables emerged as statistically significant (p < 0.05) risk determinants for CRKP, as shown in Table 3. The greatest risk was associated with the carriage of ST11 strains (OR = 158.8, 95%CI: 27.4-919.3). Variables ICU admission and the presence of virulence genes demonstrated similar risk levels, both of which were slightly higher than 5.0. Blood infection with CRKP showed a protective function (OR = 0.08, 95%CI: 0.035–0.182). The Hosmer and Lemeshow test yielded a p-value of 0.674, which is greater than 0.05, indicating a good fit for the model. Additionally, the area under the receiver operating characteristic (AUC) curve was 0.946, significantly exceeding the threshold of 0.7, with a 95% confidence interval ranging from 0.925 to 0.968. This high AUC value underscores the robustness of our logistic regression model in accurately predicting the risk associated with CRKP.
Table 3
Logistic Regression Analysis Results towards CRKP
Variables | Groups | \(\beta\) Coefficient | Odds Ratio (95%CI) |
Isolation position | Blood | -2.523 | 0.08 (0.035–0.182) |
| Intestine | | |
ICU | Yes | 1.654 | 5.2 (2.5–11.2) |
| No | | |
ST11 | Yes | 5.067 | 158.8 (27.4-919.3) |
| No | | |
Gene group | Virulent | 1.732 | 5.7 (2.7–11.9) |
| AMR | | |
Classification and Regression Trees
In the context of the classification and regression trees (CRT) analysis towards CRKP risk, eight variables were inputted, leading to the emergence of the following outcomes: the tree structure comprised with eight terminal nodes and a depth of four levels (Fig. 3).
In the analysis utilizing the CRT algorithm, the resulting decision tree identified ST11 as the root variable, signaling its overwhelming significance as a determinant in the classification of CRKP and CSKP. The root variable, ST11, delineated two significant pathways. For ST11 isolates resistant to carbapenem, ICU admission resulted in a CRKP probability of 100%.
Conversely, the absence of ST11 led to a more balanced distribution, with around CSKP:CRKP = 1:1 ration. This branch was further divided based on gene clusters into 'virulent' and 'resistant' categories. In the 'virulent' cluster, samples were further differentiated by isolation position. Specifically, blood isolates in this subgroup had a higher likelihood of being CSKP than intestinal isolates. Among blood infection patients, ICU admission yielded an increase in CRKP probability, compared for non-ICU patients.
In the 'resistant' cluster, CRKP was more prevalent. Further bifurcation based on isolation position revealed that intestinal isolates stood at 100% CRKP, whereas ICU admission could lead to an increase in CRKP probability compared to not admitted to the ICU.
Post normalization, the evaluation revealed the importance of specific variables (Fig. 4). Remarkably, the sequence type ST11 exhibited the highest importance, registering at 100%, suggesting it is a pivotal determinant in the model. This is closely followed by the site of K. pneumoniae isolation, with an importance of 96%. Conversely, age and the presence of cancer showed lower levels of importance at 15.4% and 5.4%, respectively.
The model's predictive accuracy exhibited remarkable consistency across both training and testing datasets. Specifically, the accuracy reached 92.5% in the training dataset and 83.7% in the testing dataset. Notably, these percentages surpass the 70% threshold, thereby substantiating the model's robust predictive capability. Further validation was provided by the ROC curve, which displayed an AUC of 0.945. With a p-value less than 0.001 and an AUC exceeding the 0.7 criterion, the model's predictivity is confirmed to be statistically significant and highly reliable.
Artificial Neural Network
In the artificial neural network (ANN) algorithm, the same eight variables previously used in the logistic regression model and the CRT algorithm. The artificial neural network configuration consisted of one hidden layer, and synaptic weights were visualized using color-coded lines; lines with a weight less than zero were depicted in blue. A striking divergence was observed in the blue lines connecting the hidden layer to CRKP and CSKP nodes (Fig. 5).
Additionally, we quantified the normalized importance of each variable to further validate their roles in predicting the outcome, as illustrated in Fig. 6. ST11 was particularly striking, registering a 100% importance, which emphasizes its crucial role as a predictive variable. This was followed by isolation position with a 73.4% importance and KL64 at a notable 55.8%. ICU admission accounted for 51.0% importance, succeeded by gene groups at 43.3%. Catheter use within 90 days post-admission held a 38.9% importance. The variables with the least impact were age, at 14.1%, and cancer, at 9.9%. The predictive accuracy of the neural network model also proved to be robust. The training dataset showed an accuracy of 90.1%, and the testing dataset exceeded this, with an accuracy rate of 91.8%. The AUC-ROC value was consistently high for both datasets at 94.4%, further substantiating the model's reliability and robustness.
Models towards Poor Prognosis
Logistic Regression
In analyzing factors related to poor prognosis, we found that nine patients lacked prognostic records. Consequently, we conducted the analysis using the available data from the remaining 416 patients. A binary logistic regression model was constructed using seven significant variables identified from univariable analysis, as well as an additional variable generated through clustering (classified as either virulent or AMR). Out of these, two variables were found to be statistically significant risk factors for poor prognosis at a p-value less than 0.05: K. pneumoniae blood infection (OR = 0.4, 95% CI: 0.3–0.7) and carriage of CRKP (OR = 2.2, 95% CI: 1.2–4.1). Model fit was verified through the Hosmer and Lemeshow test, which produced a p-value of 0.233, greater than 0.05, signifying a well-fitting model. The AUC curve was observed to be 0.7, with a 95% CI ranging from 0.6 to 0.7, suggesting an acceptable level of discriminatory ability.
Classification and Regression Trees
In an extension of the initial analysis, the CRT algorithm was employed again to investigate the determinants influencing patient outcomes, specifically the dependent variable of poor prognosis. A total of eight variables were integrated into the model, yielding ten terminal nodes and a tree depth of four layers (Fig. 7). The root of the tree branched into two categories: blood and intestinal K. pneumoniae infections. Under the blood K. pneumoniae infection branch, two further subdivisions were observed: CRKP and CSKP. For patients with CRKP, a higher likelihood of poor prognosis was noted. Among these CRKP patients, age emerged as a significant factor: those over 60 years old exhibited a substantially higher risk of poor prognosis compared to younger patients. For the younger cohort, residential location was influential: patients residing in villages had a higher risk of poor prognosis compared to those living in cities. This geographic risk disparity was also evident among patients with CSKP.
Within the intestinal KP infection category, the primary diagnosis of infection was associated with a higher probability of poor prognosis. For patients lacking a primary infection diagnosis, the presence of ST11 KP strains was found to substantially elevate the risk of poor prognosis, regardless of age.
In regards of the normalized variable importance towards outcome poor prognosis, as depicted in Fig. 8, carbapenem resistance emerged as the most critical factor, registering an importance of 100%. This was closely followed by the K. pneumoniae infections position (blood or intestinal) and ST11 carriage, both of which garnered high importance values of 81.4% and 73.2%, respectively. Residence also revealed a lot lower level of importance at 37.5%, whereas the patient’s age, although still impactful, held a relatively diminished importance of 36.2%. The lowest degrees of importance were primary infection diagnosis at 28.9%, catheter usage within 90 days at 15.9%, and gene group at 7.4%.
In terms of predictive accuracy, the model yielded 70% accuracy. This was equal to the generally accepted threshold, thereby confirming the model's predictive utility, albeit with diminished robustness. Further validation was furnished by the ROC curve, which displayed an Area Under the Curve (AUC) value of 0.742 (95%CI: 0.694–0.790). Given that the p-value was less than 0.001 and the AUC surpassed the standard 0.7 criterion, the model's predictive validity is confirmed to be statistically significant, albeit not as robust as in the previous iteration.
Artificial Neural Network Algorithm
In the subsequent neural network model focused on the outcome of poor prognosis, a single hidden layer was utilized to explore the relationships between predictor variables and the target outcome (Fig. 9). The optimized architecture featured 12 hidden units. Each hidden unit consists of nodes or neurons that receive inputs from previous layers, process them through activation functions, and pass the processed signals to subsequent layers. Even though the same group of variables were entered into the artificial neural network (ANN) algorism as into the CRT algorism, a reconfiguration of variable importance was observed (Fig. 10).
In contrast to the findings from the CRT model, the ANN algorithm presented a different hierarchy of variable importance for predicting patient prognosis. In the ANN model, the location of the K. pneumoniae infection (either blood or intestinal) emerged as the most significant predictor with a 100% importance score. This was followed by carbapenem resistance, with an importance of 50.9%, and the presence of a primary infection diagnosis at 39.6%. Age was assigned an importance of 36.9%, closely followed by the variable of patient residence at 32.8%. Notably, the ST11 strain, which was highly significant in the CRT model, was accorded a reduced importance of 28.1% in the ANN algorithm. The least important variables in both the CART and ANN models were consistent: catheter use within the past 90 days and specific gene groups had importance scores of 16.4% and 11.1%, respectively.
In terms of the model's predictive capability, the accuracy showed some reduction compared to earlier analyses. Specifically, the model attained an accuracy of 68.4% in the training set and 71.1% in the testing set. The AUC for the ROC curve was 0.738. This value is above the commonly accepted threshold for classification efficacy, 0.7.