# Predicting Vessel Trajectories Using ASTGCN with StemGNN-Derived Correlation Matrix
## 5 Experiment and Analysis
### Experimental Setup  
The time span of the data set is from 1 January 2017 to 5 January 2017. The preprocessed trajectory data are first grouped according to MMSI, and then the sliding window method is used to process each trajectory segment to generate the input data required by the model. The features in the training data include \((vessel_{type},drawht_{t},lon_{t},lat_{t},sog_{t},cog_{t},rot_{t},\)\(navstatus_{t},time)\) and the output of the model predicts the location and time of future trajectory points, which is \((lon_{t+1},lat_{t+1},time)\). To assess the model's performance, we partitioned the dataset into three subsets, train, validation, and test, in a 7:2:1 ratio. In the training process, a specific sequence step size is set, that is, the training sequence step size (window) is 15, and the prediction sequence step size (horizon) is 5. Optim is set as Adam optimizer. To prevent the model from overfitting or gradient explosion during the training process, the gradient clipping technique is adopted, and the learning rate decay is used to gradually approach the optimal solution. STGCN, CNN_LSTM_CBAM, TCN, StemGNN, and other models are selected as baseline methods to conduct comparative experiments with ASTGCN. Among them, there are some structural similarities between STGCN and ASTGCN. Both adopt Gated CNNs to extract features in both spatial and temporal dimensions and both perform graph convolution operations in both dimensions separately. This design enables the model to deeply capture complex dependencies in spatio-temporal data. CNN_LSTM_CBAM is a model that combines a CNN and a LSTM network. It realizes the fusion and screening of features by introducing the convolutional module attention mechanism. This design not only enhances the feature extraction ability of the model but also provides it with excellent model recognition ability. TCN adopts a pure convolutional approach that combines causal convolutions, dilated convolutions, as well as the design of residual networks. This structure enables the model to effectively capture temporal patterns, enhance the memory of long-term dependencies, and compute features at multiple locations in parallel, thereby improving the training speed. StemGNN is a relatively unique model. It maps the data to the spectral domain by transforming it to the temporal and spatial domain and performs the corresponding convolution operation on this basis. StemGNN can extract temporal patterns and combine the self-attention mechanism to capture the dependency information between features, thus providing the adaptive ability for time series prediction tasks. Through the comparative experiments of these baseline methods, we can comprehensively evaluate the performance and advantages of ASTGCN in dealing with spatio-temporal data. When evaluating the performance of trajectory prediction models, we usually use MSE (Mean Square Error) and L1 Loss as two evaluation metrics. MSE is a crucial metric for evaluating the predictive performance of a regression model. It measures the accuracy of the model's predictions by calculating the mean of the sum of the squares of the differences between the predicted and actual values. Despite its sensitivity to outliers, MSE remains widely used in trajectory prediction because it captures the continuity and smoothness of the model's predictions. The formula is as follows:  
\[\text{MSE}=\frac{1}{n}\sum_{i=1}^{n}{(y_{i}-\hat{y}_{l})}^{2}. \tag{13}\]  
L1 Loss, also known as the mean absolute error (MAE), is another commonly used metric for evaluating the accuracy of regression models. It is computed by taking the absolute difference between the predicted values and the true values for each sample, and then averaging them. Unlike mean squared error (MSE), L1 Loss is more robust to outliers.