Early Detection of Non-Persistence with Medication in Pharmacies Using Risk-Calibrated and Explainable Ensemble Learning
Medication non-persistence is a challenge in pharmacy services because it may compromise treatment outcomes. This study evaluates four algorithms for medication persistence status classification using Data Fix.csv, which initially contained 3,424 records and 68 columns. After six duplicate rows were removed, 3,418 observations remained. The compared models were Decision Tree, Random Forest, Extra Trees, and Gradient Boosting. In stratified five-fold cross-validation, Gradient Boosting achieved a mean ROC-AUC of 0.851 and F1-score of 0.838. On the held-out test set, it achieved an accuracy of 0.776, precision of 0.794, recall of 0.866, F1-score of 0.828, and ROC-AUC of 0.830. Sigmoid calibration slightly improved the Brier score from 0.15823 to 0.15774, while log loss slightly worsened from 0.48920 to 0.48945; recall decreased from 0.866 to approximately 0.850. SHAP analysis ranked indicators of long-term drug therapy, screening-related encounters, general examinations, immunization encounters, and specialty category among the largest contributors to model output. These findings show that classification discrimination and probability quality must be evaluated separately. Because the temporal availability of all features has not been verified and external validation has not been performed, the results support classification on the analyzed dataset but do not establish readiness for clinical early detection.
Authors
- Pertiwi Ishak
- Sustrin Abasa
- Wahyuni Azis
- Firman Aziz
Institutions
- Universitas Pancasakti Makassar (ID)
Publication Details
- Journal
- Innovation Journal of Pharmaceutical Science
- Published
- 2026-11-14
- DOI
- https://doi.org/10.68300/injophars.v2i2.112
- Primary Topic
- Medication Adherence and Compliance
- Type
- article
- Field-Weighted Citation Impact
- 0.00