Machine learning applications to classify and monitor medication adherence in patients with type 2 diabetes in Ethiopia - Kassaw, Ewunate Assaye; Sendekie, Ashenafi Kibret; Enyew, Bekele Mulat; Abate, Biruk Beletew (Frontiers in Endocrinology, 2025)
BackgroundMedication adherence plays a crucial role in determining the health outcomes of patients, particularly those with chronic conditions like type 2 diabetes. Despite its significance, there is limited evidence regarding the use of machine learning (ML) algorithms to predict medication adherence within the Ethiopian population. The primary objective of this study was to develop and evaluate ML models designed to classify and monitor medication adherence levels among patients with type 2 diabetes in Ethiopia, to improve patient care and health outcomes.MethodsUsing a random sampling technique in a cross-sectional study, we obtained data from 403 patients with type 2 diabetes at the University of Gondar Comprehensive Specialized Hospital (UoGCSH), excluding 13 subjects who were unable to respond and 6 with incomplete data from an initial cohort of 422. Medication adherence was assessed using the General Medication Adherence Scale (GMAS), an eleven-item Likert scale questionnaire. The responses served as features to train and test machine learning (ML) models. To address data imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) was applied. The dataset was split using stratified K-fold cross-validation to preserve the distribution of adherence levels. Eight widely used ML algorithms were employed to develop the models, and their performance was evaluated using metrics such as accuracy, precision, recall, and F1 score. The best-performing model was subsequently deployed for further analysis.ResultsOut of 422 enrolled patients, 403 data samples were collected, with 11 features extracted from each respondent. To mitigate potential class imbalance, the dataset was increased to 620 samples using the Synthetic Minority Over-sampling Technique (SMOTE). Machine learning models including Logistic Regression (LR), Support Vector Machine (SVM), K Nearest Neighbor (KNN), Decision Tree (DT), Random Forest (RF), Gradient Boost Classifier (GBC), Multilayer Perceptron (MLP), and 1D Convolutional Neural Network (1DCNN) were developed and evaluated. Although the performance differences among the models were subtle (within a range of 0.001), the SVM classifier outperformed the others, achieving a recall of 0.9979 and an AUC of 0.9998. Consequently, the SVM model was selected for deployment to monitor and detect patients’ medication adherence levels, enabling timely interventions to improve patient outcomes.ConclusionsThis study highlights a variety of machine learning (ML) models that can be effectively used to monitor and classify medication adherence in diabetic patients in Ethiopia. However, to fully realize the potential impact of digital health applications, further studies that include patients from diverse settings are necessary. Such research could enhance the generalizability of these models and provide insights into the broader applicability of digital tools for improving medication adherence and patient outcomes in varying healthcare contexts.