# Adaptive Hierarchical Density-Based Spatial Clustering Algorithm for Streaming Applications
## 4 Experiment Results and Discussions
### Experiment Setup to Assess the Execution Time Improvement of Adaptive HDBSCAN  
On the basis of execution time for data points less than 840, the Adaptive HDBSCAN was compared with the canonical HDBSCAN. [PERSON]'s approach is used in the canonical HDBSCAN to generate the minimum spanning tree for this number of data points. The minimum-weight edge incident to each vertex of the graph is firstly calculated; then, all of those edges are added to the forest. Subsequently, it repeats a similar process of finding the minimum-weight edge from each tree constructed so far to a different tree, and adding all of those edges to the forest. [PERSON]'s algorithm is used in the Adaptive HDBSCAN, where it works by building this tree one vertex at a time, from an arbitrary starting vertex, at each step adding the cheapest possible connection from the tree to another vertex. The experiment uses the same clusters as before, and the algorithm's execution time is recorded. To ensure uniformity, the experiment was repeated 100 times and the mean value was picked. The experiment was carried out in a python environment on a Macbook Pro with an Apple M1 processor and 8 GB of RAM.  
As shown in Figure 5, the red line represents the Adaptive HDBSCAN, whereas the blue line represents the HDBSCAN. In terms of execution time, the Adaptive HDBSCAN approach proposed in this paper outperforms the regular HDBSCAN algorithm. The [PERSON]'s algorithm implementation in the Adaptive HDBSCAN for building minimum spanning trees is substantially faster than the Boruvka in this use situation. The Adaptive HDBSCAN takes 0.00485 s to complete all clustering throughout the trial, whereas the HDBSCAN takes 0.00511 s to complete all clustering.  
Table 1 shows the execution time comparison for HDBSCAN and the Adaptive HDBSCAN. The Adaptive HDBSCAN approach proposed in this paper outperforms the regular HDBSCAN algorithm on average for data points below 840. The Adaptive HDBSCAN takes 0.00485 s on average to complete all clustering throughout the trial, whereas the HDBSCAN takes 0.00511 s on average to do the same.  
Figure 6 shows the percentage decrease in computation speed for the Adaptive HDBSCAN compared with the HDBSCAN. The percentage improvement in computation speed is calculated by the following formula:  
\[\text{Time taken for HDBSCAN-Time taken for Adaptive HDBSCAN}\times 100\% \tag{7}\]  
The improvements are expressed as a percentage. The maximum performance improvement is 17.5 percent, with a median improvement of 5.31 percent. Given that live streaming data continuously send out frames, this improvement is considerable. When the  
\begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Number of Data Points**} & \multicolumn{2}{c}{**Execution Time (Seconds)**} \\  & **HDBSCAN** & **Adaptive HDBSCAN** \\ \hline
100 & 0.001490 & 0.001397 \\
200 & 0.002667 & 0.002337 \\
300 & 0.003855 & 0.003550 \\
400 & 0.004973 & 0.004591 \\
500 & 0.006595 & 0.006137 \\
600 & 0.007446 & 0.007131 \\
700 & 0.008563 & 0.008794 \\
800 & 0.009830 & 0.009840 \\ \hline \hline \end{tabular}
\end{table}
Table 1: The computation time performance comparison in absolute terms between Adaptive HDBSCAN and HDBSCAN sampled for every 100 data points increment.  
Figure 5: The computation time performance comparison in absolute terms between Adaptive HDBSCAN and HDBSCAN.  
Figure 6: The computation time improvement of Adaptive HDBSCAN compared with HDBSCAN.  
amount of data points is greater than 840, the Adaptive HDBSCAN will generate the least spanning tree using [PERSON]'s algorithm. This is due to the fact that [PERSON]'s algorithm works better with a bigger number of data points. As a result, the Adaptive HDBSCAN takes advantage of all of the advantages of the original HDBSCAN while also improving the algorithm in regions where it slows down.