نموذج التنبؤ والتصنيف لمرض السكري باستخدام التعلم الآلي

رسالة ماجستير

اسم الباحث : اية احمد هاشم

اسم المشرف : أ.م.د.اياد حميد موسى

الكلمات المفتاحية :

الكلية : كلية علوم الحاسوب وتكنولوجيا المعلومات

الاختصاص : علوم الحاسوب

سنة نشر البحث : 2025

تحميل الملف : اضغط هنا لتحميل البحث

الخلاصة

يُعد داء السكري أحد أكثر الأمراض المزمنة انتشارًا على مستوى العالم، إذ يصيب الملايين ويؤدي إلى مضاعفات خطيرة مثل أمراض القلب والفشل الكلوي وفقدان البصر. يُعد الكشف المبكر والتصنيف الصحيح لأنواع داء السكري (النوع الأول والنوع الثاني) أمرًا ضروريًا لتخطيط العلاج الفعال وإدارة المرض على المدى الطويل. ويمكن للكشف المبكر والتنبؤ بمرض السكري أن يُحسّن بشكل كبير نتائج المرضى، مما يجعله مصدر قلق صحي عالمي. يُعد تحليل بيانات المرضى يدويًا طريقة شائعة في تقنيات التشخيص التقليدية، ولكنه قد يكون شاقًا وعرضة للخطأ البشري. تتمثل مشكلة البحث التي يتناولها هذا البحث في عدم كفاءة ودقة طرق التشخيص التقليدية، والتي تهدف هذه الدراسة إلى التغلب عليها باستخدام مناهج آلية قائمة على البيانات. تبحث هذه الدراسة في استخدام البيانات السريرية والديموغرافية جنبًا إلى جنب مع تقنيات التعلم الآلي (ML) للتنبؤ بمرض السكري وتصنيفه. تستخدم الدراسة مجموعة متنوعة من ميزات مجموعات البيانات، مثل عوامل نمط الحياة والبيانات الحيوية والسجلات السريرية، لتدريب وتقييم نماذج التعلم الآلي المختلفة، مثل decision trees, Support vector machine (SVM), K-nearest neighbors (KNN), logistic regression, random forest, bagging, voting, Naïve bayse, XGBoost(Extreme Gradient Boosting), LightGBM (Light Gradient Boosting Machine) ، لإنشاء نماذج تنبؤية. تتضمن مجموعات البيانات الثلاث المستخدمة في هذه الدراسة مجموعتي بيانات معروفتين تم الحصول عليهما من مستودعات متاحة للجمهور مثل مؤشرات صحة السكري التي تحتوي على 253680 عينة، ومجموعة بيانات LMCH للسكري التي تحتوي على 1000 عينة مريض، ومجموعة بيانات واقعية تم جمعها من مركز الإمام حسن المجتبى للسكري والغدد الصماء في العراق، محافظة كربلاء، والتي تحتوي على 1596 عينة مريض، وتشمل ميزات مثل العمر ومؤشر كتلة الجسم ومستويات الجلوكوز وضغط الدم ومستويات الأنسولين. تُطبّق تقنيات المعالجة المسبقة، بما في ذلك التعامل مع المتغيرات الفئوية، والتعامل مع القيم المفقودة، وإزالة التكرارات، وقياس الميزات، ومعالجة اختلال توازن الفئات، واختيار الميزات، لتحسين أداء النموذج. تُقيّم النماذج باستخدام مصفوفة الارتباك، وaccuracy وprecision وrecall و F1-score و AUC . ووفقًا للنتائج، حقق bagging دقة بنسبة 89.27%، بينما حقق KNN دقة بنسبة 86.9%، وهي أعلى دقة في مجموعة البيانات 1. أما بالنسبة لمجموعة البيانات 2، فقد حققت decision trees دقة بنسبة 99.50%. باستخدام مجموعة بيانات واقعية، حققت random forest وLightGBM أعلى دقة بنسبة 99.79% في التنبؤ بمرض السكري. بالإضافة إلى ذلك، حقق مصنف voting دقة بنسبة 95.74% في تحديد نوع مرض السكري، مما يؤكد فعاليته في مهام التصنيف.

Prediction and Classification Model of Diabetes Using Machine Learning

Abstract

Diabetes is one of the most prevalent chronic diseases globally, affecting millions and leading to serious complications such as heart disease, kidney failure, and vision loss. Early detection and proper classification of diabetes types (Type 1 and Type 2) are essential for effective treatment planning and long-term disease management. Early detection and prediction of diabetes can greatly improve patient outcomes, making it a global health concern. Manual patient data analysis is a common method of traditional diagnostic techniques, but it can be laborious and prone to human error. The research problem addressed here is the inefficiency and inaccuracy of traditional diagnostic methods, which this study aims to overcome using automated, data-driven approaches. This study investigates the use of clinical and demographic data in conjunction with machine learning (ML) techniques to predict and categorize diabetes. The study uses a variety of datasets features, such as lifestyle factors, biometric data, and clinical records, to train and assess different machine learning models, like decision trees, support vector machine (SVM), K-nearest neighbors (KNN), logistic regression, random forest, bagging, voting, Naïve bayse, XGBoost(Extreme Gradient Boosting), LightGBM (Light Gradient Boosting Machine), to create predictive models.
Three datasets used in this study include two well-known datasets sourced from publicly available repositories like the Diabetes Health Indicators containing 253,680 samples, the LMCH Diabetes dataset containing 1,000 patient samples, and a real-world dataset collected from the Imam Hassan Al-Mujtaba Diabetes and Endocrinology Center in Iraq, Karbala Governorate, containing 1,596 patient samples, includes features such as age, BMI, glucose levels, blood pressure, and insulin levels. Preprocessing techniques, including handling categorical variables, handling missing values, removing duplicates, feature scaling, addressing class imbalance and feature selection are applied to enhance model performance. The models are evaluated using confusion matrix, accuracy, precision, recall, F1-score, and AUC. According to the results, Bagging achieved an accuracy of 89.27%, while KNN achieved an accuracy of 86.9%, which are the highest on Dataset 1. For Dataset 2, the decision tree achieved an accuracy of 99.50%. Using a real-world dataset, Random Forest and LightGBM achieved the highest accuracy of 99.79% in predicting diabetes. Additionally, the voting classifier achieved an accuracy of 95.74% in identifying the type of diabetes, confirming its effectiveness in classification tasks.
This study’s innovation lies in combining real-world and large-scale datasets with advanced ensemble learning methods for both prediction and type classification. The results demonstrate that machine learning offers a scalable, efficient, and highly accurate solution for early diabetes diagnosis and classification, contributing valuable insights to the field of intelligent healthcare.