| Literature DB >> 36151267 |
J Wolff1,2, A Klimke3,4, M Marschollek5, T Kacprowski6,7.
Abstract
The COVID-19 pandemic has strong effects on most health care systems. Forecasting of admissions can help for the efficient organisation of hospital care. We aimed to forecast the number of admissions to psychiatric hospitals before and during the COVID-19 pandemic and we compared the performance of machine learning models and time series models. This would eventually allow to support timely resource allocation for optimal treatment of patients. We used admission data from 9 psychiatric hospitals in Germany between 2017 and 2020. We compared machine learning models with time series models in weekly, monthly and yearly forecasting before and during the COVID-19 pandemic. A total of 90,686 admissions were analysed. The models explained up to 90% of variance in hospital admissions in 2019 and 75% in 2020 with the effects of the COVID-19 pandemic. The best models substantially outperformed a one-step seasonal naïve forecast (seasonal mean absolute scaled error (sMASE) 2019: 0.59, 2020: 0.76). The best model in 2019 was a machine learning model (elastic net, mean absolute error (MAE): 7.25). The best model in 2020 was a time series model (exponential smoothing state space model with Box-Cox transformation, ARMA errors and trend and seasonal components, MAE: 10.44). Models forecasting admissions one week in advance did not perform better than monthly and yearly models in 2019 but they did in 2020. The most important features for the machine learning models were calendrical variables. Model performance did not vary much between different modelling approaches before the COVID-19 pandemic and established forecasts were substantially better than one-step seasonal naïve forecasts. However, weekly time series models adjusted quicker to the COVID-19 related shock effects. In practice, multiple individual forecast horizons could be used simultaneously, such as a yearly model to achieve early forecasts for a long planning period and weekly models to adjust quicker to sudden changes.Entities:
Mesh:
Year: 2022 PMID: 36151267 PMCID: PMC9508170 DOI: 10.1038/s41598-022-20190-y
Source DB: PubMed Journal: Sci Rep ISSN: 2045-2322 Impact factor: 4.996
Figure 1Multiple seasonal decomposition by loess. The y-axes show the number of days and are scaled differently between the facets. Loess = Locally weighted scatterplot smoothing.
Forecasting performance in 2019 and in 2020.
| RMSE | R2 | MAE | sMASEa | ||||||
|---|---|---|---|---|---|---|---|---|---|
| 2019 | 2020 | 2019 | 2020 | 2019 | 2020 | 2019 | 2020 | ||
| Week | XGB | 11.38 | 16.21 | 0.86 | 0.71 | 8.40 | 12.06 | 0.72 | 1.08 |
| SVM | 10.45 | 15.68 | 0.88 | 0.73 | 7.56 | 10.78 | 0.65 | 0.97 | |
| Elastic net | 15.63 | 11.42 | 0.62 | 1.03 | |||||
| ETS | 13.92 | 16.19 | 0.78 | 0.66 | 8.65 | 10.76 | 0.74 | 0.97 | |
| TBATS | 14.10 | 0.77 | 0.70 | 8.93 | 0.77 | 0.94 | |||
| PROPHET | 13.54 | 16.13 | 0.79 | 0.68 | 8.81 | 11.03 | 0.76 | 0.99 | |
| Month | XGB | 11.45 | 16.50 | 0.86 | 0.70 | 8.44 | 12.30 | 0.68 | 0.84 |
| SVM | 10.49 | 15.90 | 0.89 | 0.73 | 7.69 | 11.17 | 0.62 | ||
| Elastic net | 9.74 | 16.36 | 0.73 | 7.32 | 11.94 | 0.81 | |||
| ETS | 13.89 | 18.10 | 0.78 | 0.60 | 8.65 | 12.31 | 0.70 | 0.84 | |
| TBATS | 14.15 | 18.24 | 0.77 | 0.60 | 9.15 | 12.45 | 0.74 | 0.85 | |
| PROPHET | 14.18 | 18.41 | 0.77 | 0.59 | 8.91 | 12.38 | 0.72 | 0.84 | |
| Year | XGB | 11.31 | 16.95 | 0.87 | 0.71 | 8.37 | 12.80 | 0.67 | 1.02 |
| SVM | 10.60 | 16.52 | 0.88 | 0.72 | 7.77 | 11.61 | 0.62 | 0.93 | |
| Elastic net | 9.81 | 16.60 | 0.74 | 7.33 | 12.33 | 0.98 | |||
| ETS | 13.77 | 18.83 | 0.78 | 0.66 | 8.62 | 12.98 | 0.69 | 1.04 | |
| TBATS | 13.78 | 18.08 | 0.78 | 0.67 | 8.85 | 12.59 | 0.71 | 1.00 | |
| PROPHET | 13.80 | 18.83 | 0.78 | 0.68 | 8.63 | 13.42 | 0.69 | 1.07 | |
Best values per column are in boldface. RMSE Root-mean-squared-error, MAE Mean absolute error, sMASE Seasonal mean absolute scaled error.
aThe naïve seasonal forecasts were based on the number of admissions 14, 35 and 364 days before the predicted day for the weekly, monthly and yearly models, respectively.
Figure 2Cumulated mean absolute error in 2019 and 2020 by machine learning and time series models (days). XGB = Gradient boosting with trees, SVM = Support vector machines, ETS = Exponential smoothing state space models, TBATS = Exponential smoothing state space models with Box-Cox transformation, ARMA errors and trend and seasonal components, PROPHET = Additive models with non-linear trends fitted by seasonal effects.
Figure 3Variation of percentage error between study sites. TBATS = Exponential smoothing state space models with Box-Cox transformation, ARMA errors and trend and seasonal components, IQR = Interquartile range.
Figure 4Variable importance of TOP 25 features in machine leaning models. Positive and negative effects represent increases and decreases in the number of admissions, respectively. Dec = December. Bridge day: Day between a holiday and the weekend, vice versa. Lag (14) = The number of admissions fourteen days before the predicted day. The Fourier series accounted to a yearly and a weekly seasonality with sine (S) and cosine (C) waves with an maximum order of 2 (weekly) and 5 (yearly).