# A Spatial-Temporal-Semantic Neural Network Algorithm for Location Prediction on Moving Objects
## 4 Experiments
### Discussion  
Performance of the STS feature extraction. During the experiments, internal parameters of the STS feature extraction including the size of time bin and the distance threshold are adjusted to observe the variation of the prediction precision. The results are shown in Tables 6 and 7. There exists an overall trend that the precision, recall, and F-score of the courier datasets are higher than the bus datasets. From the comparison between the two datasets, as shown in Table 3, the courier data is more precise because the average sampling rate and the average distance between two track points are much less than the bus data. Furthermore, predictions with smaller time bin size are better. With smaller time bin, more locations are extracted from raw trajectories, so the model will learn more and offer better \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Round** & **Input Sequence** & **Predict Location** & **Ground Truth** & **Deviation Distance (m)** \\ \hline
1 & ID0, ID1, ID2, ID3, ID4 & ID5 (116.327, 39.982) & (116.327, 39.984) & 11.6 \\
2 & ID1, ID2, ID3, ID4, ID5 & ID6 (116.326, 39.984) & (116.327, 39.984) & 11.5 \\
3 & ID2, ID3, ID4, ID5, ID6, ID7 & ID7 (116.324, 39.984) & (116.324, 39.984) & 16.4 \\
4 & ID3, ID4, ID5, ID6, ID7, ID8 & ID9 (116.319, 39.986) & (116.320, 39.987) & 12.1 \\
5 & ID4, ID5, ID6, ID7, ID8, ID9 & ID9 (116.319, 39.986) & (116.320, 39.987) & 68.6 \\
6 & ID5, ID6, ID7, ID8, ID9 & ID8 (116.321, 39.985) & (116.321, 39.985) & 30.1 \\
7 & ID6, ID7, ID8, ID9, ID8 & ID9 (116.319, 39.986) & (116.320, 39.987) & 15.6 \\
8 & ID6, ID7, ID8, ID9, ID8, ID9 & ID8 & X & X \\
9 & ID7, ID8, ID9, ID8, ID9, ID8 & 121988914 & X & X \\
10 & ID8, ID9, ID8, ID9, ID89,121988914 & 156469344 & X & X \\
11 & ID8, ID9, ID8, ID12989814, 156469344 & 309419078 & X & X \\
12 & ID8, ID9, ID8, 156469344, 390419078 & 36794051 & X & X \\
13 & & &... &... \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Running example of the input and output of the prediction model. Figure 19: Visualization of the prediction results. **(a)** Blue line represents the raw trajectory, and the orange line is the location sequence after STS feature extraction. **(b)** Current locations of the courier. **(c)** The next five predicted locations by the algorithm in five iterations, marked as different colors. **(d)** Further predictions that exceed the original trajectory. predictions. According to the demand of certain application, the time and distance thresholds of the courier data are set to 16 s, 10 m, and 30 s, 50 m for the bus data. Results in Table 8 indicate that the STS outperforms Geohash on both datasets. The STS feature extraction method has achieved low deviation distance, which mean that mapping to the nearest points on the road is more precisely than mapping to the central of the Geohash grid. The precision rate of the proposed method is 10.4% higher than Geohash on the courier dataset, and 27.1% higher than that of the bus dataset. Therefore, the STS algorithm has achieved a stable result by mapping trajectory to fixed reference points while keeping the spatial, temporal, and semantic information of the raw trajectory. Performance of the LSTM-based model. The location sequences generated by the STS feature extraction algorithm are used to train different models. First, parameter tuning methods are utilized to ensure each model is in the best status. Then models are trained by the same location sequences with \(maxLength=20\). 1. Precision, recall, and F-score. The results showed in Table 9 indicate that the RNN and LSTM outperform the other two classification models on both datasets. Though HMM and XGBoost utilize different ideas of classification, neither of them can take advantage of temporal information. However, neural network-based models are designed for sequential data, which can take advantage of the recent locations as well as the past locations. The precision of RNN is 17.1% higher than the XGBoost and the precision of LSTM is 25.1% higher than the XGBoost.