## 3 Results and Discussion
### Anis-Ga  
The genetic algorithm is one of the most powerful optimization algorithms. It emulates the so-called biological evolution process in nature, or the natural selection of the fittest. The basic elements of a GA comprise the fitness function, which is to become optimized, the population of chromosomes, the selection, by means of an operator, of chromosomes that will reproduce, and the production through mutation of the next generation in a random fashion. The crossover operation is employed to generate offspring. It swaps a sequence or subsequence of the two selected chromosomes to create one or two offspring, depending on the strategy followed. The uniqueness of GA compared to PSO resides in the fact that, unlike PSO, GA has the selection operator for easy optimization, and not all individuals are retained as members of the population. This last factor somewhat reduces the computation time. The main steps in the deployment of a GA are the initialization of the population, calculation of the fitness function, crossover, mutation, selection of survivors, and finally termination of the process, keeping the best if the criteria is met. The details of GA can be found in [31].  
In this investigation, the parameters of the ANFIS section were kept as in the case of the PSO (number of rules = 10, nPop = 25, and maximum iterations = 1000), and the following parameters were used for the GA: crossover percentage, pc = 0.4; number of offsprings nc = 2*round(pc*nPop) = 10; mutation percentage, pm = 0.7; number of mutants, nm = round(pm*nPop) = 18, gamma = 0.7; mutation rate, mu = 0.15; and selection pressure, beta = 8. The corresponding ANFIS-GA results are shown in Figures 15 and 16.  
Figure 14: ANFIS-PSO regression plots for (**a**) training, (**b**) testing, and (**c**) all data. Note: Blue line represents the liner data.  
It is obvious from Figures 15 and 16 that as in the case of ANFIS-PSO, the ANFIS-GA model outputs track very closely the expected or target data for both training and testing. The corresponding regression plots are depicted in Figure 17.  
Figure 16: ANFIS-GA data plots for testing. The red line represents the different stages of the ANFIS-GA testing.  
Figure 15: ANFIS-GA data plots for training. The red line represents the different stages of the ANFIS-GA training.  
It should be noted in Figures 7-17 that Output is the predicted power or the value of the power output predicted by the model, while Target is the measured value of the output power of the plant.  
It can be observed from Figure 17 that the ANFIS-GA model performed very well for both training and testing, with an overall correlation coefficient, \(R^{2}\), equal to 0.9997, which was slightly higher than the one obtained in the case of ANFIS-PSO, and the corresponding MSE or RMSE was relatively lower than in the case of ANFIS-PSO. It was also noted that the computation time was relatively shorter than that required for ANFIS-PSO, which may be attributed to the reduction in the population size due to the selection of the fittest. This finding confirms the theory about GA. The ANFIS model is susceptible to the problem of local minima during the training process, owing to the use of heuristic methods. To mitigate this issue and achieve the global optimal solution, researchers have increasingly turned to metaheuristic or evolutionary techniques such as particle swarm optimization (PSO) and genetic algorithms (GA) [24]. This study reaffirms that optimizing ANFIS with PSO and GA yields significantly improved accuracy, resulting in minimal disparities between predicted output values and the actual target output values.