This was a retrospective cohort study performed using electronic health record data of consecutive patients admitted to the ICU at Chiba University Hospital, Japan, from November 2010 to March 2019. The surgical/medical ICU has 22 beds, with an annual admission number of patients ranging from 1,541 to 1,832. Of the 16,169 screened patients, 12,747 were enrolled in the present study after the exclusion of 3,422 with lower input rates (less than 50%) or missing data on clinical outcomes.
The study was approved by the Ethical Review Board of the Graduate School of Medicine, Chiba University (approval number: 3380), who waived the need for written informed consent.
Data Collection And Definitions
To develop prediction algorithms, the data of 94 input variables (Supplemental Table 1) were collected at the earliest time within 24 h after ICU admission from the ICU data system. These variables included 1) patient baseline characteristics (age, sex, height, weight, blood type, clinical department categories, diagnosis on admission, admission route [from emergency room, general ward, operating room, other hospitals] and acute physiology, and chronic health evaluation [APACHE] II comorbidities (acquired immunodeficiency syndrome, acute myeloid leukemia/multiple myeloma, heart failure, lymphoma, respiratory failure, cancer metastasis, liver failure/cirrhosis, immunosuppressed status, and dialysis)); 2) blood tests (complete blood count, biochemistry, coagulation, and blood gas analysis); and 3) physiologic measurements (heart rate [HR], blood pressure, respiratory rate, peripheral oxygen saturation [SpO2], body temperature, and end-tidal carbon dioxide [EtCO2]).
Variable importance is defined as an index calculated by machine learning indicating the extent to which the given machine learning model was used as a variable to make precise predictions. The top three variables with high importance were defined as the key variables in this study. The length of ICU stay was analyzed in survivors and divided into three categories: short (within one week), medium (within one to two weeks), and long (more than two weeks). The short and long length of ICU stay were considered to have high clinical importance because these subcategories were reported to be associated with ICU mortality and severity[6, 7]. In addition, identifying patients who are at risk of long ICU stay may contribute to adequate ICU management and avoid ICU bed shortage.
Imputation For Missing Values
We performed multiple imputations (10 times) for the missing values of numerical data using the sklearn.impute.Iterative Imputer in Python (scikit-learn 0.22.1; https://scikit-learn.org). Dummy coding was used to convert categorical variables into binary variables. After missing value imputation, the dataset was randomly split into the training and test cohorts, comprising 80% and 20% of the datasets, respectively, and the variables were compared between the two cohorts.
The primary outcome variable was ICU mortality, and the secondary outcome variable was the length of ICU stay. Outcome prediction was performed using machine learning approach algorithms computed with the three types of classifiers, namely random forest (RF), XGBoost, and neural network, or logistic regression analysis using either APACHE II score or sequential organ failure assessment (SOFA) score. After machine learning algorithms were derived using the training cohort, the established algorithms were applied to the test cohort. As we found that the RF was superior to the other two machine learning models for the prediction of mortality, we confirmed the variable importance and key variables in the RF model.
For robust clustering of ICU patients with higher risk factors for mortality, an RF dissimilarity measure was calculated to evaluate the similarity among patients. The RF dissimilarity was then used as an input for uniform manifold approximation and projection (UMAP) to provide a 2D representation of the patients in the test cohort. Subsequently, partitioning around medoids clustering was applied to the two scaling coordinates of the UMAP.
To predict the length of ICU stay, we evaluated the short and long categories using machine learning with RF algorithm and logistic regression analysis using the APACHE II or SOFA scores. In the same manner as the analysis on mortality, variable importance and key variables associated with length of ICU stay prediction were confirmed. We also analyzed the predictive values of length of ICU stay using ordinalForest, which could estimate the predictive values for all three categories of ICU stay at the same time. All classifiers were implemented using Python, except for the ordinalForest, which was executed with R.
Data are expressed as median (interquartile range) for continuous values and absolute numbers and percentages for categorical values. The area under the curve (AUC) was calculated to evaluate the predictive values. Statistical significance was set at P < 0.05. Analyses were performed using Python packages (sklearn.neural_network.MLPClassifier, sklearn.ensemble.RandomForestClassifier, xgboost, sklearn.linear_model.LogisticRegression) and R package (ordinalForest 2.4.1), to construct machine learning models. The Python and R codes used in this article are available at https://github.com/eiryo-kawakami/ICU_AI_code.