## 3 Improved DBSCAN Algorithm Based on Sparrow Search Algorithm
### Algorithm Pseudocode and Flowchart
The R15 and spiral datasets comprise uniformly dense, single-shape collections of data. These are datasets in which density-based clustering algorithms perform well. These four algorithms all accurately identify correctly clustered data. However, the KANN-DBSCAN and DBSCAN algorithms mistakenly classify a small number of points as noise, failing to reach the optimal performance. The AF-DBSCAN algorithm experiences a merging of central clusters, which cannot be recognized. On this kind of dataset, all five algorithms perform well, with SSA-DBSCAN yielding optimal performance. The flame dataset consists of two different shapes of graphics, both of which exhibit uniform density. On this particular dataset, the KANN-DBSCAN algorithm exhibits merely moderate effectiveness despite its commendable results on different collections of data. The AF-DBSCAN algorithm, similar to the KANN-DBSCAN algorithm, mistakenly classifies the clusters as noise. On this type of dataset, the SSA-DBSCAN algorithm outperforms all others, followed by the RNN-DBSCAN and DBSCAN algorithms. In summary, the SSA-DBSCAN algorithm achieves better clustering results compared to other algorithms that adaptively optimize DBSCAN parameters. For density-uneven datasets with a narrow optimal solution range, it can still perform effective clustering. Therefore, the SSA-DBSCAN algorithm can be applied to more types of datasets, and its accuracy is improved compared to the DBSCAN algorithm. ### UCI Dataset Experiments

Table 2 shows the clustering results of SSA-DBSCAN and four comparative algorithms on UCI real-world datasets, with the best values highlighted in bold. The iris dataset is a 4D dataset consisting of 150 objects in three categories. Based on the evaluation values ACC, AMI, and ARI, both SSA-DBSCAN and AF-DBSCAN achieve good results, with SSA-DBSCAN performing the best, followed by AF-DBSCAN. The other algorithms perform at a similar level. The wine dataset is a thirteen-dimensional dataset containing 178 objects from three classes. From the perspective of clustering outcome metrics ACC, AMI, and ARI, the RNN-DBSCAN algorithm performs the best, while the second best one is the DBSCAN algorithm. The evaluation indicators for several other algorithms all exceeds 0.6. The sym dataset is a 2D dataset consisting of 350 objects from three classes. Based on the clustering evaluation metrics ACC, AMI, and ARI, all four algorithms demonstrate good clustering performance. The best-performing algorithm is the SSA-DBSCAN algorithm, while the remaining four algorithms show comparable results. The seeds dataset is a seven-dimensional dataset containing 210 objects from three classes. According to the clustering metrics ACC, AMI, and ARI, the RNN-DBSCAN algorithm performed the best, while the other four algorithms demonstrated comparable results

The zoo dataset is a sixteen-dimensional dataset consisting of 101 objects from seven classes. Based on the clustering evaluation metrics ACC, AMI, and ARI, the SSA-DBSCAN algorithm demonstrates the best clustering results, while the second best one is the RNN-DBSCAN algorithm. The remaining three algorithms show similar results. The Bank dataset is a four-dimensional dataset containing 1372 objects from two classes. Based on the clustering evaluation metrics ACC, AMI, and ARI, SSA-DBSCAN achieves the highest performance, with RNN-DBSCAN ranking next. The other three algorithms yield comparable results. The ecoli dataset is an eight-dimensional dataset with 336 objects from seven classes. According to the evaluation metrics ACC, AMI, and ARI, SSA-DBSCAN provides the best performance, followed by RNN-DBSCAN. The other three algorithms show similar results. In conclusion, SSA-DBSCAN performs well in clustering multi-dimensional real-world datasets without the need for inputting parameters throughout the process. It outperformsother DBSCAN algorithms with adaptive parameters, showing strong performance on low- and mid-dimensional datasets.