## 3 Methodology
### TRFM Trajectory Prediction Model
#### 3.3.5 Loss Function
**Nomenclature**

AIS

Automatic Identification System

Attention-LSTM

Attention-Long Short-Term Memory

_ADE_

Average Displacement Error

Bi-GRU

Bi-directional Gate Recurrent Unit

COG

Course Over Ground

CRC

Change Rate of Course Over Ground

CRS

Change Rate of Speed Over Ground

_FDE_

Final Displacement Error

GRU

Gate Recurrent Unit

IMO

International Maritime Organization

IS-STGCNN

Improved Social Spatial-Temporal Graph Convolutional Neural Network

LSTM

Long Short-Term Memory

LON

Longitude

LAT

Latitude

MPC

Model Predictive Control

MP-LSTM

Multi-step Prediction Long Short-Term Memory

MMSI

Maritime Mobile Service Identify

MSGTIME

Message Time

Mean Absolute Error

_MSE_

Mean Square Error

NS

Navigational State

PESO

Parallel Encoders and a Ship-Oriented Decoder

QSD-LSTM

Quaternion Ship Domain Long Short-Term Memory

QSD

Quaternion Ship Domain

_RMSE_

Root Mean Square Error

SIV

Semantic Location Vector

SOG

Speed Over Ground

TDV

Trajectory Direction Vector

TRFM

Transformer

TRFM (DEC)

Transformer with Decoder

TRFM (ENC-DEC)

Traj, \(Traj_{j}\)

The j-th Trajectory of Ship

\(Po_{i}\), \(po^{j}_{i}\)

The i-th Position in j-th Trajectory

\(\mathbb{R}\)

Real Number Field

\(\mathbb{N}\)

Positive Integer Field

\(\text{$\text{$\text{$\text{$\text{$\text{$\text{$\text{$\text{$\text{$ \text{$\text{$\text{$\text{$\



## References

* (1) [PERSON]; [PERSON]; [PERSON] The maturity of automatic identification systems (AIS) and its implications for innovation. J. Mar. Sci. Eng. **2019**, \(7\), 287. [CrossRef]
* (2) [PERSON]; [PERSON]; [PERSON]; [PERSON] Comprehensive analysis of automatic identification system (AIS) data in regard to vessel movement prediction. J. Navig. **2014**, _67_, 791-809. [CrossRef]
* (3) [PERSON]; [PERSON]; [PERSON] Ship AIS Data Mining and Processing Method in Bridge Waters of Inland River. In Proceedings of the 17 th COTA International Conference of Transportation Professionals, Shanghai, China, 7-9 July 2017; American Society of Civil Engineers: Reston, VA, USA, 2017; pp. 4770-4779. * (4) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Automatic Processing Flow Designed for Ship's AIS Signals. In Proceedings of the 2019 4 th International Conference on Multimedia Systems and Signal Processing, Guangzhou, China, 10-12 May 2019; pp. 125-129. [PERSON]; [PERSON]; [PERSON]; [PERSON] An Anomaly Detection Method for AIS Trajectory Based on Kinematic Interpolation. _J. Mar. Sci. Eng._**2021**, \(9\), 609. [CrossRef]
* (6) [PERSON]; [PERSON]; [PERSON] Ship Trajectories Pre-processing Based on AIS Data. _J. Navig._**2018**, _71_, 1210-1230. [CrossRef]
* (7) [PERSON]; [PERSON] Ship navigation behavior prediction based on AIS data. _IEEE Access_**2022**, _10_, 47997-48008. [CrossRef]
* (8) [PERSON]; [PERSON]; [PERSON] Interpolation-Based Inference of Vessel Trajectory Waypoints from Sparse AIS Data in Maritime. _J. Mar. Sci. Eng._**2023**, _11_, 615. [CrossRef]
* (9) [PERSON]; [PERSON]; [PERSON]; [PERSON] Unsupervised knowledge discovery framework: From AIS data processing to maritime traffic networks generating. _Appl. Ocean Res._**2024**, _146_, 103924. [CrossRef]
* (10) [PERSON]; [PERSON]; [PERSON] Vessel trajectory prediction based on AIS data and bidirectional GRU. In Proceedings of the 2020 International Conference on Computer Vision, Image and Deep Learning (CVIDL), Chongqing, China, 10-12 July 2020; IEEE. Piscataway, NJ, USA, 2020; pp. 260-264. * (11) [PERSON]; [PERSON] [PERSON]; [PERSON]; [PERSON]; [PERSON] Recurrent encoder-decoder networks for vessel trajectory prediction with uncertainty estimation. _IEEE Trans. Aerosp. Electron. Syst._**2022**, _59_, 2554-2565. [CrossRef]
* (12) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] PESO: A Seq2 Seq-Based Vessel Trajectory Prediction Method with Parallel Encoders and Ship-Oriented Decoder. _Appl. Sci._**2023**, _13_, 4307.