## 5 Experimental Results  
Before conducting the clustering analysis, we randomly selected approximately 300 data points to compare the clustering performance of HDBSCAN and DBSCAN (Table 4). During the computation, we recorded the \(eps\) and \(minPts\) parameter settings and observed the variations in clustering results. The experimental results indicate that DBSCAN is highly sensitive to changes in the \(eps\) parameter, requiring multiple manual adjustments to achieve optimal results. In contrast, HDBSCAN converges quickly and produces stable clustering results, demonstrating its parameter robustness and applicability. This study utilized AIS data from the waters off the central Taiwan port, covering a single day with approximately 557,000 records. After filtering, cleaning, and compressing, the dataset was reduced to 293,000 records, comprising 386 trajectory segments, with an average of approximately 756 data points per segment, which served as the reference for minimum clusters. We selected three-dimensional spatial features of coordinates and heading, as shown in Figure 3. Before optimization, the dataset consisted of X and Y axes representing latitude and longitude coordinates and the Z axis corresponding to heading angles. The figure highlights a yellow vertical region indicating outlier data points in the heading distribution, which could significantly impact clustering calculations. Further analysis revealed that these outliers originated from stationary vessels inside and outside the Taichung port area. To improve clustering performance, we removed data points corresponding to vessels with speeds below 3 knots to eliminate noise from docked or slow-moving ships. Since longitude, latitude, and heading have different scales, we performed normalization of the three-dimensional data, converting them to a standardized range between 0 and 1 to ensure consistency in clustering calculations. Finally, we applied HDBSCAN's hierarchical density-based clustering to complete the clustering process. HDBSCAN's adaptive density thresholding ensured clustering stability while eliminating the need for manual parameter tuning required by DBSCAN, improving clustering accuracy and applicability. The clustering results contained labels [\(-\)1, 0, 1, 2, 3, 4, 5, 6, 7], where eight clusters were valid groups and \(-\)1 represented noise points. The number of noise points was 37,367, accounting for 12.7% of the total dataset. After clustering, we removed noise points and visualized the results by mapping different clusters with distinct colors in a 3D distribution plot (Figure 4) and a 2D trajectory cluster map (Figure 5). \begin{table}
\begin{tabular}{c c c} \hline  & **HDBSCAN** & **DBSCAN** \\ \hline \(SC\) & 0.222 & 0.142 \\ \hline \(DBI\) & 1.369 & 1.433 \\ \hline \end{tabular}
\end{table} 
Table 4: Silhouette Coefficient and Davies–Bouldin Index result. Figure 4: Different colors clearly represent distinct HDBSCAN clustering results. Figure 3: The low-speed data points distributed vertically at specific coordinates. Through visual inspection, we could clearly observe navigation patterns and cluster distributions, such as high-density maritime areas and fixed routes. Beyond visual inspection, we further assessed the clustering results using two evaluation metrics--the Silhouette Coefficient (SC) and the Davies-Bouldin Index (DBI). * The DBI measures the compactness within clusters and the separation between clusters, where lower values indicate better clustering quality. * SC evaluates the similarity of a single data point to its own cluster relative to the nearest neighboring cluster. SC values range from \(-1\) to \(1\), with higher values indicating that data points are closer to their own cluster center and further from other clusters, signifying better clustering performance. As shown in Table 3, HDBSCAN achieved a DBI of 1.369 (lower than DBSCAN's 1.433) and an SC of 0.222 (higher than DBSCAN's 0.142). This indicates that HDBSCAN exhibits better cluster compactness and overall superior clustering performance.