Rio Utama Putra Pasaribu
Prima Indonesia University

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

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 Vol. 11 No. 2 (2026): May
Publisher : P3M Politeknik Negeri Bengkalis

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.35314/ercsa238

Abstract

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.