# Methane Detection Based on Improved Chicken Algorithm Optimization Support Vector Machine
## 2 Methodology  
### Svm  
The SVM was proposed by [PERSON] in 1995 [PERSON] (1995); [PERSON] (1995). SVM, as a machine learning method, is effective for small samples, nonlinear, high dimensional, etc. SVM is developed from solving linear problems; it can construct an optimal hyperplane under the condition of linear and divisible. However, in practical applications, most problems are nonlinear. Therefore, the nonlinear input data map to a high-dimensional feature space. For example, given a set of array lengths \(\mathbf{n}\), which belong to \(\mathbf{R}^{d}\):  
\[(x_{1},y_{1}),(x_{2},y_{2}),\ldots,(x_{n},y_{n})x_{i}\in\mathbf{R}^{d},y_{i} \in\{-1,+1\},i=1,\ldots,n \tag{1}\]  
where \(x_{i}\in\mathbf{R}^{d}\) are input training samples, \(y_{i}\) are training samples, and \(d\) is dimension.  
If the samples are separable, there is a classification hyperplane that separates the two types of samples. Crosses and open circles represent two types of samples in Figure 1, respectively. The nearest points to the classified hyperplane are named the support vector. H is a classification hyperplane. Hyperplanes H\({}_{1}\) and H\({}_{2}\) are linked to two types of support vectors and are parallel to H. The distance between H\({}_{1}\) and H is equal to the distance between H\({}_{2}\) and H. The distance between H\({}_{1}\) and H\({}_{2}\) is called the classification interval.  
A hyperplane divides the data into two categories, as follows:  
\[\left\{\begin{array}{ll}(\mathbf{w}\cdot\mathbf{x}_{i})+\mathbf{b}\geq 0,&y_{i}=+1\\ (\mathbf{w}\cdot\mathbf{x}_{i})+\mathbf{b}\leq 0,&y_{i}=-1\end{array}\right. \tag{2}\]  
where \(\mathbf{w}\) is the vector of the hyperplane, \(\mathbf{x}\) is the input vector of the training set, and \(\mathbf{b}\) is the constant term of the hyperplane. A hyperplane over two types of sample support vector is defined as:  
\[\left\{\begin{array}{ll}(\mathbf{w}\cdot\mathbf{x}_{i})+\mathbf{b}=+1\\ (\mathbf{w}\cdot\mathbf{x}_{i})+\mathbf{b}=-1\end{array}\right. \tag{3}\]  
The interval \(d\) between hyperplanes H\({}_{1}\) and H\({}_{2}\) can be obtained from Equation (3):  
\[d=\frac{2}{|\mathbf{w}|} \tag{4}\]  
The regression function of classification of the hyperplane is defined as:  
\[f(\mathbf{x})=(\mathbf{w}\cdot\mathbf{x})+\mathbf{b},\mathbf{w}\in\mathbf{R}^{d},\mathbf{b}\in \mathbf{R} \tag{5}\]  
Figure 1: Optimization classification of a hyperplane under a linear condition.  
The expression of \(f(\mathbf{x})\) of Equation (10) can be expressed as:  
\[f(\mathbf{x})=\sum_{i\in\text{N}}\beta_{i}K(\mathbf{x}_{i},\mathbf{x})+\text{b} \tag{12}\]  
Common kernel functions include the linear kernel function, polynomial kernel function, sigmoid kernel function, and Gaussian radical kernel function. The Gaussian radical kernel function is better for problems with less a priori information [20]. The expression of the Gaussian radical kernel function is expressed as:  
\[K(\mathbf{x}_{i},\mathbf{x}_{j})=\exp\left(-\frac{\|\mathbf{x}_{i}-\mathbf{x}_{j}\|^{2}}{2r^{ 2}}\right) \tag{13}\]  
where \(r\) is the radius of radial basis kernel function, and \(g=2r^{2}\) is the kernel parameter.  
The values of \(g\) and penalty factor \(C\) heavily affect the performance of SVM. The ICSO algorithm is intended to optimize the parameters of SVM rather than relying on random selection.