# Research on a Coal Seam Gas Content Prediction Method Based on an Improved Extreme Learning Machine
## 2 Development of Prediction Models for Coal Seam Gas Content
### Theoretical Analysis and Performance Evaluation of the GASA Optimization Algorithm
#### 2.1.2 Performance Testing of the GASA Algorithm  
The GASA is a random search algorithm, and Rastrigin's function was chosen to test its optimization performance due to its numerous local optima, which can mislead algorithms. Therefore, it is an ideal choice for testing the performance of algorithms. Figure 3 displays a three-dimensional plot of the function. The mathematical expression for this function is as follows:  
\[Ras(x)=20+x_{1}^{2}+x_{2}^{2}-10(\cos 2\pi x_{1}+\cos 2\pi x_{2}) \tag{1}\]  
where \(x_{1}\in[-5,5],x_{2}\in[-5,5]\)  
Figure 2: Flowchart of the GASA algorithm.  
To optimize the function, the GASA algorithm's parameters can be customized before executing the algorithm. In addition, the PSO, GA, and SA algorithms can also be utilized individually for function optimization. A performance test through experimental analysis can be conducted to compare the performance of each algorithm. Given that these algorithms are all stochastic search algorithms, it is advisable to conduct multiple experiments to avoid significant accidental errors. Therefore, each algorithm can be tested 20 times under identical environmental conditions. The termination condition for each algorithm can be set to exceed 200 iterations or reach the global minimum value during optimization. The outcome of these experiments is presented in Table 1.  
After analyzing the test outcomes presented in Table 1, it is apparent that the algorithms did not achieve the set objectives in every one of the 20 optimization runs. Additionally, the number of iterations and optimization results varied for each algorithm. Upon examining the performance metrics of average optimization value, variance of optimization results, and average number of iterations, it is evident that the GASA algorithm exhibits superior function optimization capabilities and global search stability compared to the PSO, GA, and SA algorithms.  
Figure 4 illustrates the curve of the best individual's average fitness function value during the function optimization process. The GASA algorithm reaches the optimal value at the 78 th iteration, the PSO reaches the optimal value at the 102 nd iteration, and the GA and SA algorithms converge at the 156 th and 176 th iterations, respectively. However, the fitness function value quality of the latter two algorithms is inferior to that of the former two. Consequently, when compared to the PSO, SA, and GA algorithms, the GASA algorithm demonstrates better performance and efficiency in the complex function parameter optimization process.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Algorithm** & **Test Function** & **Average Result** & **Variance of Results** \\ \hline PSO & & \(9.2472\times 10^{-4}\) & 3.1547 \\ GA & Rastrigin’s function & \(7.9003\times 10^{-3}\) & 3.7519 \\ SA & & \(9.1873\times 10^{-2}\) & 7.6823 \\ GASA & & \(5.6935\times 10^{-4}\) & 2.0524 \\ \hline \hline \end{tabular}
\end{table}
Table 1: The table of optimization results for the test function.  
Figure 3: Three-dimensional graph of the test function.