# Probability Analysis of Hypertension-Related Symptoms Based on XGBoost and Clustering Algorithm
## 3 Experiment and Result Discussion
For lower limb ischemia, the proportion of patients in both groups is not high, 2.2% and 0.8% respectively, which proves that patients with hypertension rarely have symptoms of lower limb ischemia. Similarly, for renal insufficiency, the proportion of minor symptoms in both groups was small, but the proportion of patients in the second group was six times higher than that in the first group. For microalbuminuria, 41.2% of patients in the second group had this symptom, compared with 7.2% in the first group. Fundus lesions and stroke were not significantly different between the two groups, and the incidence is very low. The results suggest that there is indeed a significant difference in some symptoms between different types of hypertension. After cluster analysis of 531 patients, the patients were divided into two groups and the symptoms with higher prevalence were selected. The proportion of patients with vascular sclerosis in the first group was 89.1%, that of patients with vascular sclerosis in the second group was 96.4%, that of patients with ventricular hypertrophy was 34.9%, and that of microalbuminuria was 41.2%. In order to determine the accuracy of clustering, 334 of 531 patients were trained and 197 patients were tested by XGBoost method, the ratio of the test set is 37%. In the XGBoost algorithm, the depth of the tree is 6 and the total number of iterations, i.e., the number of decision trees is 100; the gbtree tree model is used as the base classifier; all CPU parallel computing is used; and each tree is trained, using the full training set, with the other parameters the default values. In order to estimate the XGBoost prediction performance, the 10-fold cross-validation method is used here. The accuracy of each cross-validation is shown in Table 6, n is the nth verification of the ten-fold cross-validation. The average of the 10 accuracy rates is used as the index of XGBoost's prediction performance. The final result is 0.973, indicating that the XGBoost method has good prediction performance and it can be used to calculate the accuracy of the clustering effect. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Category** & **1(138)** & \multicolumn{3}{c}{**2(393)**} \\ \hline
**Symptom** & **Number of People** & **Ratio** & **Number of People** & **Ratio** \\ \hline A & 14 & 10.1\% & 137 & 34.9\% \\ B & 123 & 89.1\% & 379 & 96.4\% \\ C & 3 & 2.2\% & 3 & 0.8\% \\ D & 1 & 0.7\% & 16 & 4.1\% \\ E & 10 & 7.2\% & 162 & 41.2\% \\ F & 1 & 0.7\% & 13 & 3.3\% \\ G & 8 & 5.8\% & 25 & 6.4\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Symptom analysis. After determining that the XGBoost method can be used to calculate the accuracy of the clustering effect, the result of the XGBoost method is 98.48%. This means that there is a probability of 98.48% that the result of the clustering algorithm is correct, showing that the result of clustering analysis is very high, and there is no obvious error in general. Figure 4 shows the importance degree of the features obtained by the XGBoost method. It can be seen from the figure that the 13 th and 20 th features have a great influence on the results. According to Table 1, the two variables are the 24-h average systolic blood pressure and systolic blood pressure during the day. XGBoost is a boosting tree method in which each decision tree can be drawn. Figure 5 is the decision tree obtained by this model. It can be seen that the root node is the 13 th feature, and the left subtree of the second layer is the 20 th feature, which is consistent with the feature importance obtained in Figure 4.  
After clustering patients, the proportion of various symptoms in different categories can be counted, this ratio is multiplied by the accuracy obtained by the XGBoost method, and the probability of occurrence of various symptoms is obtained, which is shown in Table 7. This method of calculation is similar to the method of calculating the expectation in terms of probability.