# Extension of DBSCAN in Online Clustering: An Approach Based on Three-Layer Granular Models
## 5 Experiment and Discussion
### Synthetic Data
#### 5.1.2 Construction on Interval Granules in Medium Space  
According to the description in Section 4.2, the medium space is constructed by reconstruction errors. Therefore, the memberships of data points to all prototypes are computed firstly. Considering the purpose of medium space is to construct fuzzy rules for online clustering, the reconstruction error is calculated focusing on each cluster. For example, assuming a data point, \(\mathbf{x}\), its membership matrix is calculated as U = \(\{u_{k}\}\). To discuss its affiliation to the \(k\)th cluster, only the memberships relating to granules of Cluster \(k\) are considered, as shown in (20):  
\[u_{k}=[u_{(k-1)*c+1},u_{(k-1)*c+2},\cdots u_{k*c}]; \tag{20}\]  
where \(\mathbf{u}_{k}\) represents the membership matrix to granules belonging to Cluster \(k\). Then, reconstruction errors of the dataset based on \(u_{k}\) are calculated according to Equations (10) \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \(\mathbf{z_{1}}\) & \(\mathbf{z_{2}}\) & \(\mathbf{z_{3}}\) \\ \hline Cluster1 & (0.5507, 0.8299) & (0.1020, 0.4865) & (0.6361, 0.5103) \\ \hline Cluster2 & (0.4456, 0.2005) & (0.8895, 0.5088) & (0.8331, 0.1971) \\ \hline  & G1 & G2 & G3 \\ \hline Cluster1 & [0.4606, 0.6408] \(\times\) [0.6993, 0.9605] & [0.0160, 0.1881] \(\times\) [0.3429, 0.6302] & [0.5487, 0.7236] \(\times\) [0.3354, 0.6852] \\ \hline Cluster2 & [0.3668, 0.5244] \(\times\) [0.0557, 0.3452] & [0.8040, 0.9750] \(\times\) [0.3605, 0.6572] & [0.7584, 0.9078] \(\times\) [0.0471, 0.3471] \\ \hline  & \(\mathbf{z_{4}}\) & \(\mathbf{z_{5}}\) & \\ \hline Cluster1 & (0.3409, 0.9394) & (0.1640, 0.7746) & \\ \hline Cluster2 & (0.3778, 0.5040) & (0.6467, 0.0618) & \\ \hline  & G4 & G5 & \\ \hline Cluster1 & [0.1948, 0.4869] \(\times\) [0.8788, 1.0000] & [0.0861, 0.2420] \(\times\) [0.6489, 0.9004] & \\ \hline Cluster2 & [0.2959, 0.4598] \(\times\) [0.3455, 0.6625] & [0.4993, 0.7941] \(\times\) [0, 0.1237] & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Prototypes and information granules of two clusters (\(c=5\)). Figure 7: Results of granular computing on the toy data. (**a**) Initial IG; (**b**) optimal IG. Where, two clusters are represented by red and green points, noise is represented by blue points. and (11). Based on two moon clusters in the toy data, reconstruction errors of each cluster are calculated independently, and are shown in Figures 8 and 9. In Figures 8 and 9, _Error_is_ and _Error_not_ represent the reconstruction errors of data points belonging/not-belonging to a given cluster, respectively. Four sub-figures show the statistics of reconstruction errors with different numbers of IGs (\(c\) = 5, 10, 15, 20), respectively. It is seen that the distinguishability in the data description is enhanced when the number of IGs increases, which also implies that it is feasible to make use of the reconstruction errors (_Error_is_ and _Error_not_) to form rules for clustering. Figure 8: Statistics of reconstruction errors in Cluster 1. (**a**) \(c\) = 5; (**b**) \(c\) = 10; (**c**) \(c\) = 15; (**d**) \(c\) = 20. Figure 9: Statistics of reconstruction errors in Cluster 2. (**a**) \(c\) = 5; (**b**) \(c\) = 10; (**c**) \(c\) = 15; (**d**) \(c\) = 20. First, according to the distribution of _Error_is_ and _Error_not_, we could construct the interval granules in the medium space as Section 4. It is seen from Figures 8 and 9 that reconstruction errors of points within a cluster (_Error_is_) are mostly close to zero. Therefore, the lower bound of the interval granule is set as 0, and the upper bound is calculated by justifiable granulating methods as Equations (12) and (13). Conversely, it is also seen that the reconstruction errors of data points outside a cluster (_Error_not_) distribute symmetrically. Therefore, the lower bound and upper bound of interval granules can be set symmetrically to the median value, \(y_{m}\).