Back to search

University of Edinburgh

Analysis of methods for imputation of OpenAPS data for improvement of blood glucose control in type 1 diabetes

Abstract

dc:description.abstract

Type 1 diabetes (T1D) is an autoimmune lifelong condition where the body can no longer produce insulin. The current gold standard treatment for T1D is a closed-loop system, involving a continuous glucose minitor (CGM) and insulin-pump working with an integrated algorithm to administer insulin. These systems potentially allow for more precise control of blood glucose. As of 2025, there have been efforts within both commercial and open closed-loop systems to utilize deep learning models as part of the integrated algorithm. The task of blood-glucose control requires precise predictions based on immediately prior CGM data and can utilize learing methods trained on historic CGM data. As such, the completeness of data utilized and trained on is important for hypothetical patient outcome. Associated datasets are large with well-defined recording intervals, and as such machine learning is well-suited for this problem. However, CGM data is often incomplete due to issues such as sensor malfunction and monitor removal, resulting in total loss of pump data, often over varying intervals (blackout missingness). In addition, should a prediction be made by a closed-loop system after encountering missingness (due to closed-loop removal, for example), handling incomplete data is necessary. The OpenAPS CGM recording dataset a large dataset available for public research, composed of more than 66,000 closed-loop system recordings at regular 5-minute intervals. Like most blood-glucose data-sets, the OpenAPS dataset is incomplete, with blackout missingness of various sizes. In this project, I explore machine-learning approaches to the challenges of missing blood-glucose within the OpenAPS dataset. In particular, I examine \textit{imputation} approaches, or methods that aim to fill in missing observation to produce a complete dataset. Several approaches are explored, including rudimentary baselines, common algorithmic models, and deep-learning algorithms. Of deep-learning models, we particularly examine attention-based models (popular architectures for sequence data in the body of literature), as well as more recent \textit{Neural Controlled Differential Equation} (NCDE) based models as deep learning baselines. Attention-based models model global relationships in glucose sequences all at once, possessing a hidden-state that is not continuous in time. In comparison, LCDE based models possess a hidden-state continuous in time, attempting to model the evolution of a hidden state between observations utilizing a \textit{Ordinary Differential Equations} (ODE). Finally, I additionally examine \textit{Jump Neural Ordinary Differential Equations} (J-NODE), which possesses a convergence guarantee to a solution when subsequent observations are strictly dependent only on the current observation (also known as Markov conditions), and propose an original extension of J-NODE that combines the strengths of attention with a Markov assumption, called \textit{Jump Auto-encoding Differential Equations} (JADE). Notably, transformer models fail to adequately capture blood-glucose dynamics in comparison to other methods. LCDE and J-NODE converge to solutions comparable to linear interpolation. JADE possesses similar imputation accuracy while converging to curves that qualitatively emulate the shape of blood-glucose curves. These results suggest that linear interpolation is a sufficient method in modelling missing blood-glucose values in terms of quantitative accuracy, even compared to more computationally expensive alternatives. I then examined select imputation models' effects on a downstream glucose-forecasting task relevant to the underlying problem of improving patient outcome. JADE and LCDE outperform other methods in downstream forecasting accuracy with statistical significance, despite possessing lower imputation accuracy and having a higher chance of misprediction glycaemic events as non-glycaemic and vice versa in their imputations, showing that neither imputation accuracy nor glycaemic event prediction accuracy in imputations are clear signifiers of a improved hypothetical patient outcome. Finally, I propose ways to integrate imputation and/or other methods of handling missing data into the OpenAPS project (and other CGM devices).

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Walden, Maximilian
Advisors dc:contributor.advisor
  • Forbes, Shareen
  • Oldnall, Christopher

Subjects

dc:subject × 5

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
University of Edinburgh
Base URL
era.ed.ac.uk/server/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Walden, Maximilian. Analysis of methods for imputation of OpenAPS data for improvement of blood glucose control in type 1 diabetes. 2026. https://hdl.handle.net/1842/45477