# Spatiotemporal Traffic Prediction Using Hierarchical Bayesian Modeling
## 4 Results and Discussion
Prior to evaluating the performance of the MCMC chain, we plot the correlograms of the autocorrelation coefficient function at different lags. The MCMC chain demonstrates a significant relationship between the different lags. This implies that the present value is continually influenced by the prior values, confirming their interdependence. We assess the MCMC performance by applying some available diagnostic tests, such as [PERSON]'s convergence, and [PERSON] and Rubin's diagnostic. The [PERSON] and [PERSON]'s diagnostic requires multiple MCMC chains run in parallel to compare the autocorrelation coefficient of the multiple MCMC chains as shown in Figures 8-10. The estimated variance of each parameter within the MCMC chain is very small, which indicates that the MCMC chain has converged. The statistical results of the [PERSON] and [PERSON]'s diagnostic match the results of the auto-correlation coefficient figures, where the convergence diagnostic is 1.03 in the three models. Having convergence less than 1.1 means that the chains have converged. We run the MCMC for 5000, 10,000,and 15,000 iterations to produce samples, and then set the number of burn samples to 0. We conclude that running MCMC for 15,000 iterations does not substantially enhance the prediction accuracy when compared to running MCMC with the default 5000 iterations. This process, however, increases the computation time but does not achieve high accuracy. Additionally, we notice that the size of the knots has an impact on the prediction accuracy in the GPP model, where the grid output only contains 16 spatial points and discards 12 spatial points, resulting in MCMC samples created from only 16 spatial points. Although the GPP model outperforms the other models, the dataset is insufficient to demonstrate the suitability of the GPP model. Another interesting finding is that aggregating the 10 min readings to obtain the daily average of bus counts has an effect on the data distribution, resulting in a non-stationary distribution. The effect of the probability distribution should not be underestimated since it affects the reliability of the MCMC samples. These findings are found on all three models considering that we discuss deeply the results of the sparse dataset. Nonetheless, these results raise some interesting issues that need further investigation, such as the potential of utilizing these three temporal components (hour, day, month) in the models' implementation for additional influences. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Prediction Error**} & \multirow{2}{*}{**AR**} & \multicolumn{4}{c}{**GP**} \\ \cline{3-6}  & & **Matern** & **Spherical** & **Exponential** & **Gaussian** \\ \hline
**MAE** & 10.8206 & 7.6839 & 8.1898 & 7.6723 & 41.8726 \\ \hline
**RMSE** & 13.0264 & 9.1833 & 9.7754 & 9.1444 & 53.6856 \\ \hline
**MAPE** & 50.2990 & 37.2477 & 41.5263 & 37.1951 & 201.6881 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Spatial prediction error of GP and AR models. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Prediction Error**} & \multirow{2}{*}{**AR**} & \multicolumn{4}{c}{**GP**} \\ \cline{3-6}  & & **Matern** & **Spherical** & **Exponential** & **Gaussian** \\ \hline
**MAE** & 9.8014 & 11.4243 & 11.4738 & 11.2184 & 15.2290 \\ \hline
**RMSE** & 10.5591 & 13.1387 & 13.6285 & 12.8379 & 19.1728 \\ \hline
**MAPE** & 41.5620 & 44.5595 & 45.0353 & 44.0292 & 73.0119 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Temporal forecasting error of GP and AR models. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Prediction Error**} & \multirow{2}{*}{**AR**} & \multicolumn{4}{c}{**GP**} \\ \cline{3-6}  & & **Matern** & **Spherical** & **Exponential** & **Gaussian** \\ \hline
**MAE** & 12.1815 & 7.0502 & 7.1497 & 6.9503 & 8.2164 & 6.0661 \\ \hline
**RMSE** & 14.8013 & 8.4186 & 8.6597 & 8.2514 & 10.6448 & 7.7081 \\ \hline
**MAPE** & 62.0773 & 38.5571 & 39.2783 & 38.5146 & 40.7944 & 34.9146 \\ \hline \hline \end{tabular}
\end{table}