## 4 Fuzzy Neural Network for Predicting Rains and Temperatures
### First Layer  
In the initial layer of the model, procedures presented by [PERSON] [84] are applied to generate uniformly \(M\) spaced membership functions of the triangular type (calculated through center 0.5). Thus, the neurons of the first layer represent the fuzzification method of the problem data under analysis. Therefore, these neurons, whose activation functions are membership functions of fuzzy sets, granulate the input space to form a fuzzy partition (see, e.g., the work of [PERSON], [PERSON], and [PERSON] [63]).  
The Adaptive Network-Based Fuzzy Inference System (ANFIS) [84] consists of five succeeding layers capable of establishing the membership functions of the problem decision space. The first layer of ANFIS is responsible for determining fuzzy membership functions through adaptive parameters. This layer can be expressed by [84]:  
\[O_{i}^{1}=\mu_{A_{i}}(x),\qquad i=1,2\ldots,n \tag{1}\]  
where \(x\) is input value, \(\mu\) is the membership degree, and \(O_{i}^{1}\) is membership value of fuzzy variable \(A_{i}\)[84]. Another relevant factor for understanding the model is in the second layer of the ANFIS, where every node in this layer is a fixed node which acts as a product operation, as in [PERSON] fuzzy model [84]:  
\[O_{i}^{2}=W_{i}=\mu_{A_{i}}(x)\times\mu_{B_{i}}(y),\qquad i=1,2\ldots,n \tag{2}\]  
where \(B_{i}\) is a fuzzy variable. These varieties of groups, through membership functions with the equivalent features, can assist in accurate analysis of the problem. This procedure performs a non-linear mapping of its data space to the output area. This mapping is accompanied by several fuzzy IF/THEN rules, where individually one relates the bounded execution of the mapping. The antecedents in the rules of a fuzzy inference system perform a multidimensional neural division, which can be a grid, decision tree, or cluster. In this paper, the method works with a limitation of 200 neurons in the first layer to circumvent the problem of high dimensionality. This decision is adequate for numerous preceding experiments that verified that the ability to create fuzzy rules made the issue much more complicated than was essential. For each input variable \(x_{ij}\), \(L\) neurons are defined \(A_{ij}\), \(l=1\), \(\ldots\)\(L\), whose activation functions are composed of membership functions in the corresponding neurons. Thus, the expected result in the first layer of the model is the degrees of association related to the inputs submitted to the model, [63]:  
\[a_{jl}=\mu_{A_{l}},\,j=1\ldots\,n,\,l=1\,\ldots\,L \tag{3}\]  
where, for each ANFIS input result, the number of problem inputs and the number of fuzzy sets are, respectively, \(n\) and \(L\)[63]. This layer stands out in the paper because it is responsible for extracting primary knowledge from the database evaluated by the model. Thus, it is possible to identify suitable relations between dimensions of the problem and membership functions.  
The following equation defines the triangular functions (\(\triangle\)) used in the construction of the first layer triangular fuzzy neurons:  
\[\triangle\left(x,\
u,\vartheta,\zeta\right)=max\left(min\left(\frac{x-\
u}{ \vartheta-\
u},1,\frac{\zeta-x}{\zeta-\vartheta},0\right)\right) \tag{4}\]  
which is defined by three parameters for defining three points: \(\
u\) and \(\zeta\) for the base, and \(\vartheta\) for the extremity of the triangular fuzzy neuron.