# Predicting Decompensation Risk in Intensive Care Unit Patients Using Machine Learning
## 3 Results
### Decompensation Risk Curve Prediction and Decompensation Score  
Figure 4 illustrates the resulting decompensation risk curves for two patients, which were predicted by the CNN-LSTM model: patient A, who survived the forecast period and patient B who decompensated at the 3 rd hour. Their corresponding decompensation scores, calculated as the area under the decompensation curves are 0.40 and 19.1 for patients A and B, respectively.  
The results of the comparison between our proposed decompensation score and the standard NEWS score are displayed in Figure 5. Both scores are compared against the true decompensation score, derived from the area under the actual decompensation curve. The figure suggests that, while both scores respond similarly in patients at high risk of decompensation, our proposed score appears to be closer to the actual score values than NEWS in low-risk patients.  
Figure 3: Optimised CNN-LSTM model architecture.  
Figure 6 shows the resulting 1 st vs. 2 nd principal component scatter plot after performing PCA on the dataset formed with the predicted decompensation risk curves for all patient admissions. Between the first two PCs, the PCA model explained 98.3% of the new data variance. Figure 6a shows the true decompensation score, whilst Figure 6b shows the predicted one. As seen in the figure, true and predicted decompensation scores are highly correlated, aligning with the reported performance of the CNN-LSTM model. We calculated the PPV and NPV of the decompensation score. Similar to NEWS, decompensation score values were divided into two classes: high risk of decompensation, with scores greater than 10 (the positive class), and low risk of decompensation, with scores less than 10 (the negative class). Overall, we obtained a PPV of 0.83 and an NPV of 0.96. Additionally, the 1 st PC was divided into equal-length segments, and PPVs and NPVs were calculated for each segment. Figure 6b also displays the corresponding PPVs and NPVs. In the same figure, note that the low PPV (0.14) for 1 st PC values less than 0 and the low NPV (0.00) for 1 st PC values greater than 30 are due to the very small size of the positive and negative classes in those segments, respectively.  
Figure 7 shows the resulting PCA loadings plot, with the PCA loadings corresponding to the predicted hours for decompensation onset. The figure indicates that the first PC is mainly influenced by decompensation risk predictions between hours 4 and later, whilst risks predicted in the first three hours influence both PCs. This suggests that decompensation  
Figure 4: Comparison of decompensation risk curves between two patients. (**a**) Predicted curves. (**b**) Actual curves.  
Figure 5: Comparison between NEWS and our proposed decompensation scores. Horizontal axis corresponds to the true decompensation score, while the vertical axis corresponds to the estimated scores. Average score values are represented by continuous lines, whilst calculated linear trends, by dashed lines. Shades around trend lines represent 95% confidence intervals.  
tions starting within the first 4 h could follow a different pattern than when decompensation occurs in the final hours of the forecast period.  
Figure 6: PCA visualisation of CNN-LSTM model’s 24-h predictions. (**a**) True decompensation scores overlaid. (**b**) Predicted scores. Calculated PPV and NPV for each PC1 segment are shown on top of (**b**).  
Figure 7: PCA loadings plot. PCA loadings (hours in the predicted risk data) are represented by the red arrows.  
We performed k-means on the PCA-projected data. After using the elbow method, k-means segmented the predicted decompensation risks into seven clusters. The results are shown in Figure 8. It can be seen that admissions with the highest decompensation scores are primarily grouped in clusters C5 and C1, whilst clusters C0 and C7 represent admissions with the lowest scores.