# Collision Avoidance Behavior Mining Model Considering Encounter Scenarios
## 3 Results
### Comparative Analysis  
First, the vessel's trajectory is arranged in chronological order. For convenience in calculations, the initial timestamp is set to 0. To ensure the accuracy of the discrete trajectory curvature calculation and address the issue of AIS data synchronization, cubic spline interpolation with a 20 s interval is applied to fill in the missing points in the trajectory. This also synchronizes the various types of information within the vessel's trajectory. The interpolation trajectories and their corresponding trajectory point course changes are shown in Figures 9 and 10. Also, partial data of the ship's trajectory points are shown in Table 1.  
According to the trajectory course change over time shown in Figures 9 and 10 and Table 1, trajectory 1 experiences a significant course change in the time period [1000, 1500], indicating the initiation of a turning maneuver. After a period of stabilization, the ship resumes its course and performs another turn to return to its original heading within the time interval of [2500, 3000]. Trajectory 2 changes direction for the first time within the time interval of [3000-3500] and returns to its original course within the time interval of [4000-5000]. Therefore, both trajectories can be used as cases for validating the effectiveness of the collision avoidance behavior identification algorithm. Figure 9: Illustration of trajectory 1. (**a**) The effect of trajectory 1 repair based on cubic spline interpolation. (**b**) The course change of trajectory 1. The DP compression algorithm is used to identify the turning points of the vessel's trajectory. Because the distance threshold of the DP algorithm significantly influences its performance, two sets of experiments with distance thresholds of 0.001 and 0.0001 were selected after multiple trials to verify the effectiveness of the algorithm. The results of turning point identification using the DP algorithm are shown in Figures 11 and 12. Figures 11 and 12 show the results of the DP algorithm for identifying ship turning points, with the pentagrams representing the earliest turning points identified by the algorithm. From the figure, it can be seen that the DP algorithm is generally able to capture the overall trend of the ship's trajectory and the changes in its heading. Moreover, as the distance threshold decreases, the algorithm retains more trajectory information. In order to obtain the ship's earliest turning moment, the earliest retained point in chronological order is considered the ship's first turning point. When the distance threshold is 0.001, the figure shows the key points of the ship's trajectory retained, along with the corresponding headings at each position. In Figure 11, the earliest turning point identified by the algorithm occurs at 1243 s, with a course of 198.585579\({}^{\circ}\). In Figure 12, the earliest turning point occurs at 2042 s, with a course of 297.603378\({}^{\circ}\). When the distance threshold is 0.0001, more trajectory information was retained by DP algorithm, but it also retained some noise points. In Figure 11, the earliest turning point occurs at 721s, with a course of 206.121105\({}^{\circ}\). In Figure 12, the earliest turning point occurs at 200s, with a course of 307.380625\({}^{\circ}\) \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Case** & **Timestamp (s)** & **Course (\({}^{\circ}\))** & **X/Lon** & **Y/Lat** \\ \hline \multirow{3}{*}{Trajectory 1} & 20 & 202.124383 & 123.046201 & 30.267782 \\  & 1864 & 190.868942 & 123.021663 & 30.196637 \\  & 3227 & 202.923095 & 123.009269 & 30.139435 \\ \hline \multirow{3}{*}{Trajectory 2} & 20 & 308.001864 & 123.195874 & 30.160090 \\  & 2923 & 289.870464 & 123.009576 & 30.273177 \\ \cline{1-1}  & 3143 & 307.604971 & 122.989363 & 30.282277 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Partial data of the ship’s trajectory points. Figure 10: Illustration of trajectory 2. (**a**) The effect of trajectory 2 repair based on cubic spline interpolation.