# WRNFS: Width Residual Neuro Fuzzy System, a Fast-Learning Algorithm with High Interpretability
## 2 WRNFS Algorithm and Evaluating Indexes  
As shown in Figure 1, the traditional ANFIS model contains five layers. The output of the first layer (square nodes) is the membership corresponding to the established rules, and the parameters of this layer are called premise parameters; the second layer (round nodes marked with \(\left\lceil\right\rceil\)) generates trigger strength; the third layer (round nodes marked with N) standardizes trigger strength; the fourth layer (square nodes) imports training sets to obtain output corresponding to rules, and the fifth layer sums to obtain the total output. The basic idea of the width residual neural fuzzy system algorithm is the residual error learning algorithm based on ANFIS model. In other words, the original output is regarded as a signal with several levels of different energy instead of repeatedly using the original output as a learning target. For the first-layer of WRNFS, the total output signal is used to train ANFIS model and get the low-frequency signal. The training error of the first layer is passed to the later stage as the residual signal to get several higher-frequency signals. Finally, the signals at all levels are reintegrated in appropriate ways such as least square regression to get a reasonable prediction of the original signal. The WRNFS algorithm is described as follows: Firstly, the input variable set is divided into several groups. For example, the medium dimension input (6-20 dimension) is divided into several 2-6 dimension input groups. Then, these data groups are taken as the input of the corresponding layer ANFIS function module. For the first-layer ANFIS model, the data set \(\left\{x_{1},x_{2},\ldots,x_{n_{1}},y\right\}\) is taken as the training data to establish ANFIS model. \(\left\{x_{1},x_{2},\ldots,x_{n_{1}}\right\}\) is the first group of the divided data set and \(\left\{y\right\}\) is the expected value. The predicted value \(\left\{y^{\prime}\right\}\) is obtained by taking \(\left\{x_{1},x_{2},\ldots,x_{n_{1}}\right\}\) as the input of the established ANFIS model. For the second-layer ANFIS model, the data set \(\left\{x_{n_{1}+1},x_{n_{1}+2},\ldots,x_{n_{2}},y-y^{\prime}\right\}\) is taken as the training data to establish ANFIS model. \(\left\{x_{n_{1}+1},x_{n_{1}+2},\ldots,x_{n_{2}}\right\}\) is the second group of the divided data set and \(\left\{y-y^{\prime}\right\}\) is the first-order residual between the expected value and the prediction value of the first-layer ANFIS model. Then, the second-order residual \(\left\{y-y^{\prime}-y^{\prime\prime}\right\}\) is obtained and \(\left\{x_{n_{2}+1},x_{n_{2}+2},\ldots,x_{n_{2}},y-y^{\prime}-y^{\prime\prime}\right\}\) will be used as the training data set of the third-layer ANFIS model. Repeat the above process until the input groups are used up, or the output and learning rate meet the target requirements. Finally, appropriate means such as least square regression are used to reconstruct the output signals of ANFIS at all levels to obtain reasonable prediction. As shown in Figure 2, multi-dimensional data can be fully utilized and learning accuracy can be continuously improved through step-by-step transmission of residuals. In the experiment of this article, we configure that \(n_{1}=n_{2}=\ldots=m\), to make the performance of the system more controllable. Assume there is an \(N\)-dimensional input data set \(\left\{x_{1},\ldots,x_{N},y\right\}\). The procedure of WRNFS is described in the following figure. The WRNFS algorithm shown in Figure 3 can be used as an online learning mode in practical applications. On the one hand, the training data set is divided into several groups, which will greatly reduce the training time of the ANFIS model. On the other hand, after partitioning and learning the input of the current data set, only the last level of residual error is saved, without changing the previously trained levels. When the new input data enter the system, the residual of the last level is distributed with the new input data to train ANFIS model in the next layer.