## 3 Results
### Diabetes Readmission Prediction  
In Table 3, the Light Gradient Boosting Machine classifier scores highest in all metrics except for F1 and Kappa, where the Extreme Gradient Boosting performs best. In the context of diagnosing diabetes, high accuracy indicates that LightGBM makes the most-correct predictions across all cases evaluated. This is generally desirable, but high accuracy alone can be misleading if the dataset is imbalanced (i.e., there are significantly more non-diabetic than diabetic patients). The high AUC value for LightGBM suggests it is good at distinguishing between diabetic and non-diabetic patients. The fact that XGBoost has the highest F1-score suggests that it has a better balance between precision and recall compared to LightGBM, which may be particularly relevant if one is more important than the other--for example, if it is crucial to minimize false negatives due to the severe consequences of undiagnosed diabetes. The higher Kappa for XGBoost indicates a stronger agreement between the predicted and actual values, considering the possibility of random chance leading to agreement. Hence, even though LightGBM shows the highest performance in most metrics, XGBoost stands out in terms of F1 -score and Kappa. These suggest that XGBoost, while potentially slightly less accurate overall, might offer a more-reliable balance of precision and recall, making fewer mistakes for both false positives and false negatives, which in medical applications can be just as important as overall accuracy. Figure 5: Validation curves for Light Gradient Boosting Machine classifier used to predict diabetes. In practice, the choice between the models may come down to the specific clinical requirements and the costs associated with different types of diagnostic errors. In the end, the choice between these models would likely involve a trade-off depending on whether sensitivity or precision is more valued for the particular application of diagnosing diabetes. For example, in a screening context where false negatives could be more harmful, a model with a higher recall might be more appropriate. It is also possible that different healthcare settings might deploy different models accordingly; for instance, one might use LightGBM in general screening due to its high accuracy, and another might use XGBoost in high-risk populations where the costs of false negatives are particularly high. However, the F1 and Kappa values for LightGBM are very close to those for XGBoost, which has the highest values in these metrics. This suggests that LightGBM provides a near-equivalent balance of precision and recall and almost as much reliability and agreement as XGBoost. With LightGBM scoring slightly lower on the F1-score and Kappa, but still in close range to XGBoost, we favor LightGBM because it outperforms XGBoost in other important metrics like accuracy and AUC. Figure 6 presents a confusion matrix, i.e., a tabular representation illustrating the performance of the Light Gradient Boosting Machine classifier in predicting diabetes readmission. The three conditions represented are as follows. Condition 0: no readmission, Condition 1: readmission before 30 days, and condition 2: readmission more than 30 days after discharge. The confusion matrix elements, as denoted by x_ij, where i is the true class and j is the predicted class, quantify the percentage of predictions that fall into each category as follows. x11 = 3%: percentage of patients correctly predicted as 'no readmission' (true negatives for condition 0). x21 = 1%: percentage of patients incorrectly predicted as 'no readmission' when they were actually readmitted before 30 days. x31 = 0%: percentage of patients incorrectly predicted as 'no readmission' when they were actually readmitted after more than 30 days. x12 = 38%: Percentage of patients incorrectly predicted as'readmitted before 30 days' when there was no readmission. x22 = 37%: percentage of patients correctly predicted as'readmitted before 30 days' (true positives for condition 1).