# Extension of DBSCAN in Online Clustering: An Approach Based on Three-Layer Granular Models
## 4 Methodology of the Proposed Three-Layer Granule Models
### Granulating in the Medium Space
#### 4.2.2 Justifiable Granulating  
Since the medium space constructed by reconstruction error is one dimension, the granules in this hidden layer are intervals. To construct suitable granule models, the size of interval granules is required to be optimal, which is actually decided by the bound of intervals according to (8). In [46], a method of constructing interval information granules was proposed, called justifiable granulating. It also utilized Equations (6), (7), and (9) to find the optimal granule size. Contrary to high-dimensional granules, no prototypes are chosen in interval granules. Therefore, the median of data is chosen as the numerical representation in [46], and regarded as prototypes of interval granules. Then, the size vectors, \(S=[\varepsilon^{+},\varepsilon^{-}]\) (lower and upper bound, respectively), are calculated by Equations (6), (7), and (9). Since two parameters, \(\varepsilon^{+},\varepsilon^{-}\), need to be decided in \(S\), two objective functions are given out in Equations (12) and (13):  
\[V(\varepsilon^{+})=f_{1}(card\big{\{}x_{k}\in[y_{m  
where the inference is described as: if the fact (_premise_) is given out, then the _conclusion_ can be determined. Therefore, Equation (14) is also called as IF-THEN rule-based form.  
According to the above concept, rules could be established connecting the medium space and the output space. The conclusion is certainly the cluster label in the clustering problem. The premise in this paper is decided in the medium space. Taking each data point as the study object independently, it is determined to belong to a cluster in the output space or not. Therefore, for a given cluster, any data point is distinguished into belonging and not-belonging, and these naturally correspond to two rules. To express these rules concretely, interval granules constructed by reconstruction errors in the medium space are considered. The final rules of a rule-based model for clustering are formed as below:  
\[\begin{array}{l}R_{i}:\ IF\ Rec(x_{k})\ is\ in\ IG_{i,1},\ THEN\ x_{k}is\ in\ C_{i};\\ IF\ Rec(x_{k})\ is\ in\ IG_{i,0},\ THEN\ x_{k}is\ not\ in\ C_{i};\end{array} \tag{15}\]  
where \(C_{i}\) represents the \(i\)th cluster; \(R_{i}\) represents the rule library of cluster \(C_{i}\); \(Rec(x_{k})\) is the reconstruction error of \(x_{k}\) based on \(IG\)s in cluster \(C_{i}\); \(IG_{i,1}\) is the interval granule consisting of all points in cluster \(C_{i}\); and \(IG_{i,0}\) is the interval granule involving all points outside of cluster \(C_{i}\). If the reconstruction error locates in the interval granule of belonging to a cluster, then the final cluster label is determined. The flow sketch of online clustering is shown in Figure 4.  
According to Figure 4, the process of online clustering is described. First, for new testing data, its memberships to granules in the input space are calculated. Then, its reconstruction error based on different clusters is calculated in the medium layer. Finally, according to the established rules library in (15), the data point is determined to the corresponding cluster, and its cluster label is the output. Since the whole process is based on memberships and fuzzy rules, the online clustering approach is also called the fuzzy rule-based model.