## 4 PER-SAC based Optimal Parameter Autotuning for DBSCAN
### PER-SAC Algorithm
Based on the above results, it can be seen that the optimal parameters obtained by the PER-SAC algorithm-based autotuning framework can effectively improve the clustering accuracy and stability of DBSCAN on spatial-temporal trajectory data compared with the state-of-the-art algorithms. This is attributed to the fact that the combination of PER and SAC effectively improves the optimal-searching performance and the robustness of DRL. Moreover, the framework can autotune optimal parameters of DBSCAN with almost no human effort. ### Overall Performance Comparison

In the previous experiments, datasets are preprocessed according to the methods described in Sections 3.3 and 5.1 for the evaluation of algorithms. However, the proposed STRP-DBSCAN algorithm includes a preprocessing step for datasets, while other algorithms do not involve such steps. In this part, we use the original labeled 12K and 5-classified spatial-temporal trajectory dataset without preprocessing to evaluate the overall performance of STRP-DBSCAN with the PER-SAC-based parameter autotuning framework. The same dataset is also evaluated on KANN and TD3-DBSCAN in terms of clustering accuracy and execution time to conduct the comparison. Table 9 shows the overall performance comparison results. Through the preprocessing step, STRP-DBSCAN screens and removes 28.8% of irregularities in the original dataset. Therefore, compared with other two algorithms, the proposed STRP-DBSCAN with PER-SAC has further optimized the clustering accuracy and clustering time on the original trajectory dataset. According to Table 9, the proposed STRP-DBSCAN with PER-SAC improves the accuracy of NMI and ARI by 14.03% and 39.80% compared to KANN, and by 3.71% and 8.82% compared to TD3-DBSCAN, respectively. Since KANN adopts a cyclic iterative optimization strategy for parameter searching, it takes a very long time to find the optimal parameters of DBSCAN, which costs about 10 h in the experiments and is completely uncompetitive. Compared with TD3-DBSCAN, STRP-DBSCAN with PER-SAC improves the clustering efficiency by 25.60% in term of the total execution time of the algorithms. Figure 11 shows the visualization results of the clustering effect of the evaluated algorithms, which is more intuitive. It can be seen that the clustering result of the proposed STRP-DBSCAN with PER-SAC is significantly better than KANN. It also outperforms TD3-DBSCAN in terms of clustering accuracy. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Item** &
\begin{tabular}{c} **STRP-DBSCAN +** \\ **PER-SAC** \\ \end{tabular} & **KANN [25]** & **TD3-DBSCAN [31]** \\ \hline NMI & 0.9207 & 0.8074 & 0.8878 \\ ARI & 0.9194 & 0.6577 & 0.8449 \\ Total execution time & 342.05 s & About 10 h & 429.6 s \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Overall performance comparison with the original labeled 12K and 5-classified AIS dataset. ## 6 Conclusions

In this paper, the parallel DBSCAN algorithm for spatial-temporal trajectory data is revisited. A STRP-DBSCAN algorithm based on spatial-temporal random partitioning is proposed. The algorithm reduces the noise points in the original dataset through data preprocessing and introduces the idea of temporal partitioning on the basis of the state-of-the-art RP-DBSCAN algorithm, which divides the data points into more balanced partitions in both spatial and temporal attributes. Therefore, it further enhances the execution efficiency of the parallel DBSCAN algorithm to a certain extent. In addition, the PER-SAC algorithm is proposed, which combines the prioritized experience replay mechanism and SAC algorithm to search the optimal clustering parameter. Based on PER-SAC, an optimal parameter autotuning framework is realized to efficiently autotune the optimal DBSCAN clustering parameters, which improves the clustering accuracy of the spatial-temporal trajectory data.