## 1 Introduction
### Early Diagnosis and Prediction of Diabetes
This requires evaluation by training the method (which teaches the model) and testing, which is used to assess its accuracy. Reliability measures, such as the calculation of accuracy and precision, F1 score, Area Under the Curve (AUC), and ROC curve (Receiver Operating Characteristic), recall, etc., must also be performed [21]. Several predictor models for diabetes and/or its complications have been developed to provide clinical guidance and early detection [23]. One such example is the study by [PERSON] et al. [24], who developed an ML-based diabetes risk prediction model using follow-up data from patients diagnosed with T2 DM in the Haizhu community, Guangzhou, China, between 2016 and 2023. A diabetes risk assessment and prediction model and scoring scale were designed, which classifies risk into five levels: low, relatively low, moderate, relatively high, and high. To build the model, data pre-processing and balancing methods (to handle imbalance in the sample) and algorithms were used to select the most relevant characteristics, which were body mass index (BMI), age (years), systolic and diastolic blood pressure (mmHg), blood pressure difference (systolic-diastolic), frequency and duration of exercise (number of times per week and minutes per session), and smoking (number of cigarettes/day). The RF model was used because of its high accuracy (91.41%), being evaluated using confusion matrices and indicators such as accuracy, precision, sensitivity, and F-1 score. The resulting scoring scale was designed to be understandable and applicable for both family physicians and patients' self-diagnosis. [PERSON] et al. [22] studied 234 patients with T2 DM (of whom 166 had diabetic nephropathy, DN) from Jilin University First Hospital for 1.5 years to identify specific biochemical indicators for the development of a predictive model of the risk of developing DN in these patients. Five ML algorithms were evaluated to identify the most relevant clinical and anatomo-pathological features (XGBoost, gradient boosting, RL, RF, and SVM),  
Figure 2: Representation of the multilayer perceptron artificial neural network. with the RF algorithm best predicting progression to ND. This model identified glomerular filtration rate, glycated albumin, uric acid levels, HbA1c, and blood zinc values as main indicators. The model was validated internally and externally, showing good predictive accuracy and diagnostic efficacy (AUC = 0.960). In addition to the diagnosis of T2 DM and the prediction of its complications, AI can also be used to optimise the treatment of these patients. Thus, [PERSON] et al. [25] developed a digital therapy called 'Glucura' that integrates continuous blood glucose monitoring systems and various ML algorithms to personalise lifestyle interventions for patients. The algorithms used include RF (for the selection of statistical features to be taken into account) and deep learning-based neural networks (designed to provide personalised predictions of blood glucose responses to specific meals), using a large dataset of detailed meal compositions and their corresponding effects on blood glucose. Also, in relation to the treatment of T2 DM, [PERSON] et al. [26] developed a predictive algorithm to identify diabetic patients who might benefit from therapy with Insulin U-500R, a concentrated formulation given to patients requiring high doses. Several supervised ML models were applied, including the LASSO-penalised logistic regression method and extreme gradient boosted trees (XGBoost), and their predictive performance was evaluated using ROC curves and precision-recall curves. The model with the highest predictive ability was logistic regression, and significant predictor parameters for initiating therapy included obesity, neuropathy, HbA1c values between 8 and 9% and >9%, elevated urea nitrogen (\(\geq\)112 mg/d) and ALT levels. Studies using ML relating the concepts of microbiota and T2 DM are scarce. [PERSON] et al.