Exploratory Anomaly Detection with Blood Glucose Level Time Series Prediction

Authors

  • Ade Anggian Hakim Universiti Tun Hussein Onn Malaysia
  • Sharlini Singa Durai Universiti Tun Hussein Onn Malaysia
  • Farhanahani Mahmud Universiti Tun Hussein Onn Malaysia
  • Chin Fhong Soon Universiti Tun Hussein Onn Malaysia
  • Zarina Tukiran Universiti Tun Hussein Onn Malaysia
  • Rudi Setiawan Institut Teknologi Sumatera, Indonesia

Keywords:

Blood glucose anomaly detection, LSTM, rule-based, Z-score, isolation forest

Abstract

Diabetes patients need effective blood glucose (BG) management to avoid developing serious health complications. Real-time BG prediction and anomaly detection through deep learning techniques improve diabetes care in this project. This study utilized the ShanghaiT1DM dataset to train Long Short-Term Memory networks for blood glucose prediction with a dataset split of 70% training and 30% testing aimed at optimizing a 30-minute prediction horizon. The study imputed missing data before validating stationarity through both the Augmented Dickey-Fuller and the Kwiatkowski-Phillips-Schmidt-Shin tests. The evaluation of anomaly detection methods included the rule-based approach alongside the statistical technique of Z-score and the machine learning algorithm of the isolation forest method. The highest accuracy for the detection of hypoglycemia was attained by the isolation forest (0.948), followed by the rule-based (0.887) and Z-score (0.791) methods. In the detection of hyperglycemia, the most effective method was the rule-based (0.847), followed by lower accuracies from the Z-score (0.715) and isolation forest (0.550) methods. Furthermore, the rule-based method exhibited superior performance in both the detection of hypoglycemia (accuracy = 0.887) and hyperglycemia (accuracy = 0.847), exhibiting high precision, recall, and F1-scores throughout, hence established as the strongest method for the detection of anomalies. The results from this research attest that the combination of LSTM-based prediction of blood glucose and rule-based detection of anomaly yields the most accurate method for the detection of hypoglycemia and hyperglycemia from the dataset analyzed. Though the rule-based method proved superior over statistical and machine learning methods, the Z-score and isolation forest methods retain potential for improvement.

Downloads

Download data is not yet available.

Downloads

Published

29-12-2025

Issue

Section

Special Issue 2026: ICESNANO2025 (E)

How to Cite

Ade Anggian Hakim, Singa Durai, S. ., Mahmud, F., Soon, C. F., Tukiran, Z. ., & Rudi Setiawan. (2025). Exploratory Anomaly Detection with Blood Glucose Level Time Series Prediction. International Journal of Integrated Engineering, 17(6), 292-303. https://penerbit.uthm.edu.my/ojs/index.php/ijie/article/view/22993