Exploratory Anomaly Detection with Blood Glucose Level Time Series Prediction - Ade Anggian Hakim,; Singa Durai, Sharlini; Mahmud, Farhanahani; Soon, Chin Fhong; Tukiran, Zarina; Rudi Setiawan, (International Journal of Integrated Engineering, 2025)
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.