## 5 Results and Analysis of the Optimization Algorithm
### Results of the Support Vector Machine Optimization  
The kernel functions of SVM are various. The different kernel functions are selected to observe the influence of the kernel function on the final classification result. The support vector machine inputs the feature vectors composed of 8 feature signals, and the output is the classification prediction result for each feature vector. Figure 13 shows the results of different kernel function data classification. Figure 13a-d represent the classification results using linear kernel functions, radial basis kernel functions, polynomial kernel functions, and Sigmoid kernel functions, respectively. The blue circle in the figures represents the actual label of the sample, and the red dot represents the label of the SVM classification prediction. The higher the coincidence of the red dot and the blue circle, the higher the accuracy of the classification. Table 3 represents the final classification results of the test samples when different kernel functions are used when selecting C-SVM in SVM. Since there is no clear chosen principle for the penalty parameter \(c\) and the kernel function parameter \(g\), \(c=2\) and \(g=1\) are randomly selected here. The results in Table 3 show that under the condition of this parameter, among the four kernel functions, the polynomial kernel function has the highest classification accuracy, and the Sigmoid kernel function has the lowest classification accuracy. When using the PSO algorithm to optimize the SVM algorithm, taking C-SVM as an example, firstly the appropriate range of \(c\) and \(g\) values should be chosen. Then based on the training samples,  
Figure 13: Classification results of SVM kernel function. (**a**) Linear kernel function, (**b**) Polynomial kernel function, (**c**) Radial basis function, (**d**) Sigmoid kernel function. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Kernel Function** & **Accuracy** & **SVM Train Parameter Options** \\ \hline Linear kernel function & 96.4\% & \(c=2,g=1,t=0\) \\ Polynomial kernel function & 98.4\% & \(c=2,g=1,t=1\) \\ Radial basis kernel function & 93.6\% & \(c=2,g=1,t=2\) \\ Sigmoid kernel function & 40.4\% & \(c=2,g=1,t=3\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Results analysis of different kernel functions in \(C\)-SVM. the cross-validation method is used to output the average classification accuracy under cross-validation of training samples. After multiple iterations of PSO, finding the best average classification accuracy and the best \(c\), \(g\) parameters of the training samples. Finally, using the best \(c\) and \(g\) parameters to complete the classification of the test samples. Through this way, the classification accuracy can be improved and the generalization ability of the classifier under the parameter state can be judged. Taking the Sigmoid kernel function as an example to introduce the optimization process of PSO. The basic mathematical relationship of the objective function in this optimization is shown with Equation (14). \[value=f(c,g) \tag{14}\]  
In this equation, the penalty parameter \(c\) and the kernel function parameter \(g\) are input variables, and the \(value\) represents the fitness of the particle swarm algorithm in the equation, which actually represents the classification accuracy of SVM. By inputting different \(c\) and \(g\) parameters during the optimization process, the maximum fitness can be found. Figure 14 represents the iterative optimization process of the Sigmoid kernel function in SVM and the final classification effect on the test samples. The fitness of Figure 14a represents the accuracy of the actual classification. The average fitness is the average of the accuracy of all particle classifications in a single solution, the best fitness is the highest accuracy of particle classification in an iterative process. In the optimization process, the value of the penalty factor \(c\) is set to \((2^{2},\,2^{8})\), and the value of the kernel function parameter \(g\) is set to \((2^{-8},\,2^{-2})\).