## 3 ANFIS with an Incremental Tree Structure Based on the CFCM Clustering Method
### CFCM-Clustering-Based Rule Creation Method  
CFCM clustering is a tool proposed by [PERSON] [40] to construct clusters and partition clusters in order to maintain pattern characteristics related to output variable similarities, as well as input space data. In the output variables, a traditional clustering approach does not take patterns into account but generates only clusters using the Euclidean distance between the centroid cluster and the input data. In comparison, by taking into account not just the pattern of input data but also the pattern of output variables, the CFCM clustering approach generates a cluster, facilitating more detailed space segmentation than the conventional clustering method.  
The variations between FCM clustering and the strategies of CFCM clustering are seen in Figure 3. The FCM clustering approach produces two clusters if there is data in the input space, so it gives an initial centroid value and then uses the Euclidean distance between the middle and the data. The CFCM clustering process, by comparison, takes into account the output variable patterns and generates three clusters by taking into account the black and white characteristics of the data in the input space. Next, the CFCM clustering process procedures are defined.  
Step 1: Let \(m\ (1<m<\infty)\) and set the number of clusters, \(c\ (2\leq c\leq n)\).  
Step 2: Set the initial partition matrix \(U\) and the threshold value \(\varepsilon\), and select the number of repetitions:  
\[U\Big{(}\big{[}u_{ij}\big{]}\ i=1,\ \ldots,\ c,\ j=1,\ \ldots,\ n\Big{)} \tag{13}\]  
Step 3: Compute the center of each cluster, \(c_{i}\ (i=1,\ 2,\ \ldots,\ c)\), using the membership matrix \(U\):  
\[c_{i}=\ \frac{\sum_{j=1}^{n}u_{ij}^{m}x_{j}}{\sum_{j=1}^{n}u_{ij}^{m}} \tag{14}\]  
Step 4: The partitioning matrix \(U\) is modified with the center value of cluster \(c\):  
\[u_{ij}=\ \frac{f_{j}}{\sum_{k=1}^{c}\Big{(}\frac{d_{ij}}{d_{kj}}\Big{)}^{2/(n-1)}} \tag{15}\]  
Figure 3: Comparison of clusters between fuzzy C-means (FCM) and context-based FCM clustering methods: (**a**) FCM clustering method and (**b**) Context-based fuzzy C-means (CFCM) clustering method.  
here, \(f_{j}\) represents \(x_{j}^{\prime}\)'s degree of inclusion in the created cluster. The linguistic type specified in the output variable is, in other words, represented as a fuzzy set \(A,\ \{A:B\rightarrow[0,\ 1]\}\) and computed by an algorithm of fuzzy equalization. Then, the membership value of \(y_{j}\) in \(A\) can be expressed by \(f_{j}=A\big{(}y_{j}\big{)},\ i=1,\ 2,\ \ldots,\ n\).  
Step 5: If \(\|l^{\prime}-J^{\prime+1}\|\ \leq\ \varepsilon\) is met, where  
\[J=\ \sum\
olimits_{j=1}^{n}\sum\
olimits_{i=1}^{c}u_{ij}^{m}\|x_{j}-c_{i}\|^{ 2}, \tag{16}\]  
the procedure above will be stopped. Otherwise, proceed again from Step 3.  
For ANFIS models, the methods of CFCM clustering mentioned above apply as follows: Input space data in Layer 1 is broken into input space by CFCM clustering, which outputs the value by considering the output variable pattern. In Layer 2, the values belonging to the previous layer are taken, the weights multiplied by the rules are given, and the impulse force proportion in Layer 3 is expressed as a normalized value. The normalized Layer 4 values are multiplied by the final output function and the final output is determined using Layer 5's weighted average.