# Container Volume Prediction Using Time-Series Decomposition with a Long Short-Term Memory Models
## 3 Method
### Time-Series Decomposition with LSTM Model  
This study presents a multivariate LSTM model utilizing time-series decomposition and external variables to improve the performance of container volume prediction. Time-series decomposition is a method executed to decompose each feature (trend, seasonality, and residual) that constitutes the time-series data to predict each element. Not only the container volume data set, but also external variables go through the same mechanism which decomposes each indicator by trend, seasonality, and residual. Since time series decomposing derives negative values from the residual component, thus we do decomposition for external variables as well. The multivariate LSTM model itself receives variables from multiple inputs. Thus, trend, seasonality, and residual of external variables are applied as multiple inputs with the decomposed container volume data. After training the model, we can eventually get values of each component (trend, seasonality, and residual), and sum each value to get the final prediction value. The presence of the time-varying factor has a significant impact on the predictive model. As the market environment changes, most variables have a significant amount of noise. The qualitative and quantitative variables are used to predict variability increase, which is not reflected directly in the model [14]. To overcome this difficulty, each element is predicted by combining with an external variable; then, the predicted results are presented by summing the values of each predicted time-series characteristics. Because the size of the seasonal pattern does not significantly affect the size of the data, the additive model is applied for container volume data prediction. First, we decompose the volume data according to the construction of the time-series data expressing it as a trend, seasonality, and residual and then combine it with five external variables' decomposed components to represent the process. Container volume data are denoted as _Container_\(\mathbf{X}\) in Equation (3), and trend, seasonality, and residual in Equations (4)-(6), respectively. Note that _Trend_**Tr**, _Sesoanaality_**Sn**, and _Residual_**Rd** represent the values at time \(t\), and \(n\) is the total number of data; that is, the total time duration. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & **Volume** & **MPI** & **IPI** & \
\begin{tabular}{c} **Export** \\ **Weight** \\ \end{tabular} &
\begin{tabular}{c} **Import** \\ **Weight** \\ \end{tabular} & **IEP** & **CPI** \\ \hline Volume & 1 & 0.90 & 0.92 & 0.89 & 0.89 & 0.91 & 0.93 \\ MPI & 0.90 & 1 & 0.96 & 0.95 & 0.91 & 0.94 & 0.93 \\ IPI & 0.92 & 0.96 & 1 & 0.93 & 0.91 & 0.93 & 0.93 \\ Export Weight & 0.89 & 0.95 & 0.93 & 1 & 0.92 & 0.96 & 0.94 \\ Import Weight & 0.89 & 0.91 & 0.91 & 0.92 & 1 & 0.99 & 0.91 \\ IEP & 0.91 & 0.94 & 0.93 & 0.96 & 0.99 & 1 & 0.93 \\ CPI & 0.93 & 0.93 & 0.93 & 0.94 & 0.91 & 0.93 & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Correlation between container volume and external indicators. \[\textit{Container}\ \mathbf{X}=[X_{1},X_{2},\cdots,X_{t},\cdots,X_{n}] \tag{3}\]  
\[\textit{Trend}\ \mathbf{Tr}=[T_{1},T_{2},\cdots,T_{tr},\cdots,\ \textit{Tr}_{n}] \tag{4}\]  
\[\textit{Seasonality}\ \mathbf{Sn}=[Sn_{1},Sn_{2}\cdots,Sn_{t},\cdots,\ \textit{Sn}_{n}] \tag{5}\]  
\[\textit{Residual}\ \mathbf{Rd}=[Rd_{1},Rd_{2},\cdots,\ \textit{R}d_{t},\cdots,\ \textit{R}d_{n}] \tag{6}\]  
According to the characteristics of combining trend, seasonality, and residuals of the data in the Addictive Model, the container volume can be expressed by the equation \(X_{t}=T_{tr}+Sn_{t}+Rd_{t}\). After decomposing the time-series data in Equations (4)-(6), it is combined with the external variables. Because external variables also have characteristics of time-series, the execution of time-series decomposition is similar to that of container volume data. Then, it is combined with the volume data for each time point.