# Extension of DBSCAN in Online Clustering: An Approach Based on Three-Layer Granular Models
## 5 Experiment and Discussion
### Spatial Benchmark Data  
Furthermore, to study the generalization ability of the proposed method, especially the superiority of the proposed method on spatial data online clustering, a typical spatial data (4.8k dataset) is considered here, namely the Chameleon dataset [50]. This dataset contains totally 8000 data points, and two attributes are generally taken for experiments. Figure 10 shows the distribution of Chameleon data. It is seen from Figure 10a that this dataset has some nested shapes which are not linearly-separable. Therefore, density-based models can be applied for its clustering in the literature [41], e.g., DBSCAN is used in this paper. The results are shown in Figure 10b, where six shaped clusters are obtained. According to the description in Section 3, each cluster is taken for study individually, and the optimal prototypes of IGs are presented in Table 5.  
For the sake of convenience on the presentation and visualization, the results of Table 5 are based on a specific number of granules, i.e., \(c=5\) in each shaped cluster. Then, based on these optimal prototypes and the mentioned procedures of GrC, granules in each structural cluster are constructed, shown in Figure 10b. It is seen that these granules construct the skeleton of data distribution, and effectively describe the data structure of the spatial data. The noise data (anomaly data) outside the normal distribution are effectively excluded, which is also the superiority of the proposed method to other clustering methods (such as \(k\)-means, FCM). Then, according to granules in the input space, granular fuzzy rules in the medium space can be correspondingly constructed and prepared for online clustering. By utilizing justifiable granulating on the reconstruction error metric, granular intervals for determining if a data point belongs to a given cluster or not are computed. The results are presented below. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **C-DBSCAN** & **G-DBSCAN** & **Proposed Approach** & **Online \(k\)-Means** & **Online W-\(k\)-Means** \\ \hline Acc. & 0.9450 & 0.9330 & 0.9520 & 0.8947 & 0.9058 \\ \hline Time & 0.2279 & 0.1712 & 0.0927 & 0.0632 & 0.0675 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Performance comparison on different online clustering methods. Figure 10: Distribution of data in Chameleon dataset. **(a)** Original data distribution; **(b)** DBSCAN clustering result. Table 6 shows the granular rules for determining the data points' belonging. Here, IG\({}_{\text{y}}\) and IG\({}_{\text{n}}\) also represent the optimal granular intervals of data included and not included in a specific cluster, respectively. Comparing these results with that of Table 2, it is seen that granular intervals via the reconstruction error metric in Chameleon data have better distinguishing ability, which may be because of its more obvious spatial structures. Moreover, Cluster 4 and Cluster 6 perform the best among all the clusters; the other clusters keep some small fuzzy regions with uncertainty for online clustering. Finally, with the combination of structural IGs in input space and granular rules in medium space, we could complete rule-based modeling as (15). Then, the online clustering on 1000 testing points is evaluated. The numerical results of performance metrics are presented below. In Table 7, the results of several different online clustering on Chameleon data are presented. Firstly, for the proposed granule-based method, different amounts of granules are compared for discussion. By setting the same number of granules in each cluster, granules in the input and medium space are constructed for rule-based modeling, and are subsequently used to guide online clustering. From the comparative results, it is found that the accuracy of the proposed method on online clustering increases as more granules are used for modeling; meanwhile, the computation time also increases as well. Therefore, a trade-off should be made for selecting the optimal parameters in real applications.