# Research on Offshore Vessel Trajectory Prediction Based on PSO-CNN-RGRU-Attention
## 4 Results  
### Experiment Results Analysis  
In the experiment, we first performed a one-step prediction of ship trajectories, specifically predicting the trajectory at the next time step. The prediction performance of the PSO-CNN-RGRU-Attention model was compared with that of several other models: PSO-BP, PSO-LSTM, PSO-GRU, PSO-BiLSTM, PSO-BiGRU, PSO-CNN-LSTM, PSO-CNN-GRU, PSO-GRU-LSTM, PSO-CNN-LSTM-Attention, ABC-CNN-RGRU-Attention, SSA-CNN-RGRU-Attention, and WOA-CNN-RGRU-Attention. The comparison focused on prediction error and the degree of fitting. Table 2 presents the comparison of longitude prediction errors for each model using the following evaluation metrics: Mean Absolute Error (_MAE_), Mean Squared Error (_MSE_), and Root Mean Squared Error (_RMSE_). The PSO-CNN-RGRU-Attention model demonstrated improved prediction accuracy for longitude compared to the other models, with the following reductions: _MAE_: reduced by 56.9%, 77.0%, 82.9%, 17.3%, 59.4%, 79.6%, 7.8%, 16.7%, 53.0%, 41.3%, 29.8%, and 42.1% relative to PSO-BP, PSO-LSTM, PSO-GRU, PSO-BiLSTM, PSO-BiGRU, PSO-CNN-LSTM, PSO-CNN-GRU, PSO-GRU-LSTM, PSO-CNN-LSTM-Attention, ABC-CNN-RGRU-Attention, SSA-CNN-RGRU-Attention, and WOA-CNN-RGRU-Attention, respectively. MSE: reduced by 75.3%, 93.4%, 96.3%, 15.5%, 76.8%, 93.8%, 3.4%, 10.8%, 72.6%, 55.2%, 60.0%, and 69.4%, respectively. RMSE: reduced by 50.3%, 72.7%, 80.9%, 8.1%, 51.9%, 75.3%, 1.7%, 5.5%, 47.6%, 33.1%, 36.7%, and 44.6%, respectively. These results indicate that the PSO-CNN-RGRU-Attention model significantly outperformed the other models in predicting ship trajectories, highlighting its effectiveness in accurately forecasting maritime movements. Figure 10: Comparison of Training Graphs for Optimized Algorithms. Table 3 presents a comparison of the latitude prediction errors for different ship trajectory prediction models, evaluated using the metrics _MAE_, _MSE_, and _RMSE_. The PSO-CNN-RGRU-Attention model demonstrated superior latitude prediction accuracy compared to the PSO-BP, PSO-LSTM, PSO-GRU, PSO-BiLSTM, PSO-BiLSTM, PSO-BiGRU, PSO-CNN-LSTM, PSO-CNN-GRU, PSO-CRU-LSTM, PSO-CNN-LSTM-Attention, ABC-CNN-RGRU-Attention, SSA-CNN-RGRU-Attention, and WOA-CNN-RGRU-Attention models. Specifically, the MAE was reduced by 54.5%, 66.6%, 55.9%, 20.6%, 51.7%, 25.1%, 48.3%, 8.8%, 16.5%, 38.7%, 7.0%, and 43.8%, respectively. The MSE decreased by 71.7%, 88.5%, 80.3%, 22.1%, 72.8%, 37.4%, 62.9%, 9.4%, 27.3%, 54.2%, 43.6%, and 70.5%, respectively. The RMSE saw reductions of 46.8%, 66.1%, 55.6%, 11.8%, 47.9%, 21.6%, 39.2%, 4.8%, 14.8%, 32.3%, 24.9%, and 45.7%, respectively. Tables 2 and 3 show that the PSO-CNN-RGRU-Attention model had a lower _MAE_, _MSE_, and _RMSE_ for both longitude and latitude compared to other models. To further compare the deviation of the predicted longitude and latitude values from the actual values, we plotted the predicted trajectory sequences on the \(x\)-axis and the predicted ship's longitude and latitude on the \(y\)-axis. Figures 11-22 illustrate the comparison of longitude and latitude predictions between various models and the PSO-CNN-RGRU-Attention model. \begin{table}
\begin{tabular}{c c c c} \hline
**Model** & _MAE_ & _MSE_ & _RMSE_ \\ \hline PSO-BP & 0.05107755 & 0.00473161 & 0.06878676 \\ PSO-LSTM & 0.09581701 & 0.01831781 & 0.12556596 \\ PSO-GRU & 0.12906489 & 0.03170017 & 0.17804541 \\ PSO-BiLSTM & 0.02661157 & 0.00138471 & 0.03721178 \\ PSO-BiGRU & 0.05415891 & 0.00504971 & 0.07106135 \\ PSO-CNN-LSTM & 0.10738649 & 0.01916146 & 0.13842495 \\ PSO-CNN-GRU & 0.02387195 & 0.00121191 & 0.03481251 \\ PSO-GRU-LSTM & 0.02641866 & 0.00131173 & 0.03621787 \\ PSO-CNN-LSTM-Attention & 0.04683651 & 0.00427090 & 0.06535212 \\ ABC-CNN-RGRU-Attention & 0.03751446 & 0.00261446 & 0.05113182 \\ SSA-CNN-RGRU-Attention & 0.03133182 & 0.00292325 & 0.05406715 \\ WOA-CNN-RGRU-Attention & 0.03794286 & 0.00382171 & 0.06182004 \\ PSO-CNN-RGRU-Attention & 0.02201033 & 0.00117039 & 0.03421106 \\ \hline \end{tabular}
\end{table}