Random forest model can predict the prognosis of hospital-acquired Klebsiella pneumoniae infection as well as traditional logistic regression model

PLoS One. 2022 Nov 29;17(11):e0278123. doi: 10.1371/journal.pone.0278123. eCollection 2022.

Abstract

Objective: To explore if random forest (RF) model can predict the prognosis of hospital-acquired Klebsiella pneumoniae infection as well as traditional logistic regression(LR) model.

Methods: A total of 254 cases of hospital-acquired Klebsiella pneumoniae infection in a tertiary hospital in Beijing from January 2016 to December 2020 were retrospectively collected. Appropriate influencing factors were selected by referring to relevant articles from the aspects of basic clinical information and contact history before infection, and divided into a training set and a test set. Both the RF and LR models were trained by the training set, and using testing set to compare these two models.

Results: The prediction accuracy of the LR model was 87.0%, the true positive rate of the LR model was 94.7%; the false negative rate of the LR model was 5.3%; the false positive rate of the LR model was 35%; the true negative rate of the LR model was 65%; the sensitivity of the LR model for the prognosis prediction of hospital-acquired Klebsiella pneumoniae infection was 94.7%; and the specificity was 65%. The prediction accuracy of the RF model was 89.6%; the true positive rate of the RF model was 92.1%; the false negative rate of the RF model was 7.9%; the false positive rate of the RF model was 21.4%; the true negative rate of the RF model was 78.6%; the sensitivity of the RF model for the prognosis prediction of hospital-acquired Klebsiella pneumoniae infection was 92.1%; and the specificity was 78.6%. ROC curve shows that the area under curve(AUC) of the LR model was 0.91, and that of the RF model was 0.95.

Conclusion: The RF model has higher specificity, sensitivity, and accuracy for the prognostic prediction of hospital-acquired Klebsiella pneumoniae infection than the LR model and has greater clinical application prospects.

MeSH terms

  • Cross Infection* / diagnosis
  • Humans
  • Klebsiella pneumoniae*
  • Logistic Models
  • Prognosis
  • Retrospective Studies
  • Tertiary Care Centers

Grants and funding

The authors received no specific funding for this work.