## 2 Methodology and Principles
### GA-Based Optimization of SVM  
The use of support vector machines (SVMs) for discrete variables and the introduction into kernel functions require the determination of a penalty factor c and kernel function parameter g. The choice of the factor and the parameter directly affects the accuracy of the classification and generalization capability of SVMs. In the standard form of SVMs, the penalty factor c does not appear directly in a separate formula, but is used as part of a regularization parameter to control the model complexity and avoid overfitting. A larger c value represents a higher degree of fitting training samples. But an excessively high c value may lead to an increased empirical risk and overfitting, while the contrary situation will cause a small penalty for empirical error and underfitting. In this paper, the radial basis function (RBF) is used as the kernel function of SVM. g is a built-in parameter of the function, which implicitly determines the distribution of the data after mapping to a new feature space. The formula is expressed as follows:  
\[k(x,z)=\exp\left(-\frac{d(x,z)^{2}}{2\sigma^{2}}\right)=\exp\left(-gd(x,z)^{2 }\right) \tag{6}\]  
Formula (6) can lead to  
\[g=\frac{1}{2\sigma^{2}} \tag{7}\]  
A smaller \(g\) value means more support vectors and a faster training and prediction, but an excessively small \(g\) value will lead to a poor anti-interference capability of classifiers; conversely, a larger \(g\) value represents fewer support vectors and a slower response of classifiers. The value range of g trained in this paper is (0,1000); the use of SVMs for handling discrete variables and the introduction into kernel functions require the determination of penalty factor \(c\) and kernel function parameter \(g\). The choice of the factor and the parameter directly affects the accuracy of classification and generalization capability of SVM. The parameter selection in SVM is, in essence, an optimization issue. At present, the methods for SVM parameter selection mainly include an empirical selection, an experimental trial-and-error method, a grid search, etc. It is difficult for the random selection of the parameters of SVM classifiers to achieve the desired results. Empirical selection and experimental trial-and-error methods can not guarantee the acquisition of optimal values of parameters, and the experimental process highly relies on the operator's experience. The grid search-based parameter optimization method can help find the optimal solution within a specified range, but to improve the accuracy or to extend the search scope will take more time. Currently, heuristic algorithms have been successfully applied in parameter optimization. The genetic algorithm (GA), as a global optimization method, has many advantages such as simplicity, parallel processing, absence of the need for explicit mathematical equations and derivative-related expressions, unlikely falling into the locally optimal solution, etc. [17]. In this study, the GA is used to achieve an automatic iterative optimization of SVM parameters. The algorithm begins with an initial population and adopts the self-designed fitness function to evaluate the individual fitness. On this basis, it selects excellent individuals from the population and creates a new generation of individuals by mutation and crossover. This process is iterated until the termination condition is reached. The specific operations are stated as follows:  
1. Population initialization: A certain number of an initial population is created. The real number encoding is adopted for individual coding. Each individual has two random numbers, constructing a group of SVM parameters. 2. Fitness function: The accuracy rate of training samples after cross-validation is used for the fitness function for individual evaluation. 3. Selection: The roulette wheel selection method is used to choose operators and ensure a higher probability of high-quality individuals' being selected.