Implementasi Random Forest untuk Prediksi Risiko Diabetes Berbasis Gejala Klinis Menggunakan Analisis Feature Importance
DOI:
https://doi.org/10.29407/cda8rq08Abstract
Diabetes melitus merupakan penyakit kronis yang memerlukan deteksi dini untuk mengurangi risiko komplikasi. Penelitian ini bertujuan mengimplementasikan algoritma random forest untuk prediksi risiko diabetes berbasis gejala klinis serta menganalisis faktor-faktor yang berpengaruh terhadap hasil prediksi menggunakan metode Feature Importance. Dataset yang digunakan adalah Early Stage Diabetes Risk Prediction Dataset yang terdiri dari 520 data. Tahapan penelitian meliputi preprocessing data, pembagian data dengan rasio 80:20, pelatihan model , evaluasi model, dan analisis Feature Importance. Hasil penelitian menunjukkan bahwa model memperoleh akurasi 99,04%, precision 0,99, recall 0,99, F1-score 0,99, dan ROC-AUC 1,0000. Analisis Feature Importance menunjukkan bahwa Polyuria, Polydipsia, Gender, dan Age merupakan faktor yang paling berpengaruh terhadap prediksi risiko diabetes. Hasil penelitian menunjukkan bahwa random forest mampu memberikan performa prediksi yang sangat baik sekaligus mengidentifikasi faktor risiko dominan diabetes.
Keywords:
diabetes, feature importance, machine learning, random forest, prediksi risiko##plugins.themes.default.displayStats.downloads##
References
[1] H. M. Deberneh and I. Kim, "Prediction of type 2 diabetes based on machine learning algorithm," Int. J. Environ. Res. Public Health, vol. 18, no. 6, pp. 9-11, 2021, doi: 10.3390/ijerph18063317.
[2] R. A. Ramadhani and R. K. Niswatin, "Sistem Diagnosa Diabetes Menggunakan Metode K-NN," Jurnal Sains dan Informatika, vol. 4, no. 2, pp. 98-104, 2018, doi: 10.34128/jsi.v4i2.121.
[3] U. e. Laila, K. Mahboob, A. W. Khan, F. Khan, and W. Taekeun, "An Ensemble Approach to Predict Early-Stage Diabetes Risk Using Machine Learning: An Empirical Study," Sensors, vol. 22, no. 14, pp. 1-15, 2022, doi: 10.3390/s22145247.
[4] C. N. Noviyanti and A. Alamsyah, "Early Detection of Diabetes Using Random Forest Algorithm," Journal of Information System Exploration and Research, vol. 2, no. 1, pp. 41-48, 2024, doi: 10.52465/joiser.v2i1.245.
[5] N. L. Anggreini, A. Yuliana, D. S. Ramdan, and W. Al-Dayyeni, "Improving Diabetes Prediction Performance Using Random Forest Classifier with Hyperparameter Tuning," Jurnal Teknik Informatika (Jutif), vol. 6, no. 4, pp. 1847-1860, 2025, doi: 10.52436/1.jutif.2025.6.4.4755.
[6] F. Rahman, S. Hossain, J. J. Tiang, and A. Al Nahid, "Diabetes Prediction Using Feature Selection Algorithms and Boosting-Based Machine Learning Classifiers," Diagnostics, vol. 15, no. 20, pp. 1-24, 2025, doi: 10.3390/diagnostics15202622.
[7] J. Kaliappan et al., "Analyzing classification and feature selection strategies for diabetes prediction across diverse diabetes datasets," Front. Artif. Intell., vol. 7, 2024, doi: 10.3389/frai.2024.1421751.
[8] M. Rizky, R. Kurniawan, and D. Lestari, "Deteksi Dini Diabetes Mellitus Menggunakan Algoritma Random Forest pada Data Klinis," Journal of Computer Science and Information Technology, vol. 2, no. 1, pp. 1-8, 2026, doi: 10.70716/jocsit.v2i1.410.
[9] S. Majyambere, T. Lindgren, C. Twizere, and I. Ntakirutimana, "Early Type 2 diabetes risk prediction using explainable machine learning in a two-stage approach.," Front. Digit. Health, vol. 8, no. March, p. 1743619, 2026, doi: 10.3389/fdgth.2026.1743619.
[10] D. N. Jawza, M. I. Mazdadi, A. Farmadi, T. H. Saragih, D. Kartini, and V. Abdullayev, "Enhancing Diabetes Prediction Accuracy Using Random Forest and XGBoost with PSO and GA-Based Feature Selection," Journal of Electronics, Electromedical Engineering, and Medical Informatics, vol. 7, no. 2, pp. 295-306, 2025, doi: 10.35882/jeeemi.v7i2.626.
[11] R. Hasan, V. Dattana, S. Mahmood, and S. Hussain, "Towards Transparent Diabetes Prediction: Combining AutoML and Explainable Al for Improved Clinical Insights," Information (Switzerland), vol. 16, no. 1, 2025, doi: 10.3390/info16010007.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Copyright on any article is retained by the author(s).
- The author grants the journal, right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work’s authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal’s published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work.
- The article and any associated published material is distributed under the Creative Commons Attribution-ShareAlike 4.0 International License