Skip to content
Open access

Analysis of the Accuracy of Machine Learning Models Using the Confusion Matrix Method for the Naive Bayes and CatBoost Algorithms in Diagnosing Diabetes

Jul 2026 · Journal of social research · 0 citations · 21 references

Abstract

Diabetes is a chronic metabolic disease characterized by high blood glucose levels that can lead to severe complications affecting various organs. The increasing prevalence of diabetes requires an accurate and efficient diagnostic approach to support early detection and medical decision-making. The development of machine learning technology provides opportunities to assist disease diagnosis by analyzing patient health data and identifying patterns associated with diabetes conditions. This study aims to compare the accuracy performance of the Naive Bayes and CatBoost algorithms in diagnosing diabetes using the confusion matrix evaluation method. The research method consists of several stages, including data collection, data preprocessing, model selection, model training, and model evaluation. The dataset used was obtained from Kaggle, consisting of 768 records with nine attributes, including pregnancies, glucose level, blood pressure, skin thickness, insulin, body mass index, diabetes pedigree function, age, and outcome classification. The models were trained using 80% training data and 20% testing data. The evaluation results showed that the Naive Bayes algorithm achieved an accuracy of 79%, while the CatBoost algorithm obtained a higher accuracy of 81%. These findings indicate that CatBoost provides better classification performance compared to Naive Bayes for diabetes diagnosis in this dataset. Therefore, CatBoost can be considered a more effective machine learning approach to support diabetes prediction. Future research is recommended to utilize larger datasets, optimize model parameters, and explore other advanced algorithms to improve diagnostic accuracy.

Read PDF

Similar papers

Open access Jul 2026

The Implementation of Support Vector Machine and Naïve Bayes Algorithm to Predict Diabetes

The significant increase in diabetes mellitus cases within the community demands a technology-based solution that can provide accurate, efficient, and reliable predictions. This study aims to evaluate the impact of various data preprocessing schemes on the performance of the Gaussian Naive Bayes (GNB) and Support Vector Machine (SVM) algorithms in classifying diabetes risk. The dataset used in this research was sourced from the UCI Machine Learning Repository and consists of 520 records with 16 symptom features and 1 target label. The preprocessing stages include handling missing values, encoding categorical features, normalizing numerical data using StandardScaler, balancing the dataset with the Synthetic Minority Over-sampling Technique (SMOTE), and feature selection using the SelectKBest method. A total of nine preprocessing scheme combinations were tested for each algorithm. The experimental results show that for the GNB model, the best performance was achieved using the combination of StandardScaler, SMOTE, and SelectKBest (k=5), reaching an accuracy of 94.53%, precision 98.36%, recall 90.91%, and f1-score 94.49%. Meanwhile, for the SVM model, the highest performance was obtained through the combination of StandardScaler and RBF kernel hyperparameter tuning, achieving an accuracy of 99.04%, precision 99.05%, recall 99.04%, and f1-score 99.03%. The evaluation was conducted using metrics such as accuracy, precision, recall, F1-score, confusion matrix, and learning curve visualization. These findings highlight the critical role of proper preprocessing in enhancing predictive model performance. This study is expected to serve as a reference for developing early detection systems for diabetes based on machine learning.

Joshua Roy Danna Lacanlale, Vitri Tundjungsari · 0 citations
Open access Jul 2026

Predictive modeling of early diabetes diagnosis: An evaluation of XGBoost, support vector machine, and random forest classifiers

This study addresses the challenge of delayed diagnosis of diabetes, a condition that often leads to severe complications if not detected early. The primary objective is to evaluate and compare the performance of three machine learning classifiers XGBoost, Support Vector Machine (SVM), and Random Forest for early diabetes prediction using clinical and lifestyle data. The study utilizes the Diabetes Health Indicators dataset, which includes features such as body mass index (BMI), blood pressure, cholesterol levels, and physical activity. The dataset was sourced from a publicly available repository and preprocessed through handling missing values, feature scaling, and encoding categorical variables. The models were trained on the processed dataset and evaluated using accuracy, precision, recall, and F1-score metrics, alongside exploratory data analysis to understand feature relationships. Results show that all three models performed effectively, with XGBoost achieving the highest accuracy of 85.11%, followed by SVM at 84.82%, and Random Forest at 83.16%. These findings highlight the strength of ensemble and boosting techniques in handling complex health data and accurately predicting diabetes risk. In conclusion, machine learning models demonstrate strong potential for supporting early diabetes diagnosis and improving clinical decision-making. It is recommended that healthcare systems adopt XGBoost-based predictive models in clinical decision support tools for early screening, while future studies should validate these models using real-world clinical data to enhance reliability and generalizability.

Idehen Emmanuel Imafidon, Chikere Obinna Munachiso, Dominic Evans Onyebuchi et al. · 0 citations
Open access Jul 2026

Evaluation and Comparison of Machine Learning Methods for Type 2 Diabetes Classification and Associated Factors

Objectives Type 2 diabetes mellitus (T2DM) is a prevalent chronic metabolic disorder associated with serious complications, including nephropathy, cardiovascular disease, retinopathy, and neuropathy. Given its increasing incidence and the complexity of associated factors—such as obesity, metabolic syndrome, and sedentary lifestyle—accurate identification is essential. This study aimed to evaluate and compare the performance of several machine learning algorithms to identify key associated factors and detect individuals with T2DM within this dataset. Methods A publicly available dataset from Kaggle, comprising health records of 99,982 individuals, was used. Five supervised machine learning models were evaluated: Bayesian ridge regression, logistic regression, extreme gradient boosting (XGBoost), artificial neural networks, and random forest. Each model was trained and evaluated to assess classification performance. Performance was measured using the area under the receiver operating characteristic curve (AUC–ROC) and accuracy. SHapley Additive Explanations (SHAP) values were used to interpret model outputs and identify the most influential features. Results Among the five models, XGBoost demonstrated the highest performance, achieving an accuracy of 96% and an AUC–ROC of 0.98. SHAP analysis identified hemoglobin A1c, blood glucose, age, body mass index, and sex as the most influential predictors of T2DM. Conclusion: XGBoost was the most effective algorithm for identifying individuals with T2DM in this dataset. It also provided insights into the relative importance of clinical features, supporting more precise classification. However, results should be interpreted with caution until validated in independent cohorts.

Masoumeh Dadashpour, M. Yousefi, S. Effati et al. · 0 citations
Open access Sep 2026

Application of the Gaussian Naive Bayes Algorithm for Diabetes Mellitus Risk Classification Based on Simulated Patient Medical Record Data

Diabetes mellitus is a chronic disease with a number of cases that tends to increase over time andcan lead to various complications if it is not recognized and treated at an early stage. In thiscontext, the application of data mining techniques can be used to identify and classify the risklevel of diabetes based on patients’ characteristics, thereby supporting a more effective decisionmaking process. This study applies the Gaussian Naive Bayes algorithm to classify the riskof diabetes mellitus using 200 simulated data records representing the characteristics of patients medical records. The data consist of several attributes, including age, gender, body weight, height, Body Mass Index (BMI), blood pressure, glucose level, cholesterol level, physical activity, family history of diabetes, smoking habits, and diabetes status as the target variable. The research process consists of several stages, beginning with Exploratory Data Analysis (EDA) to understand the characteristics of the dataset, followed by data preprocessing, conversion of categorical data using the Label Encoding method, and division of the dataset into training and testing sets using an 80:20 ratio. Subsequently, a classification model was developed using theGaussian Naive Bayes algorithm, and its performance was evaluated using several evaluation metrics, including Accuracy, Precision, Recall, F1-Score, Confusion Matrix, and Classification Report. Based on the testing results, the model achieved an Accuracy of 97.50%, Precision of 94.74%, Recall of 100%, and F1-Score of 97.30%. These results indicate that the Gaussian Naive Bayes algorithm is capable of providing highly accurate classification results on the simulated dataset used in this study. Therefore, the algorithm has the potential to serve as a supporting approach for the identification and classification of diabetes mellitus risk.

Ilamsyah, Aditya Dwi Nurcahyo, Mutia Anisa · 0 citations
Open access Jul 2026

Multi-Metric Evaluation of Machine Learning Algorithms for Diabetes Prediction Using Feature Importance and ROC Analysis

Diabetes mellitus has become a major global health threat, and many undiagnosed cases remain undetected due to some limitations of the conventional diagnostic methods. Despite the promising results of machine learning (ML) for early diabetes diagnosis, the majority of the current research assessing algorithms either uses insufficient metrics or does not follow a consistent assessment approach. This paper addresses that gap by utilising an integrated evaluation framework. The framework includes feature importance analysis, Pearson correlation assessment, confusion matrix decomposition, and ROC-AUC comparison. It applies this framework to the Pima Indians Diabetes Dataset (mde) and four popular ML classification algorithms: Naive Bayes, Decision Tree, Random Forest, and Logistic Regression. The most significant predictors, according to our feature analysis, were glucose (27.6%), body mass index (16.0%), age (12.7%), and diabetes pedigree function (12.7%). Among the classifiers, Random Forest exhibited the greatest accuracy (76.0%) and precision (68.1%), Naive Bayes the best recall (64.8%), and Logistic Regression the highest AUC-ROC (82.3%). For patients at high risk, the models' virtual projections across all three risk profiles were in agreement. Model selection should be determined by the unique clinical screening aim, since these findings suggest that there is no one better universal method. Random Forest and Logistic Regression are the most promising for assisting in preliminary diabetes prediction, although further validation on diversity datasets is needed prior to clinical deployment.

F. Setiawan, Tri Sugihartono · 0 citations
Open access Jul 2026

Diabetes Prediction System Using Machine Learning

Healthcare is one of the most significant application domains of Machine Learning, where early disease prediction can help improve patient outcomes and support clinical decision-making. This dissertation presents a Diabetes Prediction and Analysis System Using Machine Learning that predicts the likelihood of a disease based on various patient health parameters and medical records. The system utilizes a healthcare dataset containing attributes such as glucose level, blood pressure, body mass index (BMI), insulin level, age, and other relevant medical factors. The collected data is pre-processed through missing value handling, feature normalization, and data partitioning to enhance prediction performance. Multiple Machine Learning algorithms, including Support Vector Machine (SVM), K-Nearest Neighbours (KNN), Decision Tree, and Random Forest, are employed to develop predictive models. The performance of these models is evaluated using metrics such as accuracy, precision, recall, F1-score, and confusion matrix. Comparative analysis is carried out to identify the most suitable algorithm for disease prediction. The implementation of the proposed system is carried out in MATLAB, utilizing its Machine Learning and data analysis tools for model training, testing, performance evaluation, and result visualization. Experimental results demonstrate that Machine Learning techniques can effectively predict disease occurrence with high accuracy, thereby assisting healthcare professionals in early diagnosis and treatment planning. The proposed system provides an efficient and reliable approach for disease prediction and analysis, contributing to improved healthcare management and decision support.

Sunidhi, Mothe Rahul, Mr. D. Pramod Kumar et al. · 0 citations