Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Jun 11:11:20552076251349692.
doi: 10.1177/20552076251349692. eCollection 2025 Jan-Dec.

Smart wearable sensor-based model for monitoring medication adherence using sheep flock optimization algorithm-attention-based bidirectional long short-term memory (SFOA-Bi-LSTM)

Affiliations

Smart wearable sensor-based model for monitoring medication adherence using sheep flock optimization algorithm-attention-based bidirectional long short-term memory (SFOA-Bi-LSTM)

Yasser Alatawi et al. Digit Health. .

Abstract

Objective: Medication adherence (MA) is crucial to patient treatment and vital for therapeutic outcomes. Due to its ability to continuously monitor a patient's MA behavior, the recent focus on sensor technology for MA monitoring is a promising development. The primary objective of this research is to implement sensor devices/smart wearables powered by advanced deep learning (DL) techniques to evaluate complex data patterns effectively and make accurate predictions. This study introduces a novel smart wearable sensors-based hand gesture recognition system to predict medication behaviors.

Methods: A device equipped with accelerometer and gyroscope sensors acquires and analyzes data from hand motions. A mobile app records the data from the smart device, subsequently storing it in a database in .csv file. The data is gathered, preprocessed, and classified to identify MA behavior utilizing the developed DL model known as the sheep flock optimization algorithm-attention-based bidirectional long short-term memory network (SFOA-Bi-LSTM). The data was initially gathered and preprocessed via the Z-score normalization method. The data samples are classified using the attention-based Bi-LSTM model after undergoing preprocessing. The SFOA method was utilized to optimize the hyperparameters of the attention-based Bi-LSTM model.

Results: The model's performance was examined using a five-fold cross-validation based on recall, accuracy, F1 score, and precision. The SFOA-Bi-LSTM model achieved 98.90% accuracy, 97.80% recall, 98.80% precision, and 98.62% F1 score, demonstrating its novelty and potential to inspire and motivate healthcare professionals to adopt this promising method for monitoring MA in healthcare applications.

Conclusion: The results indicate that the SFOA-Bi-LSTM model performs well in predicting MA. The SFOA-Bi-LSTM model offers several unique advantages, including efficient hyperparameter tuning via the SFOA, enhanced feature representation through an attention mechanism, and comprehensive temporal analysis using Bi-LSTM. It demonstrates superior performance compared to conventional models while being robust to noisy data due to effective preprocessing.

Keywords: Bi-LSTM; Medication adherence; SFOA; Z-score normalization; deep learning; smart wearable sensor.

PubMed Disclaimer

Conflict of interest statement

The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Figures

Figure 1.
Figure 1.
Pipeline of the proposed model.
Figure 2.
Figure 2.
Specification of MetaMotionRL device.
Figure 3.
Figure 3.
Slap band with MetaMotionRL device.
Figure 4.
Figure 4.
Sensors selection and data collection using the metaBase app.
Figure 5.
Figure 5.
Framework of the long short-term memory (LSTM).
Figure 6.
Figure 6.
The structure of the bidirectional long short-term memory (Bi-LSTM).
Figure 7.
Figure 7.
Structure of the attention mechanism.
Figure 8.
Figure 8.
Architecture of attention-based bidirectional long short-term memory (Bi-LSTM) model.
Figure 9.
Figure 9.
Sheep flock optimization (SFO) algorithm flowchart.
Figure 10.
Figure 10.
Graphical plot of sheep flock optimization algorithm-attention-based bidirectional long short-term memory (SFOA-Bi-LSTM) model's results.
Figure 11.
Figure 11.
Graphical plot of results comparison.

Similar articles

References

    1. Aldeer M, Javanmard M, Martin RP. A review of medication adherences monitoring technologies. Appl Syst Innovat 2018; 1: 14.
    1. Gil-Guillen VF, Balsa A, Bernárdez B, et al. Medication non-adherences in rheumatology, oncology and cardiology: a review of the literatures of risk factor and potential intervention. Int J Environ Res Public Health 2022; 19: 12036. - PMC - PubMed
    1. Wellington K, Absalom EE. Machine learning approach to medications adherences amongst NCD patient: a systematic literatures review. Inf Med Unlocked 2023; 38: 101210.
    1. Faisal S, Ivo J, Patel T. A review of features and characteristic of smart medication adherences product. Canadian Pharm J/Revue des Pharm du Canada 2021; 154: 312–323. - PMC - PubMed
    1. Lee S, Jeong KH, Lee Set al. et al. A study on types of medication adherence in hypertension among older patients and influencing factors. Healthcare (Basel) 2022; 10: 2322. - PMC - PubMed

LinkOut - more resources