# A Design of CGK-Based Granular Model Using Hierarchical Structure
## 3 IG Creation and Granular Model Design
### CGK-Based Granular Model Design  
GK granular models are designed to adopt CGK clustering that considers the output space, to create context-shaped IGs in the output space and create geometrically-shaped clusters in each context. Figure 10. presents the structure of a GK granular model in which three contexts are created in the output space and three clusters are created in each context. As illustrated in the figure, there are conditional and conclusion variables. The conclusion variables represent the context-shaped IGs that are created in the output space, while the conditional variables represent the centers of the clusters that are created in each context, i.e., IGs that are created in the input space. As mentioned above, a uniform creation method and a flexible creation method can be adopted to create the contexts in the output space. The GK granular model's final output value Y is calculated using Equation (27). \[Y=\sum_{\oplus}W_{t}\otimes z_{t} \tag{27}\]  
Figure 10: CGK-based granular model structure. Here, the addition and multiplication symbols \(\oplus\), \(\otimes\) represent the completed addition and multiplication operations for the IGs, respectively. Fuzzy sets are created during the process of handling the GK granular model conditions. At this point, the clusters created via CGK clustering can be represented by the GK granular model's hidden layer. The area between the hidden and output layers is expressed as a context that can be described linguistically. The sum, which is the GK granular model's final output, can be expressed using all contexts as expressed in Equation (28):  
\[ \begin{split} Y=(z_{11}\otimes A_{1}\oplus z_{12}\otimes A_{1} \oplus\ldots\oplus z_{1n1}\otimes A_{1})\ \oplus\ (z_{21}\otimes A_{2}\oplus z_{22}\otimes A_{2}\oplus\ldots\oplus z_{2n2}\otimes A _{2})\\ \oplus\ldots(z_{c1}\otimes A_{c}\oplus z_{c2}\otimes A_{c}\oplus \ldots\oplus z_{cnc}\otimes Ac)\end{split}  \tag{28}\]  
The GK granular model's final output is expressed as a triangle-shaped context, and it can be expressed as a fuzzy set:  
\[Y_{i}=\ \left(y_{i}{}^{-},\ y_{i},\ y_{i}{}^{+}\right) \tag{29}\]  
where \(y_{i}{}^{-},\ y_{i}{}^{+}\) and \(y_{i}{}^{+}\) denote the GK granular model's lower bound, model, and upper bound values, respectively, and they refer to each of the triangle-shaped context's points. The lower bound, model, and upper bound values can be expressed by Equations (30)-(32):  
\[y_{i}{}^{-}=\ \left(z_{11}a_{1}+z_{12}a_{1}{}^{-}+\ldots+z_{1n1}a_{1}{}^{-} \right)\ +\ldots\left(z_{c1}a_{c}{}^{-}+z_{c2}a_{c}{}^{-}+\ldots+z_{cnc}a_{c}{}^{-}\right) \tag{30}\]  
\[y_{i}=\ \left(z_{11}a_{1}+z_{12}a_{1}+\ldots+z_{1n1}a_{1}\right)\ +\ldots\left(z_{c1}a_{c}+z_{c2}a_{c}+\ldots+z_{cnc}a_{c}\right) \tag{31}\]  
\[y_{i}{}^{+}=\ \left(z_{11}a_{1}+z_{12}a_{1}{}^{+}+\ldots+z_{1n1}a_{1}{}^{+} \right)\ +\ldots\left(z_{c1}a_{c}{}^{+}+z_{c2}a_{c}{}^{+}+\ldots+z_{cnc}a_{c}{}^{+}\right) \tag{32}\]  
When CGK clustering is performed, the membership matrix \(U\) can be expressed as values between zero and 1, while the membership matrix's requirements can be expressed as:  
\[U(f)=\left\{eqalign_{ik}\in\ \left[0,\ 1\right]\mid\sum_{i=1}^{c}u_{ik}=f_{k} \ \forall\ k\ \ \text{and}\ \ 0<\sum_{k=1}^{N}u_{ik}<N\right\} \tag{33}\]  
Here, the contexts are created by uniformly or flexibly dividing the output space into fuzzy set shapes. The GK granular model's structure is as follows. In the input layer, data is received and enters the GK granular model. The activation layer is the cluster activation step in which clusters that correspond to the contexts that were created in the output space are created in the input space. The conditional layer performs conditional clustering in each context. The activation and conditional layers are connected, and the data information is adopted in GK clustering when a context is provided. The GK granular model is focused on the activation and conditional layers.