A MACHINE LEARNING APPROACH FOR DETECTING TYPE 2 DIABETIC DISEASE

Published: 18 August 2026| Version 1 | DOI: 10.17632/ksdk5m939c.1
Contributors:
,
,

Description

This dataset contains 1,500 patient records developed for research on machine learning-based classification of Type 2 diabetes mellitus. The dataset contains demographic, anthropometric, clinical, and medical-history variables that can be used to investigate the classification of patients into diabetic and non-diabetic groups. The dataset consists of nine variables: Age, Gender, Body Mass Index (BMI), Blood Pressure (Systolic), Glucose Level, HbA1c, Family History, Hypertension Status, and Diabetes Status. The first eight variables are used as input variables, while Diabetes Status serves as the target variable. The target variable is represented as 0 for non-diabetic and 1 for diabetic patients. The dataset contains 820 diabetic records and 680 non-diabetic records, representing approximately 54.7% and 45.3% of the dataset, respectively. The relatively similar distribution of the two classes makes the dataset suitable for binary classification experiments without requiring synthetic class balancing in the reported study. The dataset was prepared for the study titled “A Machine Learning Approach for Detecting Type 2 Diabetic Disease” at Osun State University, Osogbo, Nigeria. The accompanying research investigates and compares Logistic Regression, Decision Tree, and Random Forest classifiers using the same dataset. Data preprocessing includes data inspection, handling of missing observations, categorical-variable encoding, appropriate feature scaling, and stratified partitioning into training and testing subsets. The reported methodology uses an 80:20 training-testing split with stratification and random state 42. The dataset is intended for academic research, machine learning experimentation, benchmarking, educational purposes, and investigation of clinical data classification methods. It should not be interpreted as a clinically validated diagnostic tool, and predictions generated from models trained using this dataset should not replace professional medical assessment or clinical decision-making. Because Glucose Level and HbA1c are included among the predictors and are directly relevant to clinical diabetes assessment, results based on this dataset should be interpreted as diabetes-status classification rather than prediction of future diabetes before diagnostic measurements are available.

Files

Steps to reproduce

1. Download diabetes_dataset Version 2.csv from the Mendeley Data repository. 2. Load the CSV file using Python, R, MATLAB, or another statistical/data-analysis software package. 3. Inspect the dataset structure and identify the nine variables: Age, Gender, BMI, Blood Pressure (Systolic), Glucose Level, HbA1c, Family History, Hypertension Status, and Diabetes Status. 4. Use Diabetes Status as the binary target variable, where 0 represents non-diabetic and 1 represents diabetic patients. 5. Inspect the dataset for missing values, inconsistent observations, duplicate records, and invalid entries. 6. Handle missing observations using an appropriate preprocessing strategy. The accompanying study identifies missing observations as a data-quality issue and applies preprocessing before model development. 7. Encode categorical variables such as Gender, Family History, and Hypertension Status into numerical representations using an appropriate encoding technique. 8. Apply feature scaling where required. In the reported experiment, numerical variables used by Logistic Regression were standardised, while Decision Tree and Random Forest did not require scaling. 9. Divide the dataset into training and testing subsets using an 80:20 stratified split. Use random_state=42 to support reproducibility. The test set should remain isolated from model selection and tuning. 10. Train the following supervised machine learning classifiers: • Logistic Regression • Decision Tree • Random Forest 11. Evaluate the trained models using Accuracy, Precision, Recall/Sensitivity, Specificity, F1-score, ROC-AUC, and confusion matrix. 12. Compare the predictive performance of the three models using the same testing data and evaluation criteria. 13. Examine feature contributions using appropriate interpretation methods, including model coefficients, feature importance, and SHAP where applicable. The accompanying study uses SHAP to investigate the contribution of input variables to model predictions. 14. Report the results as diabetes-status classification performance. Because Glucose Level and HbA1c are included as predictors, the resulting models should not be interpreted as tools for predicting future diabetes before diagnostic measurements are available.

Institutions

Categories

Artificial Intelligence, Health Informatics, Clinical Data Collection

Licence