## 4 Application of the Hierarchical Trajectory Clustering Algorithm  
The results of the 776 ship trajectories extracted through the data purification process are shown in Figure 12a. When the similarity between the trajectories was calculated using MHD, the result was 776 \(\times\) 776, as shown in Figure 12b. Applying the DBSCAN algorithm reduced the dimensionality using PCA to create a 2 \(\times\) 776 dataset that is easy for cluster analysis. The results are presented as a scatter plot in Figure 12c. The cluster results were confirmed when cluster analysis was performed using the DBSCAN algorithm proposed in this study, as shown in Figure 12d. As a result of the first cluster, six clusters, including the noise cluster, were confirmed by drawing them on the survey area, as shown in Figure 13.  
As a result of the first DBSCAN cluster analysis, a sub-route clustering process was performed based on five cluster datasets, excluding the noise cluster. The sub-route clustering process for Cluster 1 is as follows: As shown in Figure 14, Cluster 1 has data intervals from data groups 1 to 5 and 46 to 50 that are above average and show a continuous increase in data intervals. Therefore, DBSCAN cluster analysis is performed on Cluster 1 data. As a result of the reanalysis of Cluster 1 in the first DBSCAN cluster analysis, as shown in Figure 15, the density of Cluster 1-1 increased to 52.8%, and because there was no continuity in the increase or decrease in the distance between the group data, Cluster 1-1 was adopted. The density of Cluster 1-2 increased to 49.99%, and the distance increase or decrease between group data did not show continuity; therefore, Cluster 1-2 was adopted, and the DBSCAN cluster analysis for Cluster 1 was terminated. Based on the results of the five initial DBSCAN cluster analyses, excluding the noise cluster, the criteria for reanalysis and adoption of Cluster 1 of the initial DBSCAN cluster analysis were met, and Cluster 1-1 and Cluster 1-2, including the noise cluster, were obtained. Cluster 1 was adopted, and Cluster 2 included Cluster 2-1 and Cluster 2-2, including the noise cluster. In the case of Cluster 3, the noise cluster and Cluster 3-1-1 were adopted through two reanalysis processes. Cluster 4 did not meet the reanalysis criteria, so Cluster 4, the result of the initial DBSCAN, was adopted, and there was no  
Figure 11: Total area occupied by data group. reanalysis process. Cluster 5 included Cluster 5-1 and Cluster 5-2, including the noise cluster. Figure 16 shows the results of all processes. Figure 12: Results of data preprocessing and DBSCAN clustering. (**a**) 776 trajectories extracted through the data-cleaning process. (**b**) Similarity results measured using the MHD technique. (**c**) Scatterplot of data after dimensionality reduction of similarity results using PCA. (**d**) Scatterplot of DBSCAN clustering results. Figure 13: Clustering results reflected in the surveyed sea area. Figure 14: Check the distance between data in Cluster 1. (**a**) First of five clusters. (**b**) Graph showing distance between data in Cluster 1 as a scatterplot. (**c**) Graph showing the largest gap value among distances between data. Figure 15: Sub-route clustering results of Cluster 1. (**a**) Data density of Cluster 1. (**b**) Noise cluster among DBSCAN cluster analysis results of Cluster 1. (**c**) First cluster and data density among DBSCAN cluster analysis results of Cluster 1. (**d**) Second cluster and data density among DBSCAN cluster analysis results of Cluster 1. (**e**) Distance results between data in Cluster 1-1. (**f**) Distance results between data in Cluster 1-2. An initial DBSCAN clustering analysis was performed on a dataset of 776 ship trajectories extracted through a data refinement process. The dataset was preprocessed using MHD for trajectory similarity measurements and PCA for dimensionality reduction. The DBSCAN algorithm parameters were set to Epsilon = 0.010288 and MinPts = 41, resulting in six clusters, including noise clusters.