# An Improved Kernelized Correlation Filter Algorithm for Underwater Target Tracking
## 2 Kernelized Correlation Filter Algorithm
\(\hat{\chi}\) represents the discrete Fourier transform of generating vector \(\chi\) of the cyclic matrix, and \(diag\left(\hat{\chi}\right)\) represents the diagonal matrix generated by diagonal elements \(\hat{\chi}\). To simplify the solving process \(w\), Equation (7) is substituted by Equation (3) to solve the linear classifier coefficient \(w\). \(w\) can be obtained as follows:  
\[\hat{w}=\frac{\hat{\chi}^{*}\odot\hat{y}}{\hat{\chi}^{*}\odot\hat{\chi}+\lambda} \tag{8}\]  
When the data are characterized by nonlinear distribution, the linear regression classifier cannot show a good performance, and a more robust nonlinear regression function is needed to be used as a classifier. The KCF extends the problem to nonlinear space, through a kernel trick, and the solution of the nonlinear problem in low dimensional space is mapped to the high dimensional kernel space. By solving the linear problem in high dimensional space, the solution of the nonlinear problem in the original low dimensional space is obtained. After mapping with the kernel function, the linear regression coefficient of linear problems in high dimensional kernel space is:  
\[w=\sum_{i}\alpha_{i}\varphi\left(\chi_{i}\right) \tag{9}\]  
where \(\varphi\left(\chi\right)\) means that the base sample \(\chi\) is mapped to the dual space relative to the original space of \(w\), and \(\alpha\) represents the coefficient of the dual space. Therefore, the linear regression function in the high dimensional kernel space can be expressed as:  
\[f\left(z\right)=w^{T}\varphi\left(z\right)=\sum_{i=1}^{n}\alpha_{i}\varphi\left( \chi_{i}\right)\varphi\left(z\right)=\sum_{i=1}^{n}\alpha_{i}\kappa\left(z_{ i},\chi_{i}\right) \tag{10}\]  
where \(\kappa\) refers tothe kernel function. The KCF uses the Gauss kernel by default, and the calculation process of the kernel function is:  
\[\kappa\kappa^{\chi^{\prime}}=\kappa\left(\chi,\chi^{\prime}\right)=\exp\left( -\frac{1}{\sigma^{2}}\left(\parallel\chi\parallel^{2}+\parallel\chi^{\prime }\parallel^{2}-2F^{-1}\left(\hat{\chi}^{*}\odot\hat{\chi}^{\prime}\right) \right)\right) \tag{11}\]  
where \(\sigma\) is the standard deviation, \({}^{*}\) means complex conjugation, and \(F^{-1}\) means inverse Fourier transformation. Therefore, the solution of regression coefficient is transformed into the solution of \(\alpha\). The solution of ridge regression based on kernel function is:  
\[\alpha=\left(K+\lambda I\right)^{-1}y \tag{12}\]  
where \(K\) is a \(n\times n\) kernel matrix. It can be expressed as:  
\[K_{ij}=\kappa\left(\chi_{i},\chi_{j}\right) \tag{13}\]  
Since the Gaussian kernel function satisfies Theorem 1, the corresponding kernel matrix \(K\) can be proven to be a cyclic matrix, and then the solution of \(\alpha\) can be simplified as follows:  
\[\hat{\alpha}=\frac{\hat{y}}{\hat{\kappa}\chi\chi^{\prime}+\lambda} \tag{14}\]  
where \(\hat{}\) expresses the Discrete Fourier Transform. \(\kappa\chi\) is the first row of kernel matrix \(K=C\left(\kappa\chi\right)\), which is sample \(\chi\) and the value of itself calculated by the kernel function. **Theorem 1**. : _Given circulant data \(C\left(\chi\right)\), the corresponding kernel matrix \(K\) is circulant if the kernel function satisfies \(\kappa\left(\chi,\chi^{\prime}\right)=\kappa\left(M\chi,M\chi^{\prime}\right)\) for any permutation matrix \(M\)._After training \(\alpha\) using the above method, the sample can be tested. Since all the samples to be detected \(Z\) are generated by cyclic shift of the base sample \(z\) and the training sample \(X\) is generated by cyclic shift of the base sample \(\chi\), it is easy to verify that this kernel matrix satisfies Theorem 1.