# Heart Failure Prediction Based on Bootstrap Sampling and Weighted Fusion LightGBM Model
## 5 Experimental Results and Analysis
### Comparative Analysis of Model Effects
#### 5.2.2 Selection of Basic Model  
The experiments in this paper are compared with single classification algorithms, such as K-nearest neighbors, support vector machines, and decision trees, ensemble learning algorithms, such as GBDT and XGBoost, and basic LightGBM model classification. By drawing the learning curve of test set classification accuracy, the experimental results are evaluated and compared. The Figure 10 shows the change of the accuracy of different machine learning models in the training process. It is found that the accuracy of all models increases with the increase of the number of training samples. The accuracy of SVM and KNN models is low when the number of training samples is small, but with the increase in the number of samples, their accuracy is gradually improved. The SVM model performs worst when the number of training samples is small, but with the increase in the number of training samples, its accuracy is also improved. Overall, the performance of SVM model and KNN is relatively inferior. In contrast, the modeling outcomes of ensemble learning models for the heart disease prediction data set are generally superior to those of single models. LightGBM performs best when the number of samples is less than 150. With the increase in samples, the accuracy of LightGBM, the XGBoost model, and the GBDT model is relatively good, and when the number of training samples is about 300-600, their accuracies are similar, but LightGBM is slightly better. Figure 10: The learning curve of test set. As can be seen from the figure, the LightGBM model, that is, the black dotted line, has a relatively stable trend of improving accuracy when the number of training samples is relatively small. When the bootstrap sampling approach is employed, the LightGBM model is likely to converge to a relatively stable accuracy level more rapidly, especially when the sample size obtained through sampling is relatively small. For instance, when the number of training samples increases starting from 100, the accuracy of the LightGBM model gradually improves. Moreover, in comparison with some other models, the LightGBM model demonstrates superior performance during this stage. This indicates that the LightGBM model is capable of learning the patterns within the data more rapidly. Moreover, when the bootstrap sampling generates a relatively small sample set, it can effectively reduce the consumption of both training time and computational resources. In the process of increasing the number of samples, the accuracy of LightGBM model is improved steadily. Compared with SVM, logistic regression, and the decision tree, when the sample size is not very large, such as in the sample size range of 300-400, the accuracy of LightGBM is already at a high level. If the bootstrap sampling can well represent the overall data distribution, the LightGBM model can use these samples to effectively construct the model, thus obtaining higher accuracy. In addition, the performance curve of LightGBM model is relatively smooth, and there is no significant fluctuation. This shows that the LightGBM model may show better stability in the case of different sample subsets generated by bootstrap sampling. Here, we use the paired \(t\)-test method to compare the significant performance tests of the basic model, LightGBM, and other models (Table 3). In statistics, the \(p\) value is used to judge whether there is a significant difference between two samples. Generally, when the \(p\)-value is less than the significance level (commonly set at 0.05), it can be concluded that there is a significant difference in the performance between the two models. Conversely, if the \(p\)-value is greater than or equal to the significance level, it can be inferred that there is no significant difference. Based on the \(p\)-value results obtained from the comparison of the models, an analysis of the performance disparities between the models can be conducted as follows.