Fig. 5

SHAP explanation force plot for 2 patients from the held-out validation set of the ML model. The SHAP force plot can be utilized to visually represent the Shapley value for each feature as a force, which either positively contributes (positive value) or negatively impacts (negative value) the prediction from its baseline. The SHAP values indicate the predictive relevance of individual patients’ features and their respective contributions to intubation prediction. If the bold-faced number, representing the probabilistic predicted values f(x), is positive, it indicates that intubation is required for the patient; conversely, if it is negative, intubation may not be necessary. The f(x) represents the log odds ratio of each observation. Red features (on the left) signify an increased risk while blue features suggest a decreased risk. The length of arrows aids in visualizing the magnitude of effect on prediction; longer arrows indicating larger effects. LOS before ICU refers to length of stay prior to ICU admission; RR denotes respiratory rate; PaO2 stands for arterial partial pressure of oxygen; GCS refers to Glasgow coma scale; BMI denotes body mass index.