| Literature DB >> 35462534 |
Zhenhui Xu1, Congwen Zhao1, Charles D Scales2,3,4, Ricardo Henao1,2,5, Benjamin A Goldstein6,7,8.
Abstract
BACKGROUND: In the early stages of the COVID-19 pandemic our institution was interested in forecasting how long surgical patients receiving elective procedures would spend in the hospital. Initial examination of our models indicated that, due to the skewed nature of the length of stay, accurate prediction was challenging and we instead opted for a simpler classification model. In this work we perform a deeper examination of predicting in-hospital length of stay.Entities:
Keywords: Clinical decision support; Electronic health records; Machine learning; Surgical outcomes
Mesh:
Year: 2022 PMID: 35462534 PMCID: PMC9035272 DOI: 10.1186/s12911-022-01855-0
Source DB: PubMed Journal: BMC Med Inform Decis Mak ISSN: 1472-6947 Impact factor: 2.796
Overall analytic approach
| Algorithm choice | Loss function | Data manipulation | Modeling approach |
|---|---|---|---|
| LASSO | Mean squared error (MSE) | Original data | One-stage approach |
| Random forest | Mean absolute error (MAE) | Log data | Two-stage approach |
| Multilayer perceptron | Mean relative error (MRE) | Truncated data |
This table guides the analytic approach in this study. We compared different algorithm choices, loss functions, data manipulations and modeling approaches
Fig. 7Precision-recall curve (average precision = 0.38) and receiving operating characteristics (AUC = 0.80) of the classifier (stage 1) on the testing dataset
Fig. 1Flow chart of the two-stage model
Descriptive statistics of predictors by LOS*
| 0–2 days | 2–4 days | 4–7 days | > = 7 days | |
|---|---|---|---|---|
| Demographics | ||||
| Age, years (mean, SD) | 58.09 (17.59) | 57.12 (19.10) | 57.07 (20.19) | 57.40 (21.44) |
| Sex = female (n, %) | 7792 (49.6%) | 8839 (58.5%) | 3820 (52.9%) | 1873 (45.0%) |
| Race (n, %) | ||||
| NHW** | 12,020 (76.6%) | 10,646 (70.4%) | 5173 (71.6%) | 2935 (70.5%) |
| NHB*** | 2567 (16.4%) | 3364 (22.2%) | 1477 (20.4%) | 869 (20.9%) |
| Hispanic | 342 (2.2%) | 371 (2.5%) | 181 (2.5%) | 99 (2.4%) |
| Other | 767 (4.9%) | 741 (4.9%) | 395 (5.5%) | 262 (6.3%) |
| Smoke status = Ever (n,%) | 4887 (31.1%) | 4893 (32.4%) | 2707 (37.5%) | 1741 (41.8%) |
| BMI (n, %) | ||||
| Underweight | 478 (3.0%) | 605 (4.0%) | 389 (5.4%) | 311 (7.5%) |
| Normal | 3248 (20.7%) | 3235 (21.4%) | 1767 (24.5%) | 1108 (26.6%) |
| Overweight | 5076 (32.3%) | 4319 (28.6) | 2167 (30.0%) | 1253 (30.1%) |
| Obese | 6866 (43.7%) | 6950 (46.0%) | 2895 (40.1%) | 1490 (35.8%) |
| Service utilizations | ||||
| Hospital encounter counts (mean, SD) | 0.24 (0.74) | 0.26 (0.73) | 0.36 (0.93) | 0.55 (1.13) |
| Ambulatory encounter counts (mean, SD) | 15.76 (17.12) | 16.77 (18.29) | 17.99 (19.45) | 20.67 (22.90) |
| Emergency encounter counts (mean, SD) | 0.16 (0.83) | 0.20 (0.83) | 0.23 (0.86) | 0.32 (2.20) |
*Procedure data, medicine history and comorbidities are not included in this table
**NHW: Non-Hispanic Whites
***NHB: Non-Hispanic Blacks
Fig. 2Histogram of LOS in Days (X-axis of left in original scale and right in logarithmic scale) Note the x-axis of the left hand side is truncated to 35 days
Comparison of model performance between lasso, random forest and multilayer perceptron
| Lasso | Random forest | Multilayer perceptron | |
|---|---|---|---|
| CV-MSE | 22.924 | 24.370 | |
| CV-MAE | 1.958 | 2.305 | |
| CV-MRE | 1.006 | 1.036 |
Bolded values indicate minimized loss
Fig. 3Stratified evaluation metrics of the full model
Fig. 4Predictions versus true values of untransformed data (RF)
Comparison between untransformed, log, truncated, and two-stage outcome
| Untransformed LOS | Log LOS | Truncated LOS | Two-stage model | |
|---|---|---|---|---|
| Customized loss function* | 1.338 | 1.126 | 1.183 | 1.118 |
| MAE | 1.880 | 1.695 | 1.796 | 1.730 |
| Calibration | 0.528 | 0.429 | 0.317 | 0.418 |
| Sensitivity < 7 days | 0.970 | 0.990 | 1.00 | 0.990 |
*This is the two-stage loss function described in the methods section
Fig. 5The comparison between different thresholds of the regressor and untransformed and log transformed LOS
Different thresholds for the classifier and the regressor in the two-stage model
| Untransformed LOS | Log LOS | |||||
|---|---|---|---|---|---|---|
| 7 | 21 | 35 | 7 | 21 | 35 | |
| MAE | 1.150 | 1.202 | 1.242 | 1.175 | 1.119 | 1.118 |
| Calibration | 0.339 | 0.454 | 0.476 | 0.320 | 0.408 | 0.418 |
| Sensitivity < 7 days | 0.991 | 0.984 | 0.978 | 0.991 | 0.989 | 0.988 |
Fig. 6Truncated evaluation metrics of different regressor thresholds
Fig. 8Predictions versus true values on the testing dataset
Stratified customized loss functions (MAE) of one-stage and two-stage models with 95% bootstrap confidence intervals
| One-stage model (log data) | Two-stage model (log data) | LASSO | RF | MLP | |
|---|---|---|---|---|---|
| 0–2 days | 0.744 (0.739, 0.749) | 0.736 (0.731, 0.741) | 1.596 (1.585, 1.607) | 1.313 (1.305, 1.321) | 1.638 (1.626, 1.648) |
| 2–4 days | 0.713 (0.709, 0.718) | 0.705 (0.700, 0.709) | 1.046 (1.037, 1.058) | 1.035 (1.027, 1.047) | 1.155 (1.142, 1.168) |
| 4–7 days | 1.782 (1.771, 1.794) | 1.760 (1.750, 1.772) | 1.492 (1.474, 1.509) | 1.586 (1.571, 1.600) | 1.730 (1.713, 1.746) |
| 0–7 days | 0.927 (0.922, 0.930) | 0.915 (0.911, 0.919) | 1.358 (1.351, 1.366) | 1.254 (1.248, 1.261) | 1.464 (1.456, 1.471) |
Performance of two-stage model during COVID-19 period
| Two-stage model (01/01/17–03/01/20) | Two-stage model (03/01/20–02/22/22) | |
|---|---|---|
| 0–2 days | 0.736 (0.731, 0.741) | 2.298 (2.280, 2.313) |
| 2–4 days | 0.705 (0.700, 0.709) | 1.251 (1.236, 1.263) |
| 4–7 days | 1.760 (1.750, 1.772) | 2.324 (2.315, 2.333) |
| 0–7 days | 0.915 (0.911, 0.919) | 1.934 (1.922, 1.944) |