# Composite Kernel Method for PolSAR Image Classification Based on Polarimetric-Spatial Information
## 3 Composite Kernels for SVM
### SVM and Kernel  
Based on the theory of structural risk minimization [31], a support vector machine (SVM) attempts to find a hyper-plane that separates two classes while maximizing the margin between two classes. Nowadays, SVM has become one of the most popular tools for solving pattern recognition problems [32; 33; 34]. In remote sensing, SVM is of particular interest to researchers due to its ability to deal with high-dimensional features with a relatively small number of training samples and to handle nonlinear separable issues by using kernel tricks [35; 36].  
Given a training feature set \(\mathcal{T}=\{(X_{1},l_{1}),\ldots,(X_{N},l_{N})\}\), where \(X_{i}\) is the \(i\)-th feature sample and \(l_{i}\) is the corresponding label (for two class cases we have \(l_{i}\in\{-1,1\}\)), the SVM finds the decision function by solving the following optimization problem:  
\[\begin{split}&\max_{\mathbf{\alpha}}\Biggl{\{}\sum\limits_{i=1}^{N} \alpha_{i}-\frac{1}{2}\sum\limits_{i=1}^{N}\sum\limits_{j=1}^{N}\alpha_{i} \alpha_{j}l_{i}l_{j}\bigl{\langle}X_{i},X_{j}\bigr{\rangle}\Biggr{\}}\\ & s.t.\ 0\leq\alpha_{i}\leq C\ \ \text{and}\ \sum\limits_{i=1}^{N}\alpha_{i}l_{i}=0\end{split} \tag{3}\]  
where \(\mathbf{\alpha}=[\alpha_{1},\alpha_{2},\cdots,\alpha_{N}]\) is the vector of Lagrange coefficients, \(C\) is a constant used for penalize training errors.  
Input Space \(\mathcal{F}\) (often linear inseparability) can be mapped into high dimensional Hilbert space \(\mathcal{H}\), i.e., let \(\Phi(X_{i})\) replaces \(X_{i}\), and \(\Phi(X_{i})\in\mathcal{H}\). It is assumed that \(X_{i}\) are more likely to be linear separable in Hilbert space \(\mathcal{H}\). Then, define a kernel function \(K(X_{i},X_{j})=\bigl{\langle}\Phi(X_{i}),\Phi(X_{j})\bigr{\rangle}\). In this way, a linear hyper-plane can be found in high-dimensional Hilbert space. The optimization problem becomes  
\[\begin{split}&\max_{\mathbf{\alpha}}\Biggl{\{}\sum\limits_{i=1}^{N} \alpha_{i}-\frac{1}{2}\sum\limits_{i=1}^{N}\sum\limits_{j=1}^{N}\alpha_{i} \alpha_{j}l_{i}l_{j}\kappa\bigl{\langle}X_{i},X_{j}\bigr{\rangle}\Biggr{\}}\\ & s.t.\ 0\leq\alpha_{i}\leq C\ \ \text{and}\ \sum\limits_{i=1}^{N}\alpha_{i}l_{i}=0\end{split} \tag{4}\]  
where \(\kappa\) is a kernel function. The dual formulation of the SVM problem in Equation (4) is convex, which facilitates the solving process.  
To predict the label for a new feature sample \(X\), the score function of the SVM is computed with the optimal Lagrange coefficients \(\alpha^{*}\) obtained by solving Equation (5):  
\[\phi(X)=\sum\limits_{i=1}^{N}\alpha_{i}^{*}l_{i}\kappa(X_{i},X)+b \tag{5}\]  
where \(b\) is the bias of the decision function. For a two-class problem, the label of the test feature sample \(X\) is given by \(l(X)=\text{sgn}(\phi(X))\). The two-class SVM can be extended to deal with multiclass classification problems by using a one-versus-one rule or a one-versus-all rule. It is also possible to compute probabilistic outputs from the classification scores for SVM. In this paper, the method of SVM is implemented by using the library LIBSVM [37]. The parameters of SVM are set by a cross-validation step [29].