# A Circle Center Location Algorithm Based on Sample Density and Adaptive Thresholding
## 2 Theoretical Design of CLSDAT
### Calculating the Optimal Solution for the Coordinate of the Circle Center
#### 2.3.2 Kernel Method and Kernel Function  
The kernel method maps data sets that cannot be well separated in a low-dimensional space to three-dimensional space or even a higher-dimensional space, making it easier to find a hyperplane for linear separation of these data sets, as shown in Figure 3.  
During the process of using the kernel method to map the low-dimensional data to a higher-dimensional space and finding a hyperplane for linear separation of the data sets, some difficulties may arise. For example, as the dimension increases, the computational complexity grows exponentially, while the computational capacity of devices is limited. When there are many data samples, time consumption is also significant because each data point needs to be transformed to the higher-dimensional space before subsequent operations can be performed.  
Typically, in non-training data model instance learning, the focus is on the characteristics of these instance data. The inner product of vectors is commonly used to represent the characteristics. The inner product in the higher-dimensional space after vector mapping can be achieved by scaling in a low-dimensional space and adding dimensional constants. This is known as the Kernel Trick.  
\[K(X_{1},X_{2})=\varphi(X_{1})^{T}\varphi(X_{2}) \tag{3}\]  
Here, \(K\) is the kernel function, \(X_{1}\) and \(X_{2}\) are data points in a low-dimensional space, and \(\varphi\) function is their mapping function.  
Figure 3: Two-dimensional mapping to high-dimensional partitioning.  
2.3.3. Introducing Gaussian Kernel Function and Weight Coefficient for Mean Shift Vector  
There are several commonly used kernel functions, including linear kernel, Gaussian kernel, and polynomial kernel. The choice of the kernel function depends on the number of data samples and the relationship between their features. Here are three principles for selecting kernel functions:  
1. If the number of data samples is large enough and the data features are also significant, the linear kernel should be prioritized.
2. If the number of data samples is moderate and there are relatively few data points, the Gaussian kernel should be preferred.
3. If the number of data samples is large but the number of features is relatively small, it may be necessary to manually define some features and use the linear kernel.  
Additionally, the Gaussian kernel is a highly effective function for implementing non-linear data classification. It can be used to solve complex data modeling problems and can improve the algorithm's performance while reducing computation time.  
In the created candidate circle center sample data, the majority of the data points are expected to be in the vicinity of the true center data. Since there are fewer features and the efficiency of constructing the sample data are also considered, the Gaussian kernel function is introduced, as shown in Equation (4).  
\[K(X_{1},X_{2})=e^{-\frac{|X_{1}-X_{2}|^{2}}{2\
u^{2}}} \tag{4}\]  
This equation measures the distance between the sample data points \(X_{1}\) and \(X_{2}\), with \(\sigma\) being the variance of the data points involved in the operation.  
Using the Gaussian kernel function instead of \(1/k\) gives the mean shift vector in the form shown in Equation (5), where \(G(p)\) is a unit Gaussian kernel function with bandwidth \(b\).  
\[M_{b}(p)=\frac{\sum_{i=1}^{n}G(\frac{p_{i}-p}{b_{i}})(p_{i}-p)}{\sum_{i=1}^{n} G(\frac{p_{i}-p}{b_{1}})} \tag{5}\]