# A Tri-Model Prediction Approach for COVID-19 ICU Bed Occupancy: A Case Study
## 3 Research Design
### Models & Algorithms
#### 3.2.2 ARTXP and ARIMA  
This model utilises ARTXP and ARIMA time series algorithms from MS SQL Server Analysis Services [51]. ARIMA allows the determination of correlations in observations to be taken sequentially in time, as well as the inclusion of error terms in the model. ARTXP and ARIMA support multiplicative seasonality or periodicity generating options for altering the number of possible segments and expected cycles during algorithmic execution. This iterative process increases accuracy. Figure 4 depicts the execution process of this model. ARTXP forecasts the next possible value and ARIMA increases long-term accuracy. As for ARIMA's parameter tuning, we set the order the same way as explained in Section 3.2.1, since we deal with exactly the same dataset. Each algorithm runs independently before combining results. The combined output is based on historic predictions using actual data. Each forecasted item links with a variable associating it with the historic executions for generating indexing weights.  
The combination of algorithmic executions based on indexed weights achieves a cross-prediction process optimised towards the short or medium-term horizon. Depending on the forecasting period and if there is a lockdown in place, we empirically smooth over ARTXP or ARIMA based on historic outputs of this model. In general, when data observations are limited ARTXP performs better. When more data observations are available, ARIMA outperforms ARTXP.  
The first step in the ARTXP methodology was to preprocess the time series data related to the spread of COVID-19. Cleaning the data, converting variables, and removing any outliers or abnormalities are all part of this operation. Next, the time series data were divided into segments. For each segment, an autoregressive model fits the data in that segment. The autoregressive models are used to make predictions for future time points. The prediction from the autoregressive models determines which model to use, based on the current state of the time series. This allows the ARTXP model to capture complex, non-linear relationships in the data and to make accurate predictions for future time-points. The performance of the ARTXP model was evaluated (with the metrics reported in this paper) by comparing the predictions with actual values for the spread of COVID-19.  
Also, ARTXP tends to report with high accuracy in the short term, i.e., forecasting up to one-week ahead. Although ARIMA is more preferable for predictions beyond a week, it yields a high error rate for the 1 st week. For this reason, we utilized a mixed mode prioritizing reporting on ARTXP for the first week and ARIMA for subsequent weeks.  
The ARTXP and ARIMA model implements algorithmic optimization by calculating the error rate for each execution iteration. Error rate detects accuracy reduction and enables a mechanism that re-trains the model by automatically introducing coefficients for re-calibrating output values. Model calibration utilizes past error rates.  
After experimenting with the effect of error rates on this model's output, we noticed that by forecasting error rate and supplying it as input to the model, it may improve the model's performance. In case there are post forecasting actual values available for week \(n\), we perform this process, else we apply error correction based on week \(n-1\). Identically, the same process applies for \(n+1\) weeks and so on. We calculate the \(error\_rate\) (%) on a specific timestamp \(t\) according to Equation (3).  
\[error\_rate_{t}=\frac{|Predicted_{t}-Actual_{t}|}{Actual_{t}}\times 100 \tag{3}\]  
Finally, the ARTXP and ARIMA model utilizes a variance as a metric for reporting on lower and upper forecasting bounds. Since this model is the most complex among the ones we used, we provide Appendix A clarifying its execution process and parameters involved.