# Performance Comparison of ANFIS Models by Input Space Partitioning Methods
## 2 Adaptive Neuro-Fuzzy Inference System (ANFIS)
### Structure of Adaptive Neuro-Fuzzy Inference System (ANFIS)  
Neuro-fuzzy inference systems are classified into two types according to the combination of fuzzy inference and artificial neural network. In the first type, the artificial neural network integrates fuzzy inference, whereas in the second, fuzzy inference integrates the artificial neural network. Among the methods of the second type, fuzzy reasoning has been actively studied as a method for integrating artificial neural networks, which is classified into the Mamdani system [42] and the Takagi-Sugeno system [43; 44]. The Mamdani system has the form of a fuzzy set at the conclusion of the rule, and the Takagi-Sugeno system has the form of a first-order linear equation of the input variable at the conclusion of the rule. Among them, the Takagi-Sugeno system is efficient in terms of computational ability, is adaptable to generating rules in combination with the optimization method of the artificial neural network and has the advantage of ensuring the continuity of the output space. Because of the above advantages, we choose the Takagi-Sugeno system in the ANFIS model to create and infer rules. The ANFIS model is a type of neuro-fuzzy inference system proposed by [PERSON] [45; 46]. The ANFIS model can optimally estimate the parameters included in the membership functions and output by using the least square method (LSE) and back propagation (BP) algorithms for given input and output data. The fuzzy inference process is described briefly through a model consisting of \(n\) Takagi-Sugeno rules with two inputs and one output, and the output of a first-order linear equation. \[ \begin{split}\text{Rule}^{1}:&\text{ If }X_{1}\text{ is }A_{1}\text{ and }X_{2}\text{ is }B_{1},\text{ then }y=k_{10}+k_{11}X_{1}+k_{12}X_{2}\\ &\cdots\\ \text{Rule}^{n}:&\text{ If }X_{1}\text{ is }A_{1}\text{ and }X_{2}\text{ is }B_{1},\text{ then }y=k_{n0}+k_{n1}X_{1}+k_{n2}X_{2}\end{split}  \tag{1}\]  
Here, \(X_{1}\) and \(X_{2}\) represent input variables, and \(A_{1}\) and \(A_{2}\) are fuzzy sets of \(X_{1}\). Similarly, \(B_{1}\) and \(B_{2}\) represent fuzzy sets of \(X_{2}\), and \(k_{i0}\), \(k_{i1}\), and \(k_{i2}\) represent sets of arguments set in rule \(i\). Figure 1 shows the ANFIS model, a structure of a forward network consisting of five layers with two input variables and four fuzzy rules. The nodes in each layer of the ANFIS model have different functions, which are optimized through the learning process. The connection line between the node and the node shows only the direction of flow between the nodes and does not have a weight. Next, each floor structure and procedure of the ANFIS model are explained. * **Layer 1:** In the first layer, each node can output a value belonging to a linguistic level as an output, as shown in Equation (2). \[O_{i}^{1}=u_{A_{i}}(x),\;O_{i+1}^{1}=u_{b_{i}}(y),\;i=1,\;2\] (2) The preconditioned membership function selects and uses a Gaussian membership function, as shown in Equation (3). \[u_{A_{i}}(x)=\exp\left\{-\left(\frac{x-c_{i}}{a_{i}}\right)^{2}\right\}\] (3) In addition to the Gaussian membership function, various membership functions can be used, and parameter values that minimize the error are selected through the learning process. * **Layer 2:** In the second layer, each node receives the membership value shown in the conditional part of the fuzzy rule, and outputs it as the weight multiplied by the rule. The output of each node represents the fitness of the fuzzy rule. \[O_{i}^{2}=w_{i}=u_{A_{i}}(x)\times u_{B_{i}}(y),\;i=1,\;2\] (4)
* **Layer 3:** In the third layer, each node calculates the ratio of the ignition forces of the \(i\)th rule to the sum of all ignition forces through Equation (5). The value obtained is represented as a normalized value. \[O_{i}^{3}=\overline{w_{i}}=\frac{w_{i}}{w_{1}+w_{2}},\;i=1,\;2\] (5)
* **Layer 4:** In the fourth layer, each node performs an operation that multiplies the output function of the conclusion part of each rule by the standardized fitness.