## 2 Materials and Methods
### Adaptive Neuro-Fuzzy Inference System Optimized by Genetic Algorithm (ANFIS-GA)  
A genetic algorithm, also known as a GA, can be defined as a global search heuristics method applied in various engineering applications to evaluate or determine solutions for optimization problems. It is used to analyze and evaluate complex search problems in optimization. A genetic algorithm is a special evolutional algorithm technique that is significant when selecting or choosing a natural selection evolutionary process that uses inheritance, mutation, selection, and recombination [43]. In this research, we combined GA with ANFIS to increase the efficiency of the ANFIS predictive model. GA was combined with ANFIS to enhance the ANFIS model's performance and reduce the rates of error of the regression values by using the tuning and optimization method on the membership functions in the Sugeno-type fuzzy inference system. The development of the hybrid ANFIS-GA model is displayed in Figure 7.  
The genetic algorithm model starts with a group of solutions, also known as chromosomes. A new population is created by completing a previous population. The fitness of new solutions formed from selected (offspring) is assigned. This process is carried out repeatedly till a condition, i.e., the improvement of the optimal solution, is met. To accomplish this, the ANFIS algorithm, which is part of the fitness function, plays an important role _f(x)_. The fitness with ANFIS fitness function intervention is represented by:  
\[f_{1}(x)-\frac{1}{m}\sqrt{\sum_{i}^{m}o(d_{i}-a_{i})^{2}}\]  
where \(m\) is known as the number of characteristics, \(a_{i}\) is output derived from the ANFIS, and \(d_{i}\) is the predicted traffic volume. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Signalized Road Intersections** & **Training** & **Testing** & **Total** \\ \hline Intersection 1 & 144 & 62 & 206 \\ Intersection 2 & 150 & 65 & 215 \\ Intersection 3 & 157 & 67 & 224 \\ Intersection 4 & 144 & 61 & 205 \\ \hline  & **595** & **255** & **850** \\ \hline \hline \end{tabular} Note. Traffic data samples were taken from each intersection and divided based on 70% for training and 30% for testing. Furthermore, the data training requires a larger traffic dataset compared to the traffic data needed for testing the model. This is due to the need to train the model with as much data as possible to improve the accuracy and efficiency of the model when it comes to prediction and pattern recognition. When traffic data are entered into the ANFIS and ANFIS-GA models, they learn the patterns from the traffic-flow data and make decisions based on this data.  
\end{table} 
Table 4: The breakdown of the traffic datasets. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Values** \\ \hline Type & Takagi-Sugeno \\ Clustering technique & Subtractive clustering \\ Input MF type & Gaussian \\ Output MF type & Linear \\ Number of rules & 10 \\ Number of clusters & 5 \\ Maximum iterations & 100 \\ Defuzzification method & Weighted average \\ Cluster radius & 0.67 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The parameters of the ANFIS model. The next fitness function is:  
\[f_{2}(x)-\frac{1}{n-m}\sqrt{\sum_{i}^{n}m(d_{i}-a_{i})^{2}}\]  
where \(n\) is known as the overall number of input characteristics, \(d_{i}\) is regarded as the minimum, \(a_{i}\) is represented as the actual value of the traffic volume, and \(n-m\) indicates the left-over undesired attributes. The final equation is known as minimized \(f(x)\), and it is represented as:  
\[f(x)-\frac{f_{1}(x)+f_{2}(x)}{2}\]  
For this research, we evaluated the initialization of the parameters for the genetic algorithm. These comprise the overall number of iterations, population size, percentage of mutation, and crossover. It is very important to note that the selection of these parameters is, to a great extent, the determinant when it comes to the capability of the designed controller. The tuning parameter range of the ANFIS-GA is illustrated in Table 5.  
Figure 7: ANFIS-GA model.