EUVIMEDSkopri EUVIMED
Open access · CC BY-NC-SA 4.0

Smart Pill Dispenser with Naive Bayes Algorithm for Predicting Medication Compliance Based on Patient Behavior Patterns

Achmad Ridwan, Samuel Jackonia Sembing, Sere Lonian Sihombing, Diventranus Lei, Rio Utama Putra Pasaribu

INOVTEK Polbeng - Seri Informatika · 2026-05-28 · 11 (2) · 639-648

DOI: 10.35314/ercsa238 ↗

At a glance

Journal article in INOVTEK Polbeng - Seri Informatika, published online on 2026-05-28. Written by Achmad Ridwan and 4 co-authors. The full text is freely available (open access, CC BY-NC-SA 4.0).

AstrattDettalji biblijografiċiCiteRelated studies

Abstract (original language)

Medication adherence is a critical challenge in chronic disease management, with global non-adherence rates estimated at 50% or higher among patients with long-term conditions. This study presents the design and implementation of an ESP32-based smart pill dispenser prototype integrating a Naive Bayes classification algorithm for real-time, on-device prediction of patient medication compliance behavior. The system collects multimodal interaction data through an RTC DS3231, a load cell weight sensor, and a push button to extract four behavioral features: time delay (ΔT), weight change (ΔW), compliance frequency, and signal quality. These features are locally classified on the ESP32 into three categories: Compliant, Late, and Non-Compliant. A dataset of 100 interaction records was generated through controlled laboratory experiments, with a stratified 80:20 train-test split applied for evaluation. The trained Naive Bayes model achieved an overall accuracy of 80.0% on the test set, with per-class precision, recall, and F1-score reported. Class imbalance effects are analyzed, and results are compared against decision tree, k-NN, logistic regression, and random forest. The prototype demonstrates feasibility as a low-cost, portable medication management device, though clinical validation with real patients remains required.

Cite

APA

Ridwan, A., Sembing, S. J., Sihombing, S. L., Lei, D., & Pasaribu, R. U. P. (2026). Smart Pill Dispenser with Naive Bayes Algorithm for Predicting Medication Compliance Based on Patient Behavior Patterns. INOVTEK Polbeng - Seri Informatika, 11(2), 639-648. https://doi.org/10.35314/ercsa238

Vancouver

Ridwan A, Sembing SJ, Sihombing SL, Lei D, Pasaribu RUP. Smart Pill Dispenser with Naive Bayes Algorithm for Predicting Medication Compliance Based on Patient Behavior Patterns. INOVTEK Polbeng - Seri Informatika. 2026;11(2):639-648. doi:10.35314/ercsa238

BibTeX
@article{Ridwan2026,
  author = {Ridwan, Achmad and Sembing, Samuel Jackonia and Sihombing, Sere Lonian and Lei, Diventranus and Pasaribu, Rio Utama Putra},
  title = {Smart Pill Dispenser with Naive Bayes Algorithm for Predicting Medication Compliance Based on Patient Behavior Patterns},
  journal = {INOVTEK Polbeng - Seri Informatika},
  year = {2026},
  volume = {11},
  number = {2},
  pages = {639--648},
  doi = {10.35314/ercsa238}
}
Start for free →