Background: Type 2 diabetes mellitus is a non-communicable disease with a high prevalence and the potential to cause serious complications if not properly managed. Identifying risk factors is an essential step in the prevention and control of this disease. Objective: This study aimed to develop and evaluate a medical record-based prediction model for type 2 diabetes mellitus risk using the Naïve Bayes algorithm and to identify the most influential risk factors among hospitalized patients at Bhayangkara Bondowoso Hospital in 2024. Methods: A descriptive quantitative research design was employed, with data processing conducted using the Naïve Bayes algorithm and RapidMiner software. The sampling technique used was total sampling, resulting in 630 medical records, consisting of 315 patients diagnosed with type 2 diabetes mellitus and 315 non-type 2 diabetes mellitus patients. The analyzed variables included age, sex, body mass index (BMI), hypertension, smoking history, cardiovascular disease history, and family history. Results: The results indicated that the most influential risk factors for type 2 diabetes mellitus were age ?45 years, obesity-level BMI, and a history of hypertension. Conclusion: The Confusion Matrix evaluation with a 95%:5% split ratio produced an accuracy of 90.62%, a precision of 100%, and a recall of 81.25%. Suggestion: Hospitals are encouraged to strengthen health promotion programs regarding type 2 diabetes mellitus risk factors and involve patients’ families in educational interventions to help prevent disease-related complications.
Copyrights © 2026