# Intercity Online Car-Hailing Travel Demand Prediction via a Spatiotemporal Transformer Method
## 4 Results
### Experimental Results  
Table 2 compares the performance of the ST-transformer and baseline models for the 1 h and 2 h window data. Prediction of the passenger volume for the next time steps uses the previous six time step data from the online car-hailing dataset recording trips between Yinchuan and Shizuishan.  
The ST-transformer obtains an outstanding result for both time windows compared to the other neural network-based and statistical-based methods. Generally, all the neural network-based models outperformed the VAR and SVR statistical-based methods. Although the SVR exhibits somewhat good MAE results for both time windows, the MAPE is extremely high, suggesting the possibility that incorrectly predicted values deviate greatly from the actual values. The transformer uses an attention mechanism to capture temporal features and outperforms LSTM and LSTNet. Both networks have inherent weaknesses in capturing longer time series. When passenger volume is aggregated based on a 2 h window, the performance of all models generally drops as the data become sparser. In contrast, the ST-transformer still excels and shows better performance than for the data aggregated based on a 1 h window. This may imply that the ST-transformer is less affected by the sparsity of the data, which is attributed to it being able to utilize spatial characteristics better.  
As shown in Figure 6, the traffic demands are distributed extremely unevenly, and the orders are concentrated in several grids, which makes it difficult for traditional prediction methods. LSTM, VAR, and other models tend to forecast the orders in all grids below ten, as most grids have few car-hailing demands. Therefore, a large error is generated in specific grids with larger demands determined by geographical characteristics (traffic center, commercial building, residential quarters, and so on).  
This characteristic is noticed by the attention mechanism of the ST-transformer, which performs desirably in Grid 50 to Grid 100. For some extreme cases, the ST-transformer still behaves better than other methods by nearly 25%.  
Figure 7 shows the temporal error distribution of the various models. The traffic demands displayed periodic patterns for different days in a month, suggesting a possible trend in weekend and weekday distributions. Supporting previous observations, the ST-transformer obtained a rather stabilized performance in all three metrics, with a relatively low MAPE compared to all other models. We can conclude from this observation that the ST-transformer is indeed predicting with a smaller deviati  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{3}{*}{**Model**} & \multicolumn{6}{c}{**Performance**} \\ \cline{2-7}  & \multicolumn{3}{c}{**1 h Window**} & \multicolumn{3}{c}{**2 h Window**} \\ \cline{2-7}  & **MAE** & **MAPE (\%)** & **RMSE** & **MAE** & **MAPE (\%)** & **RMSE** \\ \hline VAR & 1.41 & 77.45\% & 2.01 & 1.71 & 73.25\% & 2.79 \\ SVR & 1.05 & 88.98\% & 1.16 & 1.15 & 89.76\% & 1.29 \\ LSTM & 1.08 & 38.74\% & 1.36 & 1.29 & 40.20\% & 2.05 \\ LSTNet & 1.07 & 65.32\% & 1.50 & 1.22 & 59.61\% & 1.95 \\ Transformer & 0.72 & 29.51\% & 1.50 & 1.07 & 35.97\% & 2.31 \\ ST-Transformer & 0.98 & 21.87\% & 1.06 & 0.76 & 51.51\% & 1.12 \\ \hline \hline \end{tabular}
\end{table}
Table 2: MAE, MAPE, and RMSE performances of the ST-transformer and baseline models.