# Deep Learning Forecasting for Supporting Terminal Operators in Port Business Development
## 4 Results  
In this section, we present the results of some numerical experiments carried out on the data described in Section 3.3. A comparative analysis of the out-of-sample accuracy of some models in predicting the container traffic volume is carried out. The aim is to find the model able to more accurately forecast, out of sample, the container traffic volumes. We evaluated and compared the out-of-sample performance of the different methods using the mean absolute percentage error (MAPE):  
\[\frac{1}{n}\cdot\sum_{i}\left|\frac{\hat{y}_{i}-y_{i}}{y_{i}}\right|*100.\]  
The comparison includes the standard SARIMA models, the deep learning model described in Section 3 based on LSTM and embedding networks, and two variants that use GRU and 1D-convolutional networks (in place of the LSTM network) to process the time-specific component. Let \(\mathcal{T}\) be the full set of the time points available. We considered two different forecasting scenarios:  
* In the first scenario, the models were calibrated using data up to December 2018, and forecasts were made for the calendar year 2019. In other words, data were partitioned in the training set, including data related to \(\mathcal{T}_{train}^{(1)}=\{t\in\mathcal{T}:t\leq 108\}\) (from January 2010 to December 2018) and a testing set \(\mathcal{T}_{test}^{(1)}=\{t\in\mathcal{T}:108<t\leq 120\}\) (from January 2019 to December 2019) for measuring the out-of-sample performance. * In the second scenario, the models were calibrated using data up to December 2019, and forecasts were made for the calendar year 2020. In this case, we defined the  
Figure 4: Seasonal box plotsof the container traffic volume data. training set and testing set as \(\mathcal{T}_{train}^{(2)}=\{t\in\mathcal{T}:t\leq 120\}\) (from January 2010 to December 2019) and \(\mathcal{T}_{test}^{(2)}=\{t\in\mathcal{T}:120<t\leq 132\}\) (from January 2020 to December 2020), respectively. We treated these two years separately since 2020 presented very different features from other years. First, we discuss the calibration of all the models investigated. As far as the SARIMA models are concerned, in order to find the most suitable model specification, we used the \"auto.arima\" algorithm available in the R package \"forecast\" [57]. The \"auto.arima\" algorithm explores the ARIMA model space, selecting a recommended model based on the Akaike information criterion (AIC) and unit root tests. Table 2 lists the models selected by the \"auto.arima\" algorithm for the different time series and for both forecasting scenarios. The autoregressive (AR), differentiation (I), and moving average (MA) orders for non-seasonal and seasonal components (denoted by the lower index 12) are reported with the resulting AIC quality index. As expected, in almost all cases, the algorithm selected models that provided seasonal components. Only for the full unlodead domestic data in the 2019 forecasts did the best model results have only non-seasonal terms. Regarding the deep learning models, some details must be provided. According to machine learning best practices, preliminary pre-processing is performed. The time-specific data concerning the volume of container traffic were scaled to \([0,1]\) via min-max scaling, while the month names were coded into integer values. We considered the minimum and maximum values in the training set in the min-max scaling. Furthermore, the minimum value were reduced by 10% of the variation range, and the same percentage increases were applied to the maximum value to ensure the testing set data were in \([0,1]\) after the scaling. In all the architectures investigated, we set the size of the month embedding layer to \(q_{s}=5\). For the LSTM (GRU) model, we used an LSTM (GRU) layer with 64 units, while in the case of the CONV model, we used 64 filters of a 6 \(\times\) 6 size. In the latter case, the filter matrices slid along the data matrix backwards along the time dimension.