# Probability Analysis of Hypertension-Related Symptoms Based on XGBoost and Clustering Algorithm
## Materials and Methods  
### Clustering Methodology  
Cluster analysis is based on the similarity of each class. The similarity between one point and other points in a class is greater than the similarity with other classes. The clustering method can maximize the similarity of objects in the class, and the similarity between classes is the smallest [15]. K-means is a kind of clustering technology applied to Web, which randomly selects clustering centers in all data and classifies them according to the distance between data points and centers [16]. The main idea is to find the \(k\) class centers of the data set and classify the data into \(k\) classes so that the distance between the data points in the data set and the class centers of the classes to which they belong is minimal. This method often requires manual determination of the number of clustering centers, which is subjective. When the number of classes selected manually does not match the data, there will be significant errors [17; 18; 19]. Hierarchical clustering [20], density-based [21] are also commonly used clustering methods. The k-means method mentioned above is the most basic method among clustering methods [22], because it relies too much on the initial selection of k aggregation centers, resulting in a series of grid-based clustering methods and so on. This article uses a new clustering method proposed by [PERSON] and [PERSON] [23]. The method has two distinct characteristics as follows:  
The density of the cluster center is large, and its density around it is smaller. The distance between the cluster center and other dense data points is relatively far. \(S=\{x_{i}\}_{i=1}^{N}\) represents data sets with clustering. \(I_{s}=\{1,2,\cdots,N\}\) is the corresponding index set. The distance between \(x_{i}\) and \(x_{j}\) represented by \(d_{ij}=dist(\mathbf{X}_{i},\mathbf{X}_{j})\). For every point \(x_{i}\) in \(S\), \(\rho_{i}\) and \(\delta_{i}\) representing the two characteristics mentioned above where \(\rho_{i}\) represents local density, \(\delta_{i}\) represents the distance (Formula (3) is explained in detail). Here are two calculation methods for calculating local density. Cut-off kernel:  
\[\rho_{i}=\sum_{j\in I_{s}\backslash\{i\}}\chi\big{(}d_{ij}-d_{c}\big{)} \tag{1}\]  
Where function:  
\[\chi(x)= \begin{cases}1,&x<0;\\ 0,&x\geq 0;\end{cases} \]  
Among them, \(d_{c}\) represents the truncation distance. This is an amount given by experience and requires artificial settings. When choosing \(d_{c}\), it should be emphasized that there should be a number of 1%-2% of the total number of data points around each data point. For each data point in \(S=\{x_{i}\}_{i=1}^{N}\), it has a distance value from the point of \(N-1\) other than itself, so there are \(N(N-1)\) distances in \(S=\{x_{i}\}_{i=1}^{N}\). But the distance between any two points is computed twice, so the number of effective distances is \(M=\frac{1}{2}N(N-1)\). We sort the distance \(D_{ij}\) from large to small, and the sequence is \(d_{1}\leq d_{2}\leq\cdots\leq d_{M}\), Take \(d_{c}\) as \(d_{k},k=\{1,2,\cdots M\}\). In general, the distance satisfying the condition of less than \(d_{c}\) takes up about \(\frac{k}{m}\), that is, about \(\frac{k}{m}N(N-1)\), and the average distance to each data point is about \(\frac{k}{m}N(N-1)=\frac{k}{m}N\). The ratio \(\frac{k}{m}\) is equivalent to \(t\) in the algorithm. So when the ratio \(t\) is given, \(k\) can be approximately taken as \(Mt\). In this paper, the range of \(t\) is locked at 1-2%, which is based on the empirical values of many data sets. \(\rho_{i}\) represents the data points between \(S\) and \(x_{i}\) (except \(x_{i}\) itself) with a distance less than \(d_{c}\).