Diabetes pharmacotherapy frequently coexists with treatment for cardiovascular and metabolic comorbidities, highlighting the potential role of data-driven methods in pharmaceutical care. This study aimed to develop and compare machine learning models for predicting diabetes medication use using the fifth wave of the Indonesia Family Life Survey (IFLS5), conducted in Indonesia in 2014–2015. A secondary analysis included 48,139 participants with valid outcome information, of whom 353 (0.73%) reported diabetes medication use. Predictors included age, sex, pregnancy status, weight, height, hemoglobin, systolic and diastolic blood pressure, pulse, and medication use for anemia, hypertension, and hypercholesterolemia. Class imbalance was addressed using Synthetic Minority Over-sampling Technique for Nominal and Continuous features (SMOTENC) exclusively within training folds. LASSO-based feature selection was also performed within stratified 10-fold cross-validation. Random Forest, linear Support Vector Machine (SVM), Logistic Regression, and Gaussian Naive Bayes were compared. Logistic Regression achieved 80.13% accuracy, 76.20% sensitivity, 80.16% specificity, and an AUC of 0.870. Linear SVM showed comparable discrimination (AUC=0.870). Random Forest achieved high accuracy (97.86%) but low sensitivity (18.13%), whereas Naive Bayes achieved high sensitivity (98.30%) but low specificity (26.77%). LASSO consistently identified pregnancy status, cholesterol medication use, hypertension medication use, and weight among the strongest predictors. Logistic Regression provided the most balanced classification performance and may support further pharmacoepidemiological investigation of diabetes medication-use patterns.
Copyrights © 2026