## 3 Results
### Prediction of the Readmission  
As with the mortality prediction, a 10-fold cross-validation approach was used to develop a prediction model for 30-day readmission rates in patients with type 2 diabetes. The model integrated data collected during the patient's last 24 h before discharge and the corresponding treatment plan provided by the attending physician. The dataset was divided into training (80%) and testing (20%) subsets, and rigorous statistical analysis was performed to evaluate the performance of the model. The results summarized in Table 5 and shown in Figure 5 show the AUROC scores and ROC curves for various classifiers. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Terms** & **Method** & **Precision** & **Recall** & **F1 Score** & **Accuracy** \\ \hline \multirow{8}{*}{3 Days} & Adaboost & 0.1206 \(\pm\) 0.0104 & 0.6165 \(\pm\) 0.0087 & 0.2015 \(\pm\) 0.0152 & 0.8766 \(\pm\) 0.0045 \\  & Bagging & 0.0998 \(\pm\) 0.0041 & 0.8117 \(\pm\) 0.0006 & 0.1778 \(\pm\) 0.0065 & 0.8107 \(\pm\) 0.0088 \\  & GaussianNB & 0.1129 \(\pm\) 0.0162 & 0.5225 \(\pm\) 0.0842 & 0.1849 \(\pm\) 0.0236 & 0.8832 \(\pm\) 0.0195 \\  & Logistic Regression & 0.0937 \(\pm\) 0.0083 & 0.7336 \(\pm\) 0.0157 & 0.1666 \(\pm\) 0.0135 & 0.8135 \(\pm\) 0.0139 \\  & MLP Classifier & 0.0845 \(\pm\) 0.0041 & 0.5844 \(\pm\) 0.1078 & 0.1467 \(\pm\) 0.0024 & 0.8284 \(\pm\) 0.0367 \\  & SVC & 0.0938 \(\pm\) 0.0064 & 0.7607 \(\pm\) 0.0232 & 0.1669 \(\pm\) 0.0101 & 0.8082 \(\pm\) 0.0114 \\ \hline \multirow{8}{*}{30 Days} & Adaboost & 0.3093 \(\pm\) 0.0148 & 0.8029 \(\pm\) 0.0233 & 0.4464 \(\pm\) 0.0182 & 0.8256 \(\pm\) 0.0101 \\  & Bagging & 0.2505 \(\pm\) 0.0031 & 0.8428 \(\pm\) 0.0132 & 0.3862 \(\pm\) 0.0051 & 0.7655 \(\pm\) 0.0094 \\  & GaussianNB & 0.3487 \(\pm\) 0.0114 & 0.5062 \(\pm\) 0.0275 & 0.4129 \(\pm\) 0.0166 & 0.8742 \(\pm\) 0.0031 \\  & Logistic Regression & 0.2491 \(\pm\) 0.0097 & 0.7691 \(\pm\) 0.0258 & 0.3763 \(\pm\) 0.0141 & 0.7777 \(\pm\) 0.0032 \\  & MLP Classifier & 0.2563 \(\pm\) 0.0145 & 0.7818 \(\pm\) 0.0171 & 0.3856 \(\pm\) 0.0146 & 0.7819 \(\pm\) 0.0092 \\  & SVC & 0.2577 \(\pm\) 0.0054 & 0.7749 \(\pm\) 0.0184 & 0.3868 \(\pm\) 0.0083 & 0.7854 \(\pm\) 0.0066 \\ \hline \multirow{8}{*}{365 Days} & Adaboost & 0.2922 \(\pm\) 0.0092 & 0.7579 \(\pm\) 0.0224 & 0.4213 \(\pm\) 0.0063 & 0.8161 \(\pm\) 0.0066 \\  & Bagging & 0.2636 \(\pm\) 0.0097 & 0.8471 \(\pm\) 0.0219 & 0.4018 \(\pm\) 0.0105 & 0.7777 \(\pm\) 0.0128 \\ \cline{1-1}  & GaussianNB & 0.3446 \(\pm\) 0.0417 & 0.5098 \(\pm\) 0.0169 & 0.4093 \(\pm\) 0.0289 & 0.8693 \(\pm\) 0.0136 \\ \cline{1-1}  & Logistic Regression & 0.2491 \(\pm\) 0.0064 & 0.7547 \(\pm\) 0.0276 & 0.3743 \(\pm\) 0.0034 & 0.7773 \(\pm\) 0.0037 \\ \cline{1-1}  & MLP Classifier & 0.2333 \(\pm\) 0.0342 & 0.7514 \(\pm\) 0.0357 & 0.3533 \(\pm\) 0.0353 & 0.7534 \(\pm\) 0.0392 \\ \cline{1-1}  & SVC & 0.2463 \(\pm\) 0.0068 & 0.7485 \(\pm\) 0.0155 & 0.3706 \(\pm\) 0.0074 & 0.7755 \(\pm\) 0.0005 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The mortality diagnostic precision, recall, F1 score, and accuracy. Figure 4: Comparison of AUROC scores for different machine learning methods across 3 days, 30 days, and 365 days. Table 5 presents the AUROC scores of different classifiers, indicating their respective performance in predicting readmission rates. Notably, the MLP classifier achieved the highest AUROC score of 0.8487, outperforming the other methods. This suggests its superior ability to discriminate between readmitted and non-readmitted patients. Figure 5 depicts the ROC curves for the classifiers, visually representing their trade-off between the true positive rate and false positive rate. The curves illustrate the performance of each classifier across different threshold values. Our model, utilizing data collected within 24 h before hospital discharge, demonstrates promising accuracy, approaching 85%, in predicting readmission rates for type 2 diabetes patients within 30 days post-discharge.