# Heart Failure Prediction Based on Bootstrap Sampling and Weighted Fusion LightGBM Model
## 5 Experimental Results and Analysis
### Comparative Analysis of Model Effects
#### 5.2.3 Experiment and Comparison of Fusion Model  
Then, after the bootstrap sampling of the training set for many iterations, several LightGBM sub-models with differentiated data perspectives are constructed. According to the performance of each sub-model under different data distributions, a reasonable fusion weight is assigned to it. The following Table 4 is a comparison between the paper fusion model and common machine learning methods in performance indicators. As can be seen from the above table, the F1 score of LightGBM with bootstrap sampling and weighted fusion has reached 0.858108, which is at a high level in all models, second only to 0.862069 of GBDT. This indicates that, when taking both accuracy and recall into comprehensive consideration, it exhibits outstanding overall classification performance. It is capable of striking a better balance between the accuracy of predicting positive cases and the coverage of positive cases, thereby achieving ideal outcomes in classification tasks. The recall rate of LightGBM using bootstrap sampling and weighted fusion is 0.888112, which is the highest among all the compared models. This means that it has excellent ability in identifying positive samples. When compared with other models, it is less likely to overlook the actual positive samples. Instead, it can more comprehensively identify the samples that should be classified as positive. This constitutes a crucial advantage in numerous scenarios where a high level of positive sample detection is demanded. For example, in the field of disease diagnosis, the goal is to ensure that positive cases are not missed as much as possible, and this model's ability serves this purpose effectively. The original accuracy of LightGBM was 0.829710. After bootstrap sampling and weighted fusion, the accuracy was improved to 0.847826. This demonstrates that the fusion operation can effectively enhance the model's overall capability of making correct predictions. As a result, the model is able to yield more accurate prediction outcomes and decrease the likelihood of making incorrect predictions during the classification of diverse samples. When compared with the baseline LightGBM model, the accuracy of the fusion model has witnessed an increase of 2.183413%. This improvement clearly indicates that the overall classification precision of the model has been elevated. The recall rate has experienced an increment of 4.098356%, which clearly demonstrates that the model has significantly enhanced its capability to identify positive samples. As a result, it can effectively prevent the oversight of actual positive samples. The accuracy rate has witnessed an increase of 0.696449%. Although the margin of increase is relatively modest, it still indicates that the proportion of true positive cases has risen to some degree. This, in turn, has decreased the \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **Accuracy** & **Recall** & **Precision** & **F1 score** \\ \hline SVM & 0.735507 & 0.769230 & 0.733333 & 0.750853 \\ KNN & 0.702899 & 0.762238 & 0.694268 & 0.726667 \\ Decision Tree & 0.818841 & 0.853147 & 0.807947 & 0.829932 \\ GBDT & 0.855072 & 0.874126 & 0.850340 & 0.862069 \\ XGBoost & 0.829710 & 0.853147 & 0.824324 & 0.838488 \\ LightGBM & 0.829710 & 0.853147 & 0.824324 & 0.838488 \\ Bootstrap sampling and weighted fusion LightGBM & 0.847826 & 0.888112 & 0.830065 & 0.858108 \\ Increase relative to baseline model (\%) & 2.183413 & 4.098356 & 0.696449 & 2.339926 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of indicators of each model. likelihood of misjudgment. The F1-score has increased by 2.339926%. This comprehensively indicates that the model demonstrates superior performance in terms of both accuracy and recall. Compared with the baseline model, its overall performance has been improved to different extents across various key indicators. Consequently, it is anticipated to exhibit more favorable outcomes in practical application scenarios.