# Probability Analysis of Hypertension-Related Symptoms Based on XGBoost and Clustering Algorithm
## Materials and Methods
### XGBoost Method  
The full name of XGBoost is eXtreme Gradient Boosting, which is a c++ implementation of Gradient Boosting Machine algorithm. The greatest advantage of this algorithm is that it can automatically use the CPU to run multi-threaded, improve efficiency, and the algorithm has been changed to improve the accuracy. [PERSON] et al. [24], [PERSON] et al. [25], [PERSON] et al. [26] used the XGboost method to obtain very accurate predictions. This article uses the XGBoost method proposed by [PERSON] and [PERSON] [27].  
The algorithm steps can be expressed as follows:  
Objective function:  
\[\begin{array}{l}\zeta(\phi)=\sum\limits_{1}l(\hat{y}_{i},y_{i})+\sum\limits_ {\mathrm{k}}\Omega(f_{k})\\ \text{where }\Omega(f)=\gamma T+\frac{1}{2}\lambda\|w\|^{2}\end{array} \tag{5}\]  
Training objective function:  
\[\zeta^{\mathrm{(t)}}=\sum\limits_{i=1}^{n}l\left(y_{i},\hat{y}^{(t-1)}+f_{t}( x_{i})\right)+\Omega(f_{t}) \tag{6}\]  
Target function [PERSON] second-order expansion approximation:  
\[\begin{array}{l}\zeta^{(t)}\cong\sum\limits_{i=1}^{n}\left[l\left(y_{i},\hat {y}^{(t-1)}\right)+g_{i}f_{t}(x_{i})+\frac{1}{2}h_{i}f_{t}{}^{2}(x_{i})\right] +\Omega(f_{t})\\ \text{where }\mathrm{g}_{i}=\delta_{\hat{y}^{(t-1)}}l\left(y_{i},\hat{y}^{(t-1)}\right) \text{ and }h_{i}=\delta_{\hat{y}^{(t-1)}}^{2}l\left(y_{i},\hat{y}^{(t-1)}\right) \end{array} \tag{7}\]  
Remove the constant term:  
\[\zeta^{(t)}=\sum\limits_{i=1}^{n}\left[g_{i}f_{t}(x_{i})+\frac{1}{2}h_{i}f_{t} {}^{2}(x_{i})\right]+\Omega(f_{t}) \tag{8}\]  
Find the optimal solution of the objective function:  
\[\overline{\zeta}^{\mathrm{(t)}}(q)=-\frac{1}{2}\sum\limits_{j=1}^{T}\frac{ \left(\sum\limits_{i\in S_{j}}g_{i}\right)^{2}}{\sum\limits_{i\in I_{j}}h_{i}+ \lambda}+\gamma T \tag{9}\]  
Figure 1: Example (**A**) Distribution of random points; (**B**) The \(\rho\) and \(\delta\) values of each point.  
XGBoost has the following advantages:  
1. It supports linear classifier.
2. In order to control the complexity of the model, the XGBoost method deliberately sets a regularization term in the objective function.
3. XGBoost uses the second-order Taylor expansion of the objective function, and uses the first and second derivatives.
4. When tree nodes split, we need to calculate the corresponding gain of each segmentation point of each feature, that is, to enumerate all possible segmentation points with a greedy method.
5. XGBoost borrows from the random forest approach and supports column sampling, which not only reduces over-fitting, but also reduces computational complexity.
6. The XGBoost method considers the problem of efficient use of disks, especially when the amount of data is large and there is not enough memory. It combines data compression and fragmentation, and a multi-threaded approach that greatly improves efficiency.
7. Shrinkage is equivalent to learning rate. After an iteration, XGBoost multiplies the weight of the leaf nodes by this coefficient, mainly to weaken the impact of each tree, so that there is more learning space. In practical applications, eta is generally set up a little bit, and then the number of iterations is set a little larger.