Abstract:In the past decade, the incidence of heart disease has been on the rise and remains high in the world. If the physical examination indicators related to the human body can be extracted by computer measures, and the influence of different characteristics and their weights on heart disease can be analyzed through machine learning, it will play a key role in predicting and preventing heart disease. Therefore, a prediction method based on clustering and XGboost algorithm is proposed in this study. By preprocessing the data and distinguishing the features, the data sets are clustered by clustering algorithm, such as K-means. Finally, the XGboost algorithm is used to predict and analyze. The experimental results show that the proposed method based on clustering and XGboost algorithm is feasible and effective, which provides accurate and effective help for the application of medical recommendation.