The detection of diabetes through machine learning offers a promising avenue for improving early diagnosis and treatment. This study examines the application of various machine learning algorithms, including Decision Tree (DT), Gradient Boosting (GB), Logistic Regression (LR), Naive Bayes (NB), and Random Forest (RF), to predict the presence of diabetes based on medical data. We use a dataset containing various clinical parameters such as glucose levels, BMI, age, and insulin levels. Each algorithm is evaluated based on accuracy, precision, recall, and F1 score. Our results indicate that ensemble methods like Gradient Boosting and Random Forest exhibit superior performance compared to individual classifiers such as Decision Tree, Logistic Regression, and Naive Bayes. Specifically, Gradient Boosting and Random Forest both achieved the highest accuracy of 85.10%, significantly outperforming Naive Bayes and Decision Tree at 76.44%, and Logistic Regression at 50.96%. These findings underscore the potential of machine learning in enhancing diabetes detection, thereby facilitating timely medical intervention and improved patient outcomes. Future work will focus on optimizing these models and integrating them into clinical workflows for real-time diabetes risk assessment. The optimization process may involve fine-tuning hyperparameters, experimenting with different feature selection techniques, and employing more advanced ensemble methods.07/01/2024