# Attention-Oriented CNN Method for Type 2 Diabetes Prediction
## 5 Discussion  
The classification of diabetes is a problem in both the computer field and the medical field. Diabetes prediction is considered a feasible solution in ML, especially in the DL field, which has attracted widespread attention. In the data-preprocessing stage, we use the mean value to fill in missing values because using the mean value can not only maintain the overall statistical characteristics of the original data but also avoid introducing additional bias. And in medical research, the mean value of a specific variable can often reflect the general characteristics of the group and ensure the quality of the dataset. The median value \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Dataset** & **Best Model** & **Accuracy (\%)** & **Related Literature** \\ \hline \multirow{3}{*}{NHANES} & RF & 90\% & [PERSON] et al. [25] \\  & SVM & 90.82\% & [PERSON] et al. [52] \\  & SECNN & 94.12\% & this study \\ \hline \multirow{3}{*}{PID} & RF & 83\% & [PERSON]. [27] \\  & LR & 82.46\% & [PERSON] et al. [30] \\ \cline{1-1}  & NN & 88.6\% & [PERSON] et al. [28] \\ \cline{1-1}  & MLFNN & 84.17\% & [PERSON] et al. [31] \\ \cline{1-1}  & SECNN & 89.47\% & this study \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Comparison of this study with historical literature on the NHANES and PID datasets. Figure 10: ROC curves for prediction in NHANES dataset and PID dataset, respectively. (**a–c**) show the ROC curves using 3-fold, 5-fold and 10-fold cross-validation on the NHANES dataset, respectively. (**d–f**) represent the ROC curves for prediction using 3-fold, 5-fold and 10-fold cross-validation on the PID dataset, respectively. is used for outlier replacement because the median value is more robust against extreme values. When dealing with outliers, we must minimize the negative impact of these extreme values on model performance. As a non-parametric statistic, the median is not affected by extreme values, so it can maintain the consistency of the data when replacing outliers. Through ANOVA, we can determine which features are statistically significantly associated with the occurrence of diabetes, which provides a solid foundation for subsequent model building and ensures that the model can focus on the variables most likely to affect disease prediction. In this paper, we design a CNN and propose SECNN for diabetes prediction, and use five of the most popular ML algorithms to identify and classify T2 DM, including SVM, LR, RF, DT, and ANN. Each model has its own pros and cons. For example, DT is easy to understand and fit, LR is simple and fast, and SVM is very accurate in classifying nonlinear data. The traditional CNN model uses the same weight on each feature channel. However, different features have different impacts on model performance, so we introduce the SE module to establish SECNN. After comparative analysis, the SECNN model has the best performance, and its performance is significantly improved compared to CNN. Taking the NHANES dataset as an example, the SECNN model shows significant performance improvement compared with the traditional CNN model. The precision rate is increased by 1.08 percentage points, indicating that the model's accuracy in predicting positive classes has increased, that is, it can more accurately identify real positive examples. The recall rate is increased by 0.94 percentage points, indicating that the model captured positive classes. The sample proportion increased, reducing the number of missing positive examples. The F1 score is increased by 1.04 percentage points, which reflects a better balance between precision and recall. The accuracy is also increased by 0.94 percentage points, showing that the model has improved. The accuracy of judgments is improved in the overall sample. In addition, the AUC is increased by 0.50 percentage points, further verifying the model's enhanced ability to distinguish categories.