# Optimal Prediction of Individual Vessel Trajectories Based on Sparse Gaussian Processes
## 5 Experiments
### Data Preprocessing  
The AIS data frequently experience random noise and there are missing data. To improve the dependability and user-friendliness of the AIS data, it is necessary to implement a preprocessing procedure. The AIS data were transformed into trajectory data, which included the maritime mobile service identity (MMSI), latitude, longitude, and time index. During the filtering process, a significant amount of inaccurate information is eliminated. Furthermore, the AIS data that had been decreased in size were organized into behavior sequences using the MMSI and time index variables to extract individual trajectories. Due to the irregular time intervals of the AIS data, it was necessary to use an interpolation procedure to fill in missing positions in the extracted trajectories. The study utilized a spline function to interpolate dynamic information, such as the latitude and longitude of target ships, at 1 min intervals [28]. The interpolation interval was determined by taking into account the prediction of trajectories that contain curved segments. The interpolated trajectories were categorized into inbound and outbound groups to optimize the training of the prediction model. The trajectory dataset is partitioned into training, validation, and test datasets. The split ratio for the training dataset was set to 0.7, while the validation and test datasets were split with ratios of 0.15 each. The trajectories of the test dataset and the location of the collision accident in Table 3 are plotted together on a geographic coordinate system, as depicted in Figure 3.  
Figure 3 depicts the movement of inbound trajectories over time, which is from the bottom left to the top right. Conversely, the outbound trajectories move in the opposite direction. The spatial distribution of the collision locations corresponds to the pattern described in Table 3, progressing from the upper right to the lower left. Figure 3 illustrates that the entrance of Mokpo Port, located at the upper-right position, was responsible for 67% of all collisions, indicating the greatest likelihood of collision. To unify the units of vessel locations, latitude and longitude from geographic coordinates were converted to local Cartesian coordinates \(x\) and \(y\). The local \(x\) and \(y\) coordinates are aligned in the east and north directions, respectively. Because the modeling for trajectory prediction is performed separately by dimension and direction, four datasets, \(x_{IN}\), \(y_{IN}\), \(x_{OUT}\), \(y_{OUT}\), each consisting of explanatory and response variables, were prepared.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Index**} & \multicolumn{2}{c}{**Location**} & \multirow{2}{*}{**Date**} & \multirow{2}{*}{**Vessel Type**} \\ \cline{2-2} \cline{4-5}  & **Latitude (\({}^{\circ}\))** & & & \\ \hline
1 & 34.7667 & 126.3000 & 16 June 2017 & Towing vessel/Fishing boat \\
2 & 34.7656 & 126.2928 & 14 May 2017 & Passenger ship/Fishing boat \\
3 & 34.7639 & 126.2861 & 2 Feburary 2017 & Cargo vessel/Towing vessel \\
4 & 34.7500 & 126.2667 & 25 December 2015 & Fishing boat/Fishing boat \\
5 & 34.7478 & 126.2631 & 7 April 2014 & Fishing boat/Fishing boat \\
6 & 34.7303 & 126.2328 & 16 May 2020 & Fishing boat/Fishing boat \\
7 & 34.5839 & 126.2231 & 23 August 2015 & Cargo vessel/Fishing boat \\
8 & 34.5314 & 126.1389 & 20 January 2017 & Cargo vessel/Cargo vessel \\
9 & 34.5247 & 126.1356 & 4 April 2017 & Fishing boat/Fishing boat \\ \hline \hline \end{tabular}
\end{table}
Table 3: Occurrences of vessel collision accidents in the vicinity of Mokpo Port for 10 years (2011–2021).