# Attention-Oriented CNN Method for Type 2 Diabetes Prediction
## 4 Results
### Comparative Analysis of Deep Model Performance across Datasets  
For this experiment, we use K-fold cross-validation on the PID dataset and NHANES dataset to divide the datasets into 3-fold, 5-fold, and 10-fold, respectively, to evaluate the proposed SECNN model, CNN model, and traditional ML model (SVM, LR, RF, and DT), and the experimental results are compared and summarized to verify our contribution in this paper.  
We use 3-fold, 5-fold and 10-fold cross-validation on the dataset, respectively. The ROC curves and accuracy comparisons of SECNN, CNN, SVM, RF, DT and LR are shown in Figures 9 and 10 respectively. We can observe that as the partition fold number K increases, the accuracy of all models increases, and the model performance is the best when using 10-fold cross-validation. We find that compared to the traditional ML model, the DL model we propose exhibits superior performance. Compared with other models, the accuracy and AUC of all dataset partitioning protocols corresponding to the SECNN model are the highest. The model performance corresponding to the NHANES dataset and PID dataset is shown in Tables 8 and 9, respectively. Compared with traditional ML models, our proposed SECNN model and CNN model perform better. This experiment uses precision, recall, F1-Score, accuracy and AUC as evaluation indicators to evaluate the performance of the model. When predicting using the NHANES dataset, the corresponding evaluation indicators of CNN achieve performance results of 92.77%, 93.18%, 92.74%, 93.18%, and 92.29%, respectively; SECNN achieves performance results of 93.85%, 94.12%, 93.78%, 94.12%, and 92.79%, respectively; and the RF performance is the best among the ML models, achieving performance results of 90.93%, 91.53%, 91.09%, 91.53%, and 86.63%, respectively. Compared with CNN, the performance of SECNN is improved by 1.08%, 0.94%, 1.04%, 0.94%, and 0.50%, respectively. CNN achieves performance results of 87.41%, 87.58%, 87.44%, 87.58%, and 91.37%, respectively; SECNN achieves performance results of 89.36%, 89.47%, 89.38%, 89.47%, and 91.70%, respectively; and the ML model has the best RF performance, achieving performance results of 87.50%, 87.58%, 87.53%, 87.58%, and  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**No.** & **Feature** & **F-Score** & \(\mathbf{p}\)**Value** \\ \hline
1 & Insulin & 255.4176 & 0.3482 \\
2 & Glucose & 119.7174 & 0.0003 \\
3 & skin thickness & 79.3331 & 0.8449 \\
4 & Age & 52.4475 & 0.0006 \\
5 & BMI & 45.1721 & 0.0000 \\
6 & Pregnancies & 36.1943 & 0.0713 \\
7 & blood pressure & 20.5297 & 0.0223 \\
8 & Diabetes pedigree function & 17.7658 & 0.0893 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Feature importance analysis results of the PID dataset.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Data** & **0** & **1** \\ \hline PID & 0.5711 & 0.4289 \\ NHANES & 0.5237 & 0.4763 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Optimal set weight parameters for the dataset.  
90.41%, respectively. Compared with CNN, the performance of SECNN is improved by 1.95%, 1.89%, 1.94%, 1.89%, and 0.33%, respectively. Compared with traditional ML models, we propose that both CNN and SECNN have significant improvements, among which SECNN has the best performance. This further validates the advantages of introducing the SE module in our research. It is proved that the SECNN model exhibits better fitting ability in T2 DM prediction, indicating that the SECNN model can well adapt to the proposed diabetes prediction framework.