## 2 Materials and Methods
The feature \"Hours\" refers to the total duration of time a patient spent in the emergency department (ED) from arrival to the time of the disposition decision (either discharge or admission). This feature is derived from the timestamps provided in the MIMIC-IV-ED dataset. Specifically, it is obtained by subtracting the arrival time from the disposition time. It is an important factor as it can indicate the severity and complexity of the patient's condition, the efficiency of the ED processes, and the demand on ED resources. For the categorical features, we used one-hot encoding to transform them into a format that could be used by the GBM model. The preprocessing of the MIMIC-IV ED dataset involved several key steps to ensure the quality and usability of the data for predictive modeling. Initially, data were extracted from the MIMIC-IV ED database, focusing on emergency department triage data, which included initial vital signs and demographic information. To clean and reshape the data, we identified and removed non-valid records, such as those with incorrectly registered values (e.g., pain scores above the valid range). Handling missing values was a critical part of our preprocessing. Records with null values were systematically removed from the dataset to prevent any negative impact on the model's performance. After preprocessing, the final dataset contained 276,939 instances. After preparing the data, we split it into a training set (80% of the data) and a testing set (20% of the data) using stratified sampling. This was done to ensure that the model could be validated on unseen data. The model was trained using the training set and the performance of the model was subsequently validated using the testing set. The randomness in the data splitting was controlled by setting a seed value to ensure the reproducibility of the results. Post-model training, we utilized SHAP to interpret the model's predictions. Utilizing SHAP values, we are able to measure the contribution of each individual feature to the prediction outcome for each instance in the test set. These SHAP values have notable properties that make them valuable for our interpretability goals. Firstly, they calculate the difference between the prediction for each individual instance and the mean prediction for all instances. This provides a means of quantifying how much each feature'shifts' the prediction from the baseline. Secondly, SHAP values ensure that the contributions of the features are allocated fairly. This means that each feature's contribution to the prediction is proportionate to its influence on the outcome. The SHAP methodology allows us to dive deeper into the model's decision process by producing SHAP dependence plots. These plots help to visualize and understand the complex relationship between the predictor variables and the model outcome. They reveal nuanced insights into how different features interact and how they collectively influence the model's predictions. These dependence plots go beyond simple feature importance,  
Figure 1: Flowchart illustrating the step-by-step process. shedding light on how individual features behave and interact in the context of other features. This robust interpretability tool thus enables a more holistic understanding of the predictive behavior of our model.