The number of admissions showed a relatively strong weekly seasonality and a yearly seasonality. Figure 1 provides the results of a multiple seasonal decomposition of the number of daily admissions by loess [24]. There was no strong trend in admission numbers during the first three years, until the commencement of the Corona hospital regulation on March 16th had a clear negative effect on the number of admissions.
Fig. 1. Multiple seasonal decomposition by loess. The y-axes are scaled differently.
Table 1 shows the forecasting performance in 2019 and in 2020 at all study sites combined. The 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. In absolute terms, the best model in 2019 was the weekly elastic net, which achieved a MAE of 7.25 days and an explained variance of 90%. Compared to a naïve forecast based on the number of admissions two weeks in advance, this model achieved a forecast improvement of 38% (sMASE=0.62). In absolute terms, the best model in 2020 was the weekly TBATS model. However, compared to the monthly possible naïve forecast, i.e. the number of admission 35 days in advance, the highest improvement was achieved with the monthly SVM.
Table 1: Forecasting performance in 2019 and in 2020. Best values per column are in boldface. RMSE= Root-Mean-Squared-Error, MAE= Mean Absolute Error, sMASE= Seasonal Mean Absolute Scaled Error. 1: The 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.
|
|
RMSE
|
R2
|
MAE
|
sMASE1
|
|
|
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
|
9.65
|
15.63
|
0.90
|
0.75
|
7.25
|
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
|
15.43
|
0.77
|
0.70
|
8.93
|
10.44
|
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
|
0.76
|
Elastic net
|
9.74
|
16.36
|
0.90
|
0.73
|
7.32
|
11.94
|
0.59
|
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.90
|
0.74
|
7.33
|
12.33
|
0.59
|
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
|
The error accumulation in 2019 and 2020 at all study sites combined is shown in Figure 2. While model performance was relatively similar in 2019, errors diverged after commencement of the Corona hospital regulation on March 16th, 2020. Weekly time series models adjusted quicker to the new circumstances and accumulated less error until the end of year 2020.
Fig. 2. Cumulated mean absolute error in 2019 and 2020 by machine learning and time series models. 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.
The forecasting models showed variation in performance between study sites. Figure 3 shows differences in percentage errors between study sites per week derived from the overall best performing weekly machine learning and time-series models (see Table I), respectively. Both models performed similar in year 2019. However, the elastic net caused less error peaks, for instance at easter Monday and during Christmas time because it had these holidays as features. In contrast, the TBATS model adjusted quicker to the corona regulations and adjusted to the new level of admission numbers during the rest of 2020 better than the elastic net.
Fig. 3. Variation 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 4 shows the top 25 feature variables ordered by their importance in forecasting the number of admissions with the elastic net, which was the best performing machine learning algorithm in our comparison. Variable importance represents the influence of each feature on the forecast performance relative to the other variables [25]. The strongest influence on forecast performance was found in calendrical variables.
Fig. 4. Variable importance of TOP 25 features in machine leaning models. Dec= December.