Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
Randomized Controlled Trial
. 2022 Jun 10:12:893294.
doi: 10.3389/fcimb.2022.893294. eCollection 2022.

Usefulness of Random Forest Algorithm in Predicting Severe Acute Pancreatitis

Affiliations
Randomized Controlled Trial

Usefulness of Random Forest Algorithm in Predicting Severe Acute Pancreatitis

Wandong Hong et al. Front Cell Infect Microbiol. .

Abstract

Background and aims: This study aimed to develop an interpretable random forest model for predicting severe acute pancreatitis (SAP).

Methods: Clinical and laboratory data of 648 patients with acute pancreatitis were retrospectively reviewed and randomly assigned to the training set and test set in a 3:1 ratio. Univariate analysis was used to select candidate predictors for the SAP. Random forest (RF) and logistic regression (LR) models were developed on the training sample. The prediction models were then applied to the test sample. The performance of the risk models was measured by calculating the area under the receiver operating characteristic (ROC) curves (AUC) and area under precision recall curve. We provide visualized interpretation by using local interpretable model-agnostic explanations (LIME).

Results: The LR model was developed to predict SAP as the following function: -1.10-0.13×albumin (g/L) + 0.016 × serum creatinine (μmol/L) + 0.14 × glucose (mmol/L) + 1.63 × pleural effusion (0/1)(No/Yes). The coefficients of this formula were utilized to build a nomogram. The RF model consists of 16 variables identified by univariate analysis. It was developed and validated by a tenfold cross-validation on the training sample. Variables importance analysis suggested that blood urea nitrogen, serum creatinine, albumin, high-density lipoprotein cholesterol, low-density lipoprotein cholesterol, calcium, and glucose were the most important seven predictors of SAP. The AUCs of RF model in tenfold cross-validation of the training set and the test set was 0.89 and 0.96, respectively. Both the area under precision recall curve and the diagnostic accuracy of the RF model were higher than that of both the LR model and the BISAP score. LIME plots were used to explain individualized prediction of the RF model.

Conclusions: An interpretable RF model exhibited the highest discriminatory performance in predicting SAP. Interpretation with LIME plots could be useful for individualized prediction in a clinical setting. A nomogram consisting of albumin, serum creatinine, glucose, and pleural effusion was useful for prediction of SAP.

Keywords: LIME plot; acute pancreatitis; artificial intelligence; nomogram; predictor; random forest.

PubMed Disclaimer

Conflict of interest statement

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Figures

Figure 1
Figure 1
Nomogram predicting the probability of SAP. To obtain the nomogram-predicted probability, patient values on each axis were located and a vertical line was drawn to the point axis to determine how many points were attributed for each variable value. Points for all variables were summed and accessed on the point line to find SAP probability.
Figure 2
Figure 2
Variable importance plot of the RF for SAP.
Figure 3
Figure 3
ROC curves for the RF and LR models, for a tenfold cross-validation on the training set.
Figure 4
Figure 4
The precision-recall curves for RF and LR models for tenfold cross-validation on the training set.
Figure 5
Figure 5
Calibration plots for RF and LR models for tenfold cross-validation on the training set.
Figure 6
Figure 6
ROC curves for the RF and LR models and BISAP scores, applied on the test set.
Figure 7
Figure 7
The precision-recall curves for the (A) RF model, (B) LR model, and (C) BISAP score applied on the test set.
Figure 8
Figure 8
LIME plot for the individualized likelihood of two typical predictions. This shows the main contributing features behind the model prediction. The length of the color bar represents the amount of contribution. The first case (case 49) is a non-SAP patient who was correctly classified, with a prediction probability of 0.97 as non-SAP based on the RF model. The first case (case 49) had a creatinine value of 86 μmol/L, BUN=7.1 mmol/L, no pleural effusion, LDL=1.82 mmol/L, albumin=36.5 mg/dl, total cholesterol=3.24 mmol/L, HDL=0.79 mmol/L, glucose=8.4 mmol/L, prothrombin time=15.2 s, hematocrit=0.465, platelets=206×10^9/L, AST=76 U/L, calcium=2.43 mmol/L, triglyceride=0.96 mmol/L, no SIRS, and CRP=5 mg/L. The second case (case 51) is an SAP patient who was correctly classified, with a prediction probability of 0.82 (SAP based on RF model). The second case (case 51) had a creatinine value of 260 μmol/L, BUN=16.6 mmol/L, glucose =23.2 mmol/L, HDL=0.47 mmol/L, no pleural effusion, albumin =26.5 mg/dl, calcium=0.83 mmol/L, triglyceride=25.6 mmol/L, LDL=1.87 mmol/L, hematocrit=0.39, prothrombin time=15.7 s, AST=155 U/L, SIRS, platelets=243×10^9/L, CRP =76.1 mg/L, and total cholesterol=10.54 mmol/L.

Similar articles

Cited by

References

    1. Al’Aref S. J., Maliakal G., Singh G., Van Rosendael A. R., Ma X., Xu Z., et al. . (2020). Machine Learning of Clinical Variables and Coronary Artery Calcium Scoring for the Prediction of Obstructive Coronary Artery Disease on Coronary Computed Tomography Angiography: Analysis From the CONFIRM Registry. Eur. Heart J. 41, 359–367. doi: 10.1093/eurheartj/ehz565 - DOI - PMC - PubMed
    1. Asztalos B. F., Schaefer E. J., Horvath K. V., Yamashita S., Miller M., Franceschini G., et al. . (2007). Role of LCAT in HDL Remodeling: Investigation of LCAT Deficiency States. J. Lipid Res. 48, 592–599. doi: 10.1194/jlr.M600403-JLR200 - DOI - PubMed
    1. Banks P. A., Bollen T. L., Dervenis C., Gooszen H. G., Johnson C. D., Sarr M. G., et al. . (2013). Classification of Acute Pancreatitis–2012: Revision of the Atlanta Classification and Definitions by International Consensus. Gut 62, 102–111. doi: 10.1136/gutjnl-2012-302779 - DOI - PubMed
    1. Barle H., Hammarqvist F., Westman B., Klaude M., Rooyackers O., Garlick P. J., et al. . (2006). Synthesis Rates of Total Liver Protein and Albumin Are Both Increased in Patients With an Acute Inflammatory Response. Clin. Sci. (Lond.) 110, 93–99. doi: 10.1042/CS20050222 - DOI - PubMed
    1. Basran G. S., Ramasubramanian R., Verma R. (1987). Intrathoracic Complications of Acute Pancreatitis. Br. J. Dis. Chest 81, 326–331. doi: 10.1016/0007-0971(87)90180-X - DOI - PubMed

Publication types