## 2 Design of the CGK-Based Fuzzy Granular Model  
### Context-Based GK Clustering  
Clustering [35] is a method of data mining by defining a data group (cluster) in consideration of the characteristics of the given data and finding representative points of the data group. GK clustering [36] is a method of generating clusters considering the geometric attributes of data. However, it has the problem that only the data characteristics in the output space can be reflected because it only considers the data characteristics in the input space. Context-based GK clustering generates clusters by considering data characteristics in the output space. Figure 1 describes the concept of context-based GK clustering.  
The context generated in the output space can be expressed as follows:  
\[D:T\ \rightarrow\ [0,\ 1] \tag{1}\]  
where \(D\) denotes the data in the output space. Assuming that there is a context generated considering the characteristics of data in the output space, \(f_{k}=T(d_{k})\) expresses the degree of the context belonging to the \(k\)th data.  
GK clustering generates clusters by using Equation (2) for the Mahalanobis distance between the centroid of the cluster and random data:  
\[d_{GK}^{2}(x_{k}-v_{i})=\|x_{k}-v_{i}\|_{A_{i}}^{2}=(x_{k}-v_{i})^{T}A_{i}(x_{ k}-v_{i}) \tag{2}\]  
where \(A_{i}\) denotes the matrix that has the fixed constant \(det(A_{i})=\rho_{i}\) for each \(i\). GK clustering can consider even the data in the local part by expanding the concept of FCM clustering by using \(d_{GK}^{2}(x_{k},\ v_{i})\) so that various clusters of geometric shapes can be generated. The objective functions of GK clustering are expressed as Equations (3)-(5):  
\[J_{m}^{GK}(\mu,\ v)=\sum_{k=1}^{n}\sum_{i=1}^{c}u_{ik}^{m}d_{GK}^{2}(X_{k},\ v_{i}) \tag{3}\]  
\[v_{i}=\frac{\sum_{k=1}^{n}u_{ik}^{m}x_{k}}{\sum_{k=1}^{n}\mu_{ik}^{m}} \tag{4}\]  
\[\mu_{ik}=\frac{\|x_{k}-v_{i}\|_{A_{i}}^{\frac{m^{2}}{2}}}{\sum_{j=1}^{c}\|x_{ k}-v_{i}\|_{A_{j}}^{\frac{m^{2}}{2}}} \tag{5}\]  
Various clusters of geometric shapes are created in each context generated in the output space by repeating Equations (3)-(5).  
Figure 1: Concept of context-based GK clustering.  
* [Step 1] The number of contexts to be generated in the output space and the number of clusters to be generated in each context are selected, and then the degree of the geometric shape \(\varepsilon\) is selected, which \(\varepsilon\) must be larger than zero. The membership matrix \(U\) is initialized to a value between 0 and 1.
* [Step 2] A method of generating context in the output space is selected between two methods: uniformly generating contexts with a constant size; and flexibly generating in different sizes based on the Gaussian probability distribution. Contexts are generated by selecting one of these two methods.
* [Step 3] The centroid and membership matrix of the cluster is calculated in each context using Equation (4).
* [Step 4] The objective function of context-based GK clustering is calculated using Equations (3) and (6). The above process is repeated if the estimated value is larger than the previous value, and the above procedure is stopped if the calculated value is smaller than the last value.  
\[\|\mu^{t}-\mu^{t-1}\|\ \leq\ \varepsilon \tag{6}\]