Skip to main content
. 2024 Nov 18;4:236. doi: 10.1038/s43856-024-00673-x

Fig. 1. Overview of model development.

Fig. 1

a The proportion of patients discharged from hospital within the next 24 h in elective and emergency admissions by number of days since admission. b The proportion of patients discharged from hospital within the next 24 h in elective and emergency admissions by day of week of the index date. c Diagram of the prediction problem. The binary prediction problem was defined by classifying the outcome as ‘positive’ (discharge occurred within the next 24 h) or ‘negative’ (discharge did not occur within the next 24 h) separately for elective and emergency admissions. Predictions were made at 12 pm. d Analysis pipeline for the prediction of hospital discharge within the next 24 h. Extreme gradient boosting (XGB) models were trained on the extracted labels and features from admissions between 01 February 2017 to 31 January 2019, and was tested on admissions between 01 February 2019 and 31 January 2020. Five-fold cross validation was used for hyperparameter tuning, and 20% randomly selected validation data was used for feature selection, probability calibration, and threshold setting. The best model was used to predict hospital discharges in the test data, and model performance was examined.