Next Article in Journal
Measuring Outdoor Walking Capacities Using Global Positioning System in People with Multiple Sclerosis: Clinical and Methodological Insights from an Exploratory Study
Next Article in Special Issue
Probabilistic Model of Transition between Categories of Glucose Profiles in Patients with Type 1 Diabetes Using a Compositional Data Analysis Approach
Previous Article in Journal
Co-Training for Deep Object Detection: Comparing Single-Modal and Multi-Modal Approaches
Previous Article in Special Issue
Forecasting of Glucose Levels and Hypoglycemic Events: Head-to-Head Comparison of Linear and Nonlinear Data-Driven Algorithms Based on Continuous Glucose Monitoring Data Only
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Glucose Prediction under Variable-Length Time-Stamped Daily Events: A Seasonal Stochastic Local Modeling Framework

1
Instituto Universitario de Automática e Informática Industrial, Universitat Politècnica de València, Camino de Vera, s/n, 46022 València, Spain
2
Centro de Investigación Biomédica en Red de Diabetes y Enfermedades Metabólicas Asociadas (CIBERDEM), Instituto de Salud Carlos III, 28029 Madrid, Spain
*
Author to whom correspondence should be addressed.
Sensors 2021, 21(9), 3188; https://doi.org/10.3390/s21093188
Submission received: 20 March 2021 / Revised: 23 April 2021 / Accepted: 28 April 2021 / Published: 4 May 2021
(This article belongs to the Special Issue Recent Advances in Continuous Glucose Monitoring Sensors)

Abstract

:
Accurate glucose prediction along a long-enough time horizon is a key component for technology to improve type 1 diabetes treatment. Subjects with diabetes might benefit from supervision and control systems that accurately predict risks and trigger corrective actions early enough with improved mitigation. However, large intra-patient variability poses big challenges to glucose prediction. In previous works by the authors, clustering and local modeling techniques with seasonal stochastic models proved to be efficient, allowing for good glucose prediction accuracy for long prediction horizons. Continuous glucose monitoring (CGM) data were partitioned into fixed-length postprandial time subseries and clustered with Fuzzy C-Means to collect similar behaviors, enforcing seasonality at each cluster after subseries concatenation. Then, seasonal stochastic models were identified for each cluster and local predictions were integrated into a global prediction. However, free-living conditions do not support the fixed-length partition of CGM data since daily events duration is variable. In this work, a new algorithm is provided to overcome this constraint, allowing better coping with patient’s variability under variable-length time-stamped daily events in supervision and control applications. Besides predicted glucose, two real-time indices are additionally provided—a crispness index, indicating good representation of current glucose behavior by a single model, and a normality index, allowing for the detection of an abnormal glucose behavior (unusual according to registered historical data). The framework is tested in a proof-of-concept in silico study with ten patients over four month training data and two independent two month validation datasets, with and without abnormal behaviors, from the distribution version of the UVA/Padova simulator extended with diverse sources of intra-patient variability.

1. Introduction

Diabetes represents one of the major health challenges of the 21st century. According to [1], 463 million people have diabetes worldwide in 2019, and this figure is estimated to rise to 700 million by 2045. Type 1 diabetes (T1D), the most severe kind, affects about 10% of people with diabetes. In T1D, β -cells in the pancreas are destroyed by an autoimmune response. These cells secrete insulin, which is an essential hormone needed to maintain blood glucose (BG) concentrations in a narrow range (70–140 mg/dL). Insulin promotes the transport of glucose into the cell and its lack translates into elevated BG (hyperglycemia). Thus, T1D treatment consists in insulin replacement by means of subcutaneous administration of insulin analogs in order to avoid the long-term complications due to hyperglycemia. This is carried out either by multiple daily injections with insulin pens or continuous infusion through insulin pumps. However, overdosing of insulin can provoke too low BG concentration (hypoglycemia), with severe consequences if untreated, including comma and death. Good BG control is challenging, and requires a lot of effort from patients, who must frequently monitor their BG levels and take dosing decisions to avoid hyperglycemia and hypoglycemia. Nowadays, glucose concentration can be measured in a quasi-continuous way by using continuous glucose monitoring (CGM) devices, which consist of an electrochemical sensor measuring interstitial glucose at the subcutaneous space and estimating BG, which is transmitted periodically (every 5 min) to an external receiver [2].
Accurate glucose prediction along a given time horizon is a key component in current diabetes technology. Patient monitoring systems must raise warnings of risks enough time ahead to successfully prevent extreme hyperglycemic and, especially, hypoglycemic episodes [3]. In sensor-pump integrated systems, predicted glucose levels can trigger actions by the insulin pump, like automatic insulin infusion suspension to mitigate impending hypoglycemia [4]. Glucose prediction is also an important feature in artificial pancreas (AP) systems, that is, closed-loop glucose control systems where a control algorithm governs the insulin pump from CGM data [5,6]. AP research has been intense in the last decade. A first commercial system was launched in late 2017, a second one in early 2020, and many more are on the way [7,8]. Glucose prediction can be an integral part of the control algorithm itself, such as in Model Predictive Control-based AP systems [9]. Therefore, high-reliability glucose prediction models have the potential to significantly improve diabetes management as part of a monitoring system, integrated systems or an AP.
A huge number of alternatives for BG prediction in T1D have appeared in the literature, such as, among others, linear empirical dynamic models, multivariate nonlinear regression techniques, extended Kalman filters, data mining or artificial intelligence approaches [10]. In [11,12], seasonal stochastic local models are introduced for the first time in the field aiming at improved glucose prediction under high intra-patient variability. The rationale lies on the fact that observed behaviors in past similar scenarios can help improving prediction at the present moment. Seasonal stochastic time series models such as SARIMA (Seasonal AutoRegressive Integrated Moving Average), or SARIMAX (SARIMA including eXogenous variables), are meant to capture regular periodical patterns in time series data [13]. Although seasonality is not a priori a characteristic of glucose data in T1D, it can be enforced partitioning historical CGM data into fixed-length time subseries and concatenating them, after a clustering process collecting similar behaviors based on a given similarity measure. Then, seasonal stochastic models can be identified for each cluster and their predictions integrated to provide a global glucose prediction. Seasonal models have exhibited relatively higher postprandial BG prediction accuracy for long prediction horizons [11], including challenging scenarios with variety of meals and exercise sessions [12]. In this latter case, SARIMAX models were used including insulin infusion and energy expenditure from a wearable as exogenous inputs.
In the above works, a concatenation of fixed-length postprandial time subseries driven by mealtime was considered, from controlled studies. Although this can be appropriate to test performance and concepts underlaying the new prediction methodology, its application in free-living conditions do not support fixed-length partition of CGM data, as required to enforce seasonality. Daily events such as mealtime and night periods happen at non regular times and have variable lengths. In this work, algorithms are modified to overcome this constraint, allowing to cope with patient’s variability under variable-length time-stamped events, and paving the way to its application in supervision and control in T1D. CGM data is partitioned into a collection of “event-to-event” time subseries whose length is regularized (unified) by adding fictitious blank samples where needed to enforce seasonality. This imposes the use of new clustering algorithms able to deal with these blank samples, which correspond to missing (incomplete) data. Main events are mealtimes and night periods, although other events could be considered as long as a timestamp exists, such as reported hypoglycemia treatments or exercise sessions. Besides predicted glucose, two real-time indices are additionally provided indicating crispness of the prediction (degree of representation of current glucose behavior by a single model), and normality of the observed behavior (degree of representation by registered historical data), allowing for the detection of patient’s abnormal states (unusual or not seen before in historical data), which might trigger conservativeness in the insulin therapy for the sake of safety.

2. Materials and Methods

2.1. Data Overview

Three datasets were generated for the ten adults virtual cohort in the educational version of the UVA/Padova simulator [14], which was extended with an exercise model [15], and diverse sources of intra-patient variability:
  • Training dataset: Four-month data was generated for the ten patient cohort following open loop therapy (basal insulin and ratios provided in the simulator were used). The 15-15 rule was used to treat hypoglycemia (15 g of carbohydrates were administered when glucose went below 70 mg/dL, and repeated if after 15 min hypoglycemia was still present). A nominal day with three meals of 40, 90 and 60 g of carbohydrates at 7:00, 14:00 and 21:00 h was considered. Actual mealtime and carbohydrate intake varied around nominal values following a normal distribution with a standard deviation of 20 min for mealtime, and with a 10% coefficient of variance for meal size. Although no study on dietary habits was performed to set this amount of variability on meal size, a 10% coefficient of variance managed to challenge this in silico study with a wide enough variety of meal sizes, ranging from 20 to 120 g, distributed around the chosen nominal values. Meal absorption dynamics was changed at each meal by randomly selecting one of meal model parameter sets available from the simulator, resulting in faster or slower meal absorptions especially due to nonlinearities in gastric emptying emulating a slow down of carbohydrates absorption produced by fats [14]. Additionally, meal absorption rate ( k a b s ) varied with a uniform distribution in ±30%, and carbohydrate bioavailability (f) in ±10% around selected nominal values. Carb counting errors by the patient were considered with a uniform distribution between −30% and +10%, following results in [16] where a trend to meal underestimation is reported. Insulin absorption pharmacokinetics ( k d , k a 1 , k a 2 ) varied in ±30%, according to the intra-patient variability reported in [17]. Circadian variability of insulin sensitivity ( V m x , K p 3 ) was considered with variations in ±30% around nominal sensitivity, reproducing changes in basal insulin requirements in the adult population reported in [18]. The reader is referred to [14] for the model and parameters details. Finally, missed boluses were sporadically generated with a minimum separation of 14 days between them in order to better mimic imperfect data collection. These postprandial periods were later excluded to compose the training dataset from collected data.
  • Validation dataset 1 (“normal”): Two-month data was generated for the 10-patient cohort for the same scenario as data used for training. Thus, events and variability in this validation dataset is expected to be well represented in training data (it contains “normal” data).
  • Validation dataset 2 (“abnormal”): Two-month data was generated for the 10-patient cohort adding to the above scenario missed boluses (once per week), and three moderate intensity (50% VO2max) exercise sessions per week (on Tuesday, Thursday and Saturday). Nominal duration of the exercise duration was 60 min, and nominal start time at 18:00 h. Actual duration and start time changed at each session following a normal distribution with coefficient of variance of 10% for duration and standard deviation of 20 min for start time. Since training data does not contain missed boluses and exercise, these events are expected not to be well represented in training data (the dataset contains “abnormal” data).
In all the above datasets, besides CGM data, time stamps and labels for the following events were generated: Breakfast, Lunch, Dinner, Night and Hypoglycemia treatment. The Night event was considered to start 6 h after dinner. All rescue carbs administered in a hypoglycemia treatment were gathered in a single Hypoglycemia treatment event, starting at the time of the first rescue carb intake. This will be represented by the set of time-ordered pairs
E : = { ( t e i , L e i ) | i = 1 , , n e } ,
where t e i is the timestamp for the i-th event, with t e i < t e i + 1 , L e i is the label of the i-th event, L e i { Breakfast , Lunch , Dinner , Night , Hypoglycemia treatment } , and n e is the number of events.
In a clinical context, assumption of existence of time stamps for meals and night period is a mild one. Mealtime can be automatically extracted from insulin pump information (bolus calculator), or from the recently marketed smart pens in a multiple daily injections therapy. The start of a night period is defined algorithmically and no input is necessary from the patient. Hypoglycemia occurrence can be detected from CGM data and only confirmation of rescue carbs intake by the patient would be needed. However, this information in not critical since the amount of carbs is not needed. In the absence of this confirmation, assumption of treatment of any hypoglycemia occurrence might be assumed.

2.2. Enforcing Seasonality: CGM Data Partitioning

As a first step, seasonality must be enforced prior to building seasonal stochastic local models from the training data set. Provided that the starting time and duration of events in the CGM historical data is variable between event instances, the original CGM time series data is partitioned into a set of “event-to-event” time subseries from the reported timestamps and labels in the set E . A single partition can be considered if event labels are neglected, or multiple partitions can be generated according to some grouping of event labels. This latter option has the advantage of building prediction models more specific to well differentiated events (for instance a night compared to a meal), although it requires events labeling. A compromise solution is adopted here, with consideration of three partitions—meals, night and hypoglycemia treatment. No difference between breakfast, lunch and dinner is needed, requiring only information about mealtime and hypoglycemia occurrence, which can be extracted automatically. Thus, consider
E = E M E N E H ,
where
E M : = { ( t e i , L e i ) | L e i { Breakfast , Lunch , Dinner } }
E N : = { ( t e i , L e i ) | L e i { Night } }
E H : = { ( t e i , L e i ) | L e i { Hypoglycemia treatment } } .
Given the index sets
I M : = { i | ( t e i , L e i ) E M }
I N : = { i | ( t e i , L e i ) E N }
I H : = { i | ( t e i , L e i ) E H }
and denoting by [ G ] t 0 t 1 ( t ) : = { G ( t ) | t 0 t t 1 } to the time subseries given by the segment of CGM data from t 0 to t 1 , the following CGM data partitions are built:
Π M : = { [ G ] t e i t e i + 1 ( t ) | i I M }
Π N : = { [ G ] t e i t e i + 1 ( t ) | i I N }
Π H : = { [ G ] t e i t e i + 1 ( t ) | i I H } .
Therefore, each CGM time subseries comprises from a given event timestamp, t e i , to the next event timestamp, t e i + 1 .
In order to enforce seasonality, time subseries length must be regularized. To this end, a maximum expected length for an event-to-event period must be set. In this work, the period with the maximum duration for each partition Π M , Π N , and Π H for the training data is computed, denoted here as L M , L N , and L H , respectively. Given the time subseries [ G ] t e i t e i + 1 ( t ) R l i , then L M : = max i I M l i , L N : = max i I N l i , and L H : = max i I H l i . Time subseries with length l i smaller than the corresponding maximum length ( L M , L N , L H ), are expanded with blank values (“not a number”—NaN) until reaching maximum length. As a result, time subseries length is regularized and seasonality can be enforced (see Section 2.4). Remark that most of time subseries will have blanks in the final positions which should be adequately treated as missing data in the clustering and identification processes. As well, regularized length will be different for each partition Π M , Π N , and Π H .
Other events may be present in the historical data besides the considered ones, like for instance snacks and exercise. If these events are announced by the patient or can be automatically extracted from the devices, they could be included in the list of events driving data partition. Alternatively, they can be treated as exogenous inputs, as it was the case of exercise in [12] by means of signals from a wearable. Unannounced and unmeasurable events affecting CGM will be part of the data variability, which will be adequately treated in the clustering step.

2.3. Enforcing Similarity: Data Clustering

Once CGM data is partitioned into event-driven glucose time subseries, data in a partition are clusterized to gather similar glucose responses. Fuzzy C-Means (FCM) clustering [19] was successfully applied in previous works to the classification of similar postprandial periods [12]. However, FCM requires data to be complete for the computation of cluster prototypes (centroids) and distance measures. Thus, FCM is not directly applicable to the problem at hand due to the presence of missing data resulting from the seasonality enforcing step described in the previous section. Therefore, the Partial Distance Strategy FCM (PDSFCM) algorithm [20] is used here to overcome CGM incomplete data. Given a data set X = { x 1 , x 2 , , x n } , x i R L , i = 1 , , n , PDSFCM partitions data into c > 1 clusters through the minimization of the objective function
J m ( U , V ; X ) = i = 1 c j = 1 n u i j m d 2 ( x j , ν i ) ,
where V = ( ν 1 , ν 2 , , ν c ) is the vector of sought cluster prototypes ν i R L , where L is the regularized length in the partition under consideration, that is, L M , L N , or L H , d is a partial distance function and m [ 1 , ) is the fuzziness parameter. The following partial distance is used here [20]
d ( a , b ) : = L L B i = 1 L ( D i ) 2
D i : = 0 if a i or b i is blank a i b i otherwise ,
for a , b R L and B the number of blanks (in one vector, or the other, or both). Remark that for B = 0 , the above distance is the standard Euclidean distance. The partition matrix U = [ u i j ] , i = 1 , 2 , , c , j = 1 , 2 , , n , collects the membership value of each data x j to each cluster i, where u i j [ 0 , 1 ] , i = 1 c u i j = 1 , j and 0 < j = 1 n u i j < n i . In our case, the data set X corresponds to each partition Π { Π M , Π N , Π H } of glucose time subseries [ G ] t e i t e i + 1 ( t ) after length regularization as described in Section 2.2.
There exists a large variety of indices to determine the optimal number of clusters. In this work, the Fukuyama-Sugeno (FS) index was used [21].

2.4. Local SARIMA Models

After data in a partition are clusterized, local seasonal models are trained for each cluster. A SARIMA model, as opposed to its non-seasonal counterpart ARIMA model, includes new seasonal autoregressive (SAR) and seasonal moving-average (SMA) terms introducing dependence of an observation at time t on observations and stochastic errors at lags multiple of the model seasonality period s [22]. Combination with AR and MA components will introduce dependence on observations and stochastic errors previous to t, t s , t 2 s , … up to a given number of past data depending on the corresponding model component orders. Remark that this implies that CGM data before each event time is needed to properly feed the SARIMA model at t = t e i and during the first computed samples depending on the AR order. This will be referred to as pre-sampling data, which length must accommodate to the maximum expected AR order, denoted as P r . Then, a CGM time series can be built from the time-ordered concatenation of regularized-length time subseries [ G ] t e i t e i + 1 ( t ) R L in a cluster, preceded by the corresponding pre-sampling data, of length P r (see Figure 1). The resulting concatenated time series G ( t ) will have seasonality s : = L + P r . Remark there will be as many concatenated CGM time series like the one in Figure 1 as number of clusters (c), gathering together similar behaviors. Then, a seasonal stochastic local model can be identified for each cluster.
In the absence of exogenous inputs, a local SARIMA model for a given cluster can be expressed in the form:
G ( t ) = α + w ( t ) ϕ p ( z 1 ) Φ P ( z s ) s D d w ( t ) = θ q ( z 1 ) Θ Q ( z s ) ε ( t ) ,
where G ( t ) is the glucose concentration at time t, α is a constant term (intercept), w ( t ) is the disturbance series, ∇ is the backward difference operator, defined by w ( t ) : = w ( t ) w ( t 1 ) , d is the non-seasonal integration order of the time series, D is the seasonal integration order of the time series (in practice, d and D are usually small, equal to 0, 1 or 2), s is the seasonal backward difference operator, defined by s w ( t ) : = w ( t ) w ( t s ) . The input ε ( t ) is the stochastic error following a white noise process ε ( t ) W N ( 0 , σ 2 ) and ϕ p ( z 1 ) , Φ P ( z s ) , θ q ( z 1 ) , and Θ Q ( z s ) are polynomials in the lag (back-shift) operator z 1 of degree p, q, P, and Q, respectively, defined as
ϕ p ( z 1 ) = 1 ϕ 1 z 1 ϕ 2 z 2 ϕ p z p Φ P ( z s ) = 1 Φ s z s Φ 2 s z 2 s Φ P s z P s θ q ( z 1 ) = 1 + θ 1 z 1 + θ 2 z 2 + + θ q z q Θ Q ( z s ) = 1 + Θ s z s + Θ 2 s z 2 s + + Θ Q s z Q s .
Model (15) will be expressed in short form as SARIMA ( p , d , q ) ( P , D , Q ) s . If the clustering process is successful, the time subseries in a cluster will be similar, as defined by the partial distance measure d. Then, a SARIMA model can be identified for each cluster i, yielding a set of local glucose predictors (one per cluster). Remark that the cost index during identification will neglect blank data in the residuals computation, as well as pre-sampling data added during the concatenation. Box-Jenkins methodology [23] is used in this identification process. Exogenous inputs could also be considered with SARIMAX models [12], although here only glucose and mealtimes will be considered available.
As a summary, Figure 2 shows the data processing steps during the training phase prior to local models identification. Figure 3 shows the identification procedure.

2.5. Model Integration

Once local models are trained for each cluster, a glucose predictor is built from the integration of such local models during real-time operation. Consider a given time t p t e k , where t e k is the latest event timestamp, from which a prediction is to be computed according to the selected prediction horizon. A total of c local predictions will be available at that time instant, G ^ i ( t | t p ) , i = 1 , , c produced by the models at each cluster. A global glucose prediction G ^ ( t | t p ) will be computed as a weighted sum of the c local predictions, with time-varying weights γ i ( t p ) , as follows
G ^ ( t | t p ) : = i = 1 c γ i ( t p ) G ^ i ( t | t p ) .
The computation of the weights γ i ( t p ) is carried out in a two-step process in an attempt to discard coarsely non-contributing clusters (very dissimilar behavior of the cluster center compared to measured CGM data), and then refining the weighting among the remaining possibly contributing clusters. Given [ G ] t 0 t 1 ( t ) the segment of CGM data from t 0 to t 1 , and [ ν i ] t 0 t 1 ( t ) , i = 1 , , c , the corresponding segments for cluster centers, the fuzzy membership of the segment [ G ] t 0 t 1 ( t ) to the i-th cluster in a given index set I is defined as
u i ( t 1 ; t 0 ) : = l = 1 n I d 2 [ G ] t 0 t 1 ( t ) , [ ν i ] t 0 t 1 ( t ) d 2 [ G ] t 0 t 1 ( t ) , [ ν l ] t 0 t 1 ( t ) 1 m 1 1 ,
where n I : = | I | is the cardinality of the index set I. Then, weights in (17) are computed as follows:
  • First, fuzzy membership u i ( t p ; t e k ) , i I 1 : = { 1 , , c } is computed. That is, similarity of CGM data and cluster centers from the event onset t e k to current time t p is checked. Given a (possibly time-varying) threshold μ m i n ( t p ) , a new index set I 2 : = { i I 1 | u i ( t p ; t e k ) μ m i n ( t p ) } I 1 is defined, selecting the clusters with high enough similarity according to the selected μ m i n . A value μ m i n ( t p ) : = 0.2 max i u i ( t p ; t e k ) was used here, that is, contributions of clusters for which membership is lower than 20% of the maximum membership are neglected.
  • Then, in a second step, fuzzy membership u i ( t p ; t p W ) to each cluster i I 2 is computed, where W is a to-be-defined (short) time window length. A time window W corresponding to 20 min will be considered here.
Weights γ i ( t p ) are then computed as
γ i ( t p ) : = u i ( t p ; t p W ) i I 2 0 i I 1 \ I 2 . .
Remark that i = 1 c γ i ( t p ) = 1 and γ i ( t p ) can be interpreted as a fuzzy membership value. We will refer to (17)–(19) as Global Seasonal Model (GSM) prediction.
It must be remarked that at the onset of the next event, t e k + 1 , the CGM time subseries from t e k to t e k + 1 , with regularized length L, together with the corresponding pre-sampling data, must be appended as new data in the concatenated seasonal time series (Figure 1) of a selected cluster. This is needed because local SARIMA models make use of time-ordered previous data in the same cluster for their predictions, according to the SAR component order. The cluster with the highest fuzzy membership u i ( t e k + 1 ; t e k ) , i I 1 , for the CGM time subseries is selected for this purpose. This should not change representativeness of the cluster prototype, since high similarity of the new time subseries with respect to cluster members is expected, whenever training data represents well the diversity of glucose profiles in a patient. Eventually, online updating of the SARIMA models, or re-clustering and re-training, can be performed.

2.6. Real-Time Crispness and Normality Indices

Besides predicted glucose, two real-time indices are additionally provided indicating crispness of the prediction (degree of representation of current glucose behavior by a single cluster), and normality of the observed behavior, allowing for the detection of patient’s abnormal states (behaviors too dissimilar to available historical CGM data). It must be remarked that, in the scope of this work, the concept of normality is not primarily related to a physiological meaning: normality does not mean patient normality (normoglycemia), and abnormality does not mean patient abnormality (hyper- or hypoglycemia). On the contrary, abnormality must be understood as a behavior too dissimilar to available historical CGM data of a patient. For example, consider that patient A performed exercise regularly in the past and patient B did not perform exercise at all. This difference will be reflected in the available historical CGM data of patient A and B used during training, and, consequently, the identified models using data for patient A will be able to predict well a glycemic response under exercise, whereas identified models using data for patient B will perform badly when facing a well distinguishable response to exercise. Therefore, an exercise bout leading to the same CGM profile will be considered normal for patient A and abnormal for patient B. Hence, the objective of the normality index will be to inform patient B that something abnormal is happening in his/her CGM profile and that he/she can not rely on the prediction of the proposed system. In the case of patient A, nothing will happen in this case. In order to check the normality index capabilities and performance, in Section 2.1 a fictitious validation dataset 2 (“abnormal”) has been defined containing missed boluses and exercise sessions, which are not present in the validation dataset 1 (“normal”). Then, response to missed boluses and exercise sessions are expected to contain abnormal CGM segments (those well distinguishable from other glycemic responses in historical data) in the of the context of this paper, although missed boluses and exercise sessions are normal in the patients’ daily life. The crispness and normality indices may therefore provide significant information to the user (and control algorithms) as part of an online monitoring system.
The “crispness index” (CI) aims at providing information about how much the computed glucose prediction G ^ ( t | t p ) is produced by a single model. Since the glucose predictor is a multi-model system weighted by fuzzy membership values, the index rationale is that predictions based on a single local model in the set, perfectly matching the system’s behavior, should be more reliable. This ideal best case is the one with a membership value γ i ( t p ) of 1 for one of the local models and 0 for the others. On the contrary, the worst case is that all local models contribute equally to the prediction, with weight 1 / c . The crispness index at time t p is defined as the Manhattan distance, normalized to the interval [0, 1], between the vector composed by the membership values γ i ( t p ) , i = 1 , , c , and the equally-distributed-membership vector ( 1 / c , 1 / c , , 1 / c ) , that is
C I ( t p ) : = 1 2 1 1 c i = 1 c γ i ( t p ) 1 c .
The “normality index” (NI) aims at determining the degree at which the current behavior is well represented in historical data and forecasting is the result of “interpolation” among local models predictions (normal behavior), or, on the contrary, the current behavior is beyond past behaviors and forecasting results from “extrapolation” by some or all the local models (abnormal behavior). Possibilistic memberships can give some hints in this case. The possibilistic counterpart of (18), denoted as u i P ( t 1 ; t 0 ) , representing possibilistic membership to the i-th cluster referred to the data window [ t 0 , t 1 ] can be computed as
u i P ( t 1 ; t 0 ) : = 1 + η d 2 ( [ G ] t 0 t 1 ( t ) , [ ν i ] t 0 t 1 ( t ) ) 1 m 1 1 ,
where u i P ( t 1 ; t 0 ) [ 0 , 1 ] , and η is a constant. Define now the possibilistic counterpart of (19) as
γ i P ( t p ) : = u i P ( t p ; t p W ) i I 2 0 i I 1 \ I 2 .
Contrary to fuzzy membership, i = 1 c γ i P ( t p ) = 1 does not necessarily hold now. In the presence of an abnormal period, far away and not represented by any cluster, equal memberships to each cluster would be obtained when considering fuzzy membership (18), resulting from similar distances to all prototypes. The same result would be obtained in a normal period just in the middle of the available clusters. Nevertheless, if the possibilistic membership (21) is used, such abnormal period would result in very low membership values for every cluster. Thus, at a given time t p , the sum of all possibilistic memberships γ i P ( t p ) provides a measure of the sought concept: the closer to zero, the more abnormal the period is, not being represented enough by any cluster. Thus, the normality index is defined as
N I ( t p ) : = 1 | I 2 | i = 1 c γ i P ( t p ) ,
where normalization by the number of non-zero membership values (cardinality of the index set I 2 ) is carried out so that N I ( t p ) [ 0 , 1 ] . Abnormal behaviors may be due to hardware failures, extreme hypoglycemia or hyperglycemia, or any other glycemic behavior not represented in the historical time series used for training the local models. When abnormal behaviors are detected, the user should be informed of the extrapolation being performed. This can highlight the necessity of re-clustering and learning new local models. To this end, an abnormal behavior warning can be generated when N I ( t p ) is below a given tunable threshold N I t h r .
Figure 4 summarizes the local models integration procedure to get a glucose prediction, together with the computation of crispness and normality indices.

2.7. Validation Procedure

The training data set comprised four-month in silico data for a ten patient cohort, as described in Section 2.1. For each patient, training data was partitioned in Π M , Π N , and Π H sets. Clustering and local model training was then applied to each partition, yielding a set of glucose predictors per patient (one per event group M , N , and H ).
On the one hand, local model training was performed by separating data in each cluster into training and validation data. The first 80% of the available data for each cluster was used to generate the concatenated time series for model identification (Section 2.4). The remaining 20% was kept as validation time series. For all time subseries in the validation data in a cluster, predictions of the corresponding local model were evaluated, for prediction horizons P H { 15 , 30 , 60 , 120 , 180 , 240 } min, every time step, from starting time t e i up to t e i + 1 P H , in order to be able to compute prediction residuals. If the duration of the time subseries was smaller than PH, then it was discarded. Standard prediction horizons in the literature are 30 to 60 min. One of the purposes of this in silico study was to analyze in which extent these values could be extended, since longer prediction horizons can be beneficial, for instance, in the context of control algorithms. A prediction horizon of 240 min was considered long enough to represent a postprandial period, and longer prediction horizons were considered of no additional value. Standard metrics RMSE (mg/dL) and MAPE (%) were used to measure forecasting accuracy:
R M S E : = 1 n i = 1 n e 2 ( i )
M A P E : = 100 n i = 1 n e ( i ) G ( i ) ,
where n is the number of observations, G ( i ) denote the ith glucose observation, and e ( i ) = G ( i ) G ^ ( i ) is the forecasting error (residual), with G ^ ( i ) the forecast of G ( i ) . Two definitions of residuals were considered, leading to different forecasting accuracy metrics:
  • Residuals of each predicted trajectory G ( t | t p ) , t [ t p , t p + P H ] . It evaluates how successfully a predicted trajectory fits actual data. Remark that during the identification process glucose trajectories are sought to be fitted by the model, following the same rationale in this metrics definition. In this case, for each prediction, P H observations are available. Metrics were averaged for all computed predictions. Henceforth, this metrics will be referred to as R M S E t r a j and M A P E t r a j . This is the metrics used in our previous works [11,12].
  • Residuals of the glucose trajectory built from predictions G ( t p + P H | t p ) . It evaluates how successfully actual glucose trajectory can be predicted P H time instants ahead. In this case, for each time subseries in the validation data, and denoting as l i the length of the time subseries, l i P H observations are available for the computation of residuals. Metrics were averaged for all time subseries in the validation data. Henceforth, this metrics will be referred to as R M S E l a s t and M A P E l a s t .
On the other hand, glucose predictors performance was evaluated using two independent 2-month validation data sets. A first validation data set included normal behavior, while the second one included new events not present in the training data in order to challenge the predictor (see Section 2.1). For each validation data set, glucose prediction was performed for the whole 2-month period, selecting the corresponding glucose predictor at each new event according to its type (meal, night, hypoglycemia treatment). For all time subseries in the validation data, predictions of the GSM model were computed in the same way as for local models evaluation, described above. As validation data was generated independently from training data, in few cases the duration of a validation time subseries was longer than the prototypes length (regularized length of training data). In this case, last value of the prototypes were held constant up to the validation time subseries length. Metrics R M S E t r a j , M A P E t r a j , R M S E l a s t , and M A P E l a s t were computed as described before.

3. Results and Discussion

3.1. Time Series Building and Data Clustering

Training data, for each of the 10 patients, was comprised of 360 meals and 119 night events, of varying duration. The number of hypoglycemia treatment events was patient-dependent, attending to the settings of the open loop therapy provided in the simulator, with a median value of 18 events and 25–75% percentiles of 13 and 36 events, respectively. Mean CGM glucose ranged from 122 mg/dL (patient 10) to 169 mg/dL (patient 7).
Application of the PDSFCM clustering algorithm, in combination with the FS cluster validity index for the determination of the number of clusters, resulted in a varying number of clusters depending on the variability exhibited by the patient, as shown in Table 1.
As an illustration, Figure 5 shows the clustering results for patient 6 and data in the meals partition Π M . The number of elements per cluster were 50, 61, 36, 63, 70 and 71 for clusters 1 to 6, respectively. Regularized length of the time subseries was 98. Considering the whole cohort, regularized lengths ranged from 98 to 106 samples for Π M , from 60 to 65 samples for Π N , and from 36 to 76 samples for Π H .
After clustering, time subseries were assigned to the cluster with maximum membership. Then, a seasonal time series per cluster was created by concatenating all time subseries assigned to the given cluster representing similar glycemic excursions, preceded by pre-sampling data. A length of five samples was considered for pre-sampling data ( P r = 5 ), given that orders lower than 5 were obtained for the AR and MA processes in previous studies. Thus, a seasonality period of s = L + 5 was enforced, with L the regularized length for that patient and data partition. The resulting seasonalities are presented in Table 2.

3.2. Local Models Identification

A model for each cluster was identified using the Box-Jenkins methodology. As stated in Section 2.7, the first 80% of the data in a cluster were used for model identification, and the rest 20% for model evaluation. During the identification, residuals at time instants with missing values or belonging to pre-sampling periods in the concatenated time series were neglected (weighted 0 in the cost index). SARIMA model structure and parameters were identified for each cluster.
Table 3 shows, as an example, the resulting SARIMA model structure ( p , d , q ) ( P , D , Q ) s for each cluster for patient 6. The orders for the AR component (p) ranges from 1 to 4, and for the MA component (q) from 0 to 4. With regards to seasonal part, SAR component order (P) ranges from 1 to 2, and SMA order (Q) from 0 to 2. Need for time series differentiation ( d 0 or D 0 ) only appeared in hypoglycemia treatment cases, where glucose may follow an increasing trend. Similar results were obtained for the rest of patients.
Accuracy metrics of the trained local models is shown in Table 4, aggregating data for all patients and local models in a partition, as well as overall metrics. For all prediction horizons, the lowest metrics were obtained for the night partition Π N due to the lower variability during nights as compared to meals. Local models for Π H had a poorer performance due to the significantly lower number of events for training and validation, compared to Π M and Π N . Comparing R M S E t r a j ( M A P E t r a j ) versus R M S E l a s t ( M A P E l a s t ) , the latter reported higher values, since residuals of the last predicted value in each prediction is expected to be higher than when the whole predicted trajectory is considered. However, the higher the prediction horizon, the lower this difference was. This may be due to the implicit exclusion of residuals in [ t e i , t e i + P H ) in the computation of R M S E l a s t ( M A P E l a s t ) , where t e i is the event initial time. When P H is long enough, an important part of a postprandial response may be neglected, which may provoke a loss of monotonicity of the R M S E l a s t ( M A P E l a s t ) metrics with respect to the prediction horizon. Overall performance was good, with a maximum average R M S E t r a j of 11.46 mg/dL ( M A P E t r a j of 6.79%), corresponding to a PH of 240 min. Maximum average R M S E l a s t was 13.69 mg/dL (for a PH of 180 min), and maximum average M A P E l a s t of 8.86% (for a PH of 240 min). During the night predictions, these metrics were reduced approximately by 40%.

3.3. Online Forecasting Validation

Figure 6 shows an illustration of the real-time computation of glucose predictions considering 5 local models for a sample validation time subseries in Π M . Four 120-min ahead predictions are shown, separated one hour each, at the samples indicated by the vertical dashed lines starting at mealtime. Upper panel shows CGM data, local models predictions and global glucose prediction obtained from the weighted sum of local predictions, with time-varying weights are shown in the γ i ( t p ) panel. Early postprandial response is more variable and, thus, more local models contribute to the glucose prediction computation, compared to late postprandial phase, where LM2 seems to fully describe the response in this case. This is also described by the crispness index, with lower values at time instants where a higher number of local models contribute to the predicted trajectory. The normality index describes to what extent past short-time CGM data at each prediction time t p is represented by the same segment of data from cluster prototypes, and “interpolation” instead of “extrapolation” is being performed. In this case, a drop of the index is observed during the glucose increase until peak value. A too low value would indicate an abnormal behavior, which threshold need to be tuned (see Section 3.4).
Table 5 present validation results of the glucose predictor in real-time operation for the 2-month independent validation dataset 1 (“normal”) described in Section 2.1. Metrics are expected to deteriorate as compared to the local models performance due to the local predictions integration process, as it is observed in the data presented. For this dataset, overall average R M S E t r a j ranged from 3.51 mg/dL to 23.90 mg/dL for prediction horizons 15, 30, 60, 120, 180 and 240 min ( M A P E t r a j from 2.35% to 15.19%). Overall average R M S E l a s t ranged from 6.52 mg/dL to 28.96 mg/dL ( M A P E l a s t from 4.04% to 20.00%).
Table 6 presents validation results for the two month independent validation dataset 2 (“abnormal”) described in Section 2.1. Inclusion of abnormal events slightly increased error in 1–2% as comparison of M A P E t r a j and M A P E l a s t in Table 5 and Table 6 reveal. This was expected since missed boluses and exercise were not present in the training. The impact was higher up to a prediction horizon of 120 min, which may be related to the duration of the abnormal event effect on glycemia (postprandial and post-exercise periods). The number of predictions column indicates that abnormal events increased the number of hypoglycemic episodes (due to exercise), inducing different partitioning of data and participation of the glucose predictors for Π M , Π N , and Π H . For the abnormal dataset, overall average R M S E t r a j ranged from 4.04 mg/dL to 25.36 mg/dL for the PHs considered ( M A P E t r a j from 2.65% to 15.06%). Overall average R M S E l a s t ranged from 7.33 mg/dL to 32.83 mg/dL ( M A P E l a s t from 4.66% to 19.82%).
Other authors have conducted in silico studies for the performance analysis of a variety of prediction methods, although comparison is not straightforward due to the difference in the simulators used, scenarios considered, and different input requirements by the glucose prediction technique. In this sense, the lower the inputs needed to perform a prediction the better, especially when such inputs require patient intervention such as the amount of carbs intake, for instance. These results are summarized in Table 7.
In [24], 8-day glucose and insulin data is used from a virtual cohort of 30 patients from the educational version of the UVA/Padova simulator, comprising 10 adults, 10 adolescents and 10 children. Variability in meal time and quantity was considered. Three models are compared: AR, ARX considering insulin as input, and ANN (artificial neural network), with prediction horizons of 30 min and 45 min. For the adult population, R M S E l a s t values of 14.0 mg/dL, 13.3 mg/dL and 2.8 mg/dL are reported for AR, ARX and ANN with prediction horizon 30 min, respectively. These figures increase to 23.2 mg/dL, 22.8 mg/dL, and 4.0 mg/dL for a prediction horizon of 45 min. ANN outperformed AR and ARX models. Compared to results in Table 5, AR and ARX are outperformed by the methodology here presented, with a R M S E l a s t of 11.32 mg/dL for a prediction horizon of 30 min. This is as well the case for results in Table 6 including abnormal data, where an R M S E l a s t of 13.18 mg/dL was achieved. Metrics obtained for AR and ARX for 45 min are comparable to the metrics reported in Table 5 for a prediction horizon of 120 min ( R M S E l a s t = 25.15 mg/dL), and in Table 6 for 60 min ( R M S E l a s t = 21.00 mg/dL), respectively. However, this is not the case for ANN, with extremely low R M S E l a s t values reported in [24]. This may be due to the nature of the in silico study, since the simulator used in [24] does not include the extra features of intra-patient variability reported in Section 2.1, besides the length of the data (8 day vs. 2 months), which might have produced overfitting in the ANN case. As well, the ANN used insulin data as external input which may limit applicability to insulin pump users, while in our case, only glucose and mealtime is used for glucose prediction. This latter can be extracted from the pump or smart pen information, or even estimated using meal detection algorithms in standard insulin pen users.
In [25], a neural network incorporating meal information in parallel with a linear predictor (NN-LPA) is evaluated in silico with 11-day data from 20 subjects of the UVA/Padova simulator. As in the previous case, variability in meal time and quantity was considered. The method is compared with the neural network presented in [30] (NNPG) and an AR(1) model. For a prediction horizon of 30 min, R M S E l a s t values of 9.4 mg/dL, 10.7 mg/dL, and 17.5 mg/dL are reported for NN-LPA, NNPG and AR(1), respectively. Of note, NN-LPA requires a physiological meal model since the glucose rate of appearance at t + P H is one of the inputs of the neural network. In [26], a latent variable-based model (LVX) is evaluated from 7-day data from 10 virtual subjects of the UVA/Padova simulator. The model used meal intake and insulin information as exogenous variables. An average R M S E l a s t of 8.6 mg/dL and 14.0 mg/dL was reported for 30-min and 60-min prediction horizons, respectively, as compared to our results in Table 5 with an R M S E l a s t of 11.32 mg/dL and 17.85 mg/dL, respectively, and Table 6, with 13.18 mg/dL and 21.00 mg/dL, respectively. A slight increase of R M S E l a s t of only approximately 3–4 mg/dL (5–7 mg/dL with abnormal data) is observed in our results, despite the far more challenging intra-patient variability in our work and less input information required, as stated above.
More recent in silico studies, in this case using the same extended UVA/Padova simulator as in this work, have been reported. In [27], a physiological model (PM) in combination with CGM signal deconvolution is presented for long-term glucose prediction. The model requires as inputs carbohydrate intake and insulin delivery, as opposed to our case. Two-week data for 10 in silico subjects is used for model training and evaluation. R M S E l a s t values of 10.90 mg/dL, 24.44 mg/dL, 33.50 mg/dL, and 37.63 mg/dL are reported for prediction horizons of 30, 60, 90 and 120 min. These values outperformed ARX and LVX models in head-to-head comparisons. In [28], convolutional recurrent neural networks (CRNN) are evaluated with 1-year data from 10 in silico subjects. Models are trained with 50% of the data and evaluated with the rest 50%. Glucose, meal and insulin information are required as inputs. R M S E l a s t values of 9.38 mg/dL and 18.87 mg/dL for 30-min and 60-min prediction horizons are reported. Above metrics are outperformed in general by results presented in Table 5 and Table 6, being especially relevant longer prediction horizons. Finally, in [29] dilated recurrent neural networks (DRNN) are tested with the same 1-year in silico study. A prediction horizon of 30 min is considered, with a reported R M S E l a s t of 7.8 mg/dL, which is better than our result for the same prediction horizon even in the absence of abnormal data (11.32 mg/dL). However, DRNN required information on insulin, meal intake and time of the day, as opposed to this work.
Summing up, with the limitation of a non-head-to-head comparison and variety of simulation studies in the literature, metrics obtained outperformed other methods, or were very close to the reported performance. This was so even when imperfect training was considered introducing abnormal data in the validation dataset, while having the clear advantage of the minimal input information required (CGM and mealtime). This one can ultimately be automatically extracted without patient intervention making the glucose predictor suitable for insulin pump and MDI users.
From the point of view of the real-world application of the methodology, it is worth remarking that, in a similar way to a neural network, the training phase is the one more computationally demanding. In this work the computing cluster Rigel from Universitat Politècnica de València was used, in particular the Dell Power Edge R640 nodes with 2 processors Intel Xeon Gold 6154 with 18 cores, 3 Ghz and 25 Mb cache memory. The clustering phase for the 10 patients, which included 10 clustering problems per patient with increasing number of clusters for later selecting the optimal number of them, using 22 cores and 3 Gb memory per core, was computed in 22 min. The training of the local models, using 30 cores and 3 Gb memory per core, was performed in about 6.5 h. Validation of local models, using the same resources, lasted 53 min. This gives rise to a total of 8 h of computing time approximately for training. Once trained, the real-time evaluation of a glucose prediction is straightforward, requiring the evaluation of equations in Section 2.5 for the glucose prediction (evaluation of n SARIMA models, n fuzzy memberships, and a weighted sum of time series, where n is the number of clusters), and Section 2.6 for crispness and normality indices.

3.4. Normality Index

The Normality Index defined in Equation (23) is intended to provide information on abnormal glucose behaviors according to available historical data. Thus, it is expected that low normality values at time t p , N I ( t p ) , are related to higher prediction errors for glucose trajectories computed at that same time t p . The Normality Index relies on the comparison of CGM values in the recent past (20 min in this work) with cluster prototypes in that same time window. It is expected that this relationship with the prediction error is stronger for short or medium prediction horizons, for which abnormal behavior is still present. A PH of 60 min was considered in the following analysis. All predictions G ( t | t p ) , t [ t p , t p + P H ] , carried out during the validation of the glucose predictor for dataset 2 (“abnormal”), amounting to a total of 138,888 predicted trajectories, were grouped into two groups, for N I ( t p ) < N I t h r and N I ( t p ) N I t h r , with the threshold N I t h r varying from 0.1 to 0.9 in steps of 0.1. Then, the difference of the median prediction error at t p + P H (absolute value of the residual) among groups was analyzed. Remark that these residuals are the ones considered in the computation of R M S E l a s t for a given validation time subseries. Figure 7 shows these results. All differences were found statistically significant using the Wilcoxon Rank Sum test ( p < 0.001 ). This test was selected since data was non-normal and non-paired.
Clinically meaningful differences were obtained for the lowest thresholds, amounting to 19.14 mg/dL for N I t h r = 0.1 , and 10.29 mg/dL for N I t h r = 0.2 . As an illustration, Figure 8 shows the relationship for N I t h r = 0.2 , which reveals an increased presence of higher prediction errors when N I ( t p ) < 0.2 (median [25th–75th percentiles]: 21.05 [9.79, 38.52] vs. 10.75 [4.88, 20.49] mg/dL).
Finally, Figure 9 illustrates an example of the relationship between NI and abnormal events in the simulated scenario. Postprandial response after a missed bolus (blue shaded area) is clearly detected as an abnormal CGM response. Consider that a minimum delay of 20 min will happen since that is the window considered in the computation of NI. After an initial glucose rise that could be similar to other meals, the value of NI is below the threshold consecutively at each sample during the postprandial period until glucose returns to normoglycemia. Regarding the exercise, including 3-h post-exercise period with altered insulin sensitivity (green area), abnormality is found in the hypoglycemia recovery, due to the increased need of carbohydrates as compared to a non-exercise related hypoglycemia in the training data, as well as the initial response of the meal following exercise. Other segments of CGM data might be also considered abnormal without relation to missed boluses or exercise, such as the one around sample 1.64 × 10 4 . In this case, a meal close to a hypoglycemia recovery happened.
The information provided by the Normality Index can be useful in real-time operation, raising for instance warnings when sufficiently long abnormal periods are detected (as in the case of missed boluses), due to expected decrease of accuracy of predictions. Additionally, remark that its computation is independent of predictions since it relies only on the clustering training phase (no local models are implied). This means that its use in an offline context can also be devised, as a tool for the analysis of CGM data highlighting areas of abnormal response that may deserve special attention by the clinician.

4. Conclusions

In previous works, seasonal local modeling proved successful in glucose prediction for longer prediction horizons. However, fixed-length postprandial time series were used, which do not apply to realistic scenario. In this work, this limitation is overcome with the introduction of event-to-event CGM time series partitioning, and clustering of variable-length data. A new local models integration method is also proposed. Metrics obtained outperformed other literature methods, or were very close to the reported ones, even when imperfect training was considered introducing abnormal data in the validation dataset, while having the clear advantage of the minimal input information required (CGM and mealtime). This one can ultimately be automatically extracted without patient intervention making the glucose predictor suitable for insulin pump and MDI users. Besides, the normality index can provide useful information about abnormal glycemic responses leading to a more cautious use of the provided predictions, or providing valuable information to clinicians for the inspection of CGM data. This study has the limitation of any in silico study, and evaluation with clinical data should be conducted as the next step in this research. Although this work focused on the adult cohort for the sake of comparison with other literature methods, the methodology could have been applied equally to the adolescent or children virtual cohort, with an adaptation of the number of clusters considered according to the population variability.

Author Contributions

Conceptualization, E.M., J.-L.D. and J.B.; methodology, E.M., J.-L.D. and J.B.; software, E.M., J.-L.D. and J.B.; validation, J.-L.D. and J.B. formal analysis, E.M., J.-L.D. and J.B.; investigation, E.M., J.-L.D. and J.B.; resources, E.M., J.-L.D. and J.B.; data curation, E.M., J.-L.D. and J.B.; writing—original draft preparation, E.M., J.-L.D. and J.B.; writing—review and editing, J.-L.D. and J.B.; visualization, E.M., J.-L.D. and J.B.; supervision, J.-L.D. and J.B.; project administration, J.-L.D. and J.B.; funding acquisition, J.B. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Ministerio de Economía, Industria y Competitividad (MINECO), Grant Number DPI2016-78831-C2-1-R, the Agencia Estatal de Investigación PID2019-107722RB-C21/AEI/10.13039/501100011033, and the European Union (FEDER funds).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The simulated datasets used in this study are available on request from the corresponding author.

Acknowledgments

The authors would like to acknowledge fruitful discussion with Andrea Facchinetti, Simone del Favero and Francesco Prendin, from University of Padova, related to prediction accuracy metrics in this work.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
T1DType 1 Diabetes
CGMContinuous Glucose Monitoring
IDFInternational Diabetes Federation
MARDMean Absolute Relative Difference
SMBGSelf-Monitoring Blood Glucose
PGPlasma Glucose
CGCapillary Glucose

References

  1. International Diabetes Federation. IDF Diabetes Atlas, 9th ed.; International Diabetes Federation: Brussels, Belgium, 2019. [Google Scholar]
  2. Hovorka, R. Continuous glucose monitoring and closed-loop systems. Diabet. Med. 2006, 23, 1–12. [Google Scholar] [CrossRef]
  3. Palerm, C.C.; Willis, J.P.; Desemone, J.; Bequette, B.W. Hypoglycemia prediction and detection using optimal estimation. Diabetes Technol. Ther. 2005, 7, 3–14. [Google Scholar] [CrossRef]
  4. Forlenza, G.P.; Li, Z.; Buckingham, B.A.; Pinsker, J.E.; Cengiz, E.; Wadwa, R.P.; Ekhlaspour, L.; Church, M.M.; Weinzimer, S.A.; Jost, E.; et al. Predictive low-glucose suspend reduces hypoglycemia in adults, adolescents, and children with type 1 diabetes in an at-home randomized crossover study: Results of the PROLOG trial. Diabetes Care 2018, 41, 2155–2161. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  5. Haidar, A. The artificial pancreas: How closed-loop control is revolutionizing diabetes. IEEE Control Syst. Mag. 2016, 36, 28–47. [Google Scholar]
  6. Kovatchev, B.; Tamborlane, W.V.; Cefalu, W.T.; Cobelli, C. The artificial pancreas in 2016: A digital treatment ecosystem for diabetes. Diabetes Care 2016, 39, 1123–1126. [Google Scholar] [CrossRef] [Green Version]
  7. Trevitt, S.; Simpson, S.; Wood, A. Artificial pancreas device systems for the closed-loop control of type 1 diabetes: What systems are in development? J. Diabetes Sci. Technol. 2016, 10, 714–723. [Google Scholar] [CrossRef] [Green Version]
  8. Bergenstal, R.M.; Garg, S.; Weinzimer, S.A.; Buckingham, B.A.; Bode, B.W.; Tamborlane, W.V.; Kaufman, F.R. Safety of a hybrid closed-loop insulin delivery system in patients with type 1 diabetes. JAMA 2016, 316, 1407–1408. [Google Scholar] [CrossRef] [PubMed]
  9. Hovorka, R.; Canonico, V.; Chassin, L.J.; Haueter, U.; Massi-Benedetti, M.; Federici, M.O.; Pieber, T.R.; Schaller, H.C.; Schaupp, L.; Vering, T.; et al. Nonlinear model predictive control of glucose concentration in subjects with type 1 diabetes. Physiol. Meas. 2004, 25, 905. [Google Scholar] [CrossRef] [Green Version]
  10. Oviedo, S.; Vehí, J.; Calm, R.; Armengol, J. A review of personalized blood glucose prediction strategies for T1DM patients. Int. J. Numer. Methods Biomed. Eng. 2017, 33, e2833. [Google Scholar] [CrossRef] [PubMed]
  11. Montaser, E.; Díez, J.L.; Bondia, J. Stochastic Seasonal Models for Glucose Prediction in the Artificial Pancreas. J. Diabetes Sci. Technol. 2017, 11, 1124–1131. [Google Scholar] [CrossRef] [PubMed]
  12. Montaser, E.; Díez, J.L.; Rossetti, P.; Rashid, M.; Cinar, A.; Bondia, J. Seasonal Local Models for Glucose Prediction in Type 1 Diabetes. J. Biomed. Health Inform. 2020, 24, 2064–2072. [Google Scholar] [CrossRef]
  13. Hylleberg, S. Modelling Seasonality; Oxford University Press: Oxford, UK, 1992. [Google Scholar]
  14. Dalla Man, C.; Micheletto, F.; Lv, D.; Breton, M.; Kovatchev, B.; Cobelli, C. The UVA/PADOVA type 1 diabetes simulator: New features. J. Diabetes Sci. Technol. 2014, 8, 26–34. [Google Scholar]
  15. Schiavon, M.; Man, C.D.; Kudva, Y.C.; Basu, A.; Cobelli, C. In silico optimization of basal insulin infusion rate during exercise: Implication for artificial pancreas. J. Diabetes Sci. Technol. 2013, 7, 1461–1469. [Google Scholar] [CrossRef] [Green Version]
  16. Brazeau, A.S.; Mircescu, H.; Desjardins, K.; Leroux, C.; Strychar, I.; Ekoé, J.M.; Rabasa-Lhoret, R. Carbohydrate counting accuracy and blood glucose variability in adults with type 1 diabetes. Diabetes Res. Clin. Pract. 2013, 99, 19–23. [Google Scholar] [CrossRef] [PubMed]
  17. Haidar, A.; Elleri, D.; Kumareswaran, K.; Leelarathna, L.; Allen, J.M.; Caldwell, K.; Murphy, H.R.; Wilinska, M.E.; Acerini, C.L.; Evans, M.L.; et al. Pharmacokinetics of insulin aspart in pump-treated subjects with type 1 diabetes: Reproducibility and effect of age, weight, and duration of diabetes. Diabetes Care 2013, 36, e173–e174. [Google Scholar] [CrossRef] [Green Version]
  18. Scheiner, G.; Boyer, B. Characteristics of basal insulin requirements by age and gender in Type-1 diabetes patients using insulin pump therapy. Diabetes Res. Clin. Pract. 2005, 69, 14–21. [Google Scholar] [CrossRef]
  19. Bezdek, J.C. Pattern Recognition with Fuzzy Objective Function Algorithms; Advanced Applications in Pattern Recognition Series; Springer: New York, NY, USA, 1981. [Google Scholar]
  20. Dixon, J.K. Pattern recognition with partly missing data. IEEE Trans. Syst. Man Cybern. 1979, 9, 617–621. [Google Scholar] [CrossRef]
  21. Wang, W.; Zhang, Y. On fuzzy cluster validity indices. Fuzzy Sets Syst. 2007, 158, 2095–2117. [Google Scholar] [CrossRef]
  22. Brockwell, P.J.; Davis, R.A. Introduction to Time Series and Forecasting; Springer: Cham, Switzerland, 2016. [Google Scholar]
  23. Box, G.E.; Jenkins, G.M.; Reinsel, G.C.; Ljung, G.M. Time Series Analysis: Forecasting and Control; John Wiley & Sons: Hoboken, NJ, USA, 2015. [Google Scholar]
  24. Daskalaki, E.; Prountzou, A.; Diem, P.; Mougiakakou, S.G. Real-Time Adaptive Models for the Personalized Prediction of Glycemic Profile in Type 1 Diabetes Patients. Diabetes Technol. Ther. 2012, 14, 168–174. [Google Scholar] [CrossRef]
  25. Zecchin, C.; Facchinetti, A.; Sparacino, G.; de Nicolao, G.; Cobelli, C. Neural Network Incorporating Meal Information Improves Accuracy of Short-Time Prediction of Glucose Concentration. IEEE Trans. Biomed. Eng. 2012, 59, 1550–1560. [Google Scholar] [CrossRef] [PubMed]
  26. Zhao, C.; Dassau, E.; Jovanovič, L.; Zisser, H.; Doyle, F., III; Seborg, D. Predicting Subcutaneous Glucose Concentration Using a Latent- Variable-Based Statistical Method for Type 1 Diabetes Mellitus. J. Diabetes Sci. Technol. 2012, 6, 617–633. [Google Scholar] [CrossRef] [Green Version]
  27. Liu, C.; Vehí, J.; Avari, P.; Reddy, M.; Oliver, N.; Georgiou, P.; Herrero, P. Long-Term Glucose Forecasting Using a Physiological Model and Deconvolution of the Continuous Glucose Monitoring Signal. Sensors 2019, 19, 4338. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  28. Li, K.; Daniels, J.; Liu, C.; Herrero-Vinas, P.; Georgiou, P. Convolutional Recurrent Neural Networks for Glucose Prediction. IEEE J. Biomed. Health Inform. 2020, 24, 603–613. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  29. Zhu, T.; Li, K.; Chen, J.; Herrero, P.; Georgiou, P. Dilated Recurrent Neural Networks for Glucose Forecasting in Type 1 Diabetes. J. Healthc. Inform. Res. 2020, 4, 308–324. [Google Scholar] [CrossRef] [Green Version]
  30. Pérez-Gandía, C.; Facchinetti, A.; Sparacino, G.; Cobelli, C.; Gómez, E.; Rigla, M.; de Leiva, A.; Hernando, M. Artificial Neural Network Algorithm for Online Glucose Prediction from Continuous Glucose Monitoring. Diabetes Technol. Ther. 2010, 12, 81–88. [Google Scholar] [CrossRef] [PubMed]
Figure 1. An illustrative example of a concatenated time series for seasonal stochastic local models identification. Each element in a cluster, corresponding in this case to glucose responses to meal events regularized to length L, are concatenated ordered according to the event time stamp, and preceded by pre-sampling data of length P r . As a result, a seasonal time series with seasonality s = L + P r is obtained. Remark that meal events not necessarily are consecutive due to the clustering process.
Figure 1. An illustrative example of a concatenated time series for seasonal stochastic local models identification. Each element in a cluster, corresponding in this case to glucose responses to meal events regularized to length L, are concatenated ordered according to the event time stamp, and preceded by pre-sampling data of length P r . As a result, a seasonal time series with seasonality s = L + P r is obtained. Remark that meal events not necessarily are consecutive due to the clustering process.
Sensors 21 03188 g001
Figure 2. Data processing steps during the training phase. Optional event labels may include: Breakfast (B), Lunch (L), Dinner (D), Night (N), Hypo treatment (H), …
Figure 2. Data processing steps during the training phase. Optional event labels may include: Breakfast (B), Lunch (L), Dinner (D), Night (N), Hypo treatment (H), …
Sensors 21 03188 g002
Figure 3. Local models identification process during the training phase. Data in a cluster was split in 80% for training and 20% for validation (see Section 2.7).
Figure 3. Local models identification process during the training phase. Data in a cluster was split in 80% for training and 20% for validation (see Section 2.7).
Sensors 21 03188 g003
Figure 4. Real-time operation of the glucose predictor. When a new event is reported, the predictor trained for that event class (meal, night, or hypo treatment in this work) is selected. This predictor will be composed of a number of cluster prototypes and local models (dashed boxes PROTOTYPES and SARIMA/X MODELS). Then, at each sampling time t p , a new glucose measurement G ( t p ) is received from the CGM, and a predicted trajectory G ^ ( t | t p ) is computed considering a given prediction horizon. To this end, fuzzy memberships to each cluster, γ i ( t p ) , provide the weighting factors of predicted trajectories by the local models, G ^ i ( t | t p ) , following the two-step method described in Section 2.5. Additionally, crispness and normality indices are computed from fuzzy and possibilistic memberships to each cluster, respectively, as described in this section, which are provided as outputs together with the predicted trajectory. When the next event happens, the CGM time series of the last period is added to the cluster with most similar prototype, as well as to the historical data of the local model associated to that cluster.
Figure 4. Real-time operation of the glucose predictor. When a new event is reported, the predictor trained for that event class (meal, night, or hypo treatment in this work) is selected. This predictor will be composed of a number of cluster prototypes and local models (dashed boxes PROTOTYPES and SARIMA/X MODELS). Then, at each sampling time t p , a new glucose measurement G ( t p ) is received from the CGM, and a predicted trajectory G ^ ( t | t p ) is computed considering a given prediction horizon. To this end, fuzzy memberships to each cluster, γ i ( t p ) , provide the weighting factors of predicted trajectories by the local models, G ^ i ( t | t p ) , following the two-step method described in Section 2.5. Additionally, crispness and normality indices are computed from fuzzy and possibilistic memberships to each cluster, respectively, as described in this section, which are provided as outputs together with the predicted trajectory. When the next event happens, the CGM time series of the last period is added to the cluster with most similar prototype, as well as to the historical data of the local model associated to that cluster.
Sensors 21 03188 g004
Figure 5. Clustering result of time subseries in meals partition Π M for patient 6. Black solid line indicates the cluster prototype.
Figure 5. Clustering result of time subseries in meals partition Π M for patient 6. Black solid line indicates the cluster prototype.
Sensors 21 03188 g005
Figure 6. Illustration of the real-time computation of glucose predictions. Vertical dashed lines indicate the start of each 2-h prediction shown.
Figure 6. Illustration of the real-time computation of glucose predictions. Vertical dashed lines indicate the start of each 2-h prediction shown.
Sensors 21 03188 g006
Figure 7. Relationship between Normality Index and prediction error. Difference of the median absolute value of the residual at t p + P H between groups for N I ( t p ) < N I t h r and N I ( t p ) N I t h r , with N I t h r ranging from 0.1 to 0.9, is shown. All differences were found statistically significant ( p < 0.001 ).
Figure 7. Relationship between Normality Index and prediction error. Difference of the median absolute value of the residual at t p + P H between groups for N I ( t p ) < N I t h r and N I ( t p ) N I t h r , with N I t h r ranging from 0.1 to 0.9, is shown. All differences were found statistically significant ( p < 0.001 ).
Sensors 21 03188 g007
Figure 8. Boxplot of absolute value of the residual at t p + P H grouped by Normality Index value for a threshold of 0.2. Difference of the median was statistically significant by Wilcoxon Rank Sum test ( p < 0.001 ).
Figure 8. Boxplot of absolute value of the residual at t p + P H grouped by Normality Index value for a threshold of 0.2. Difference of the median was statistically significant by Wilcoxon Rank Sum test ( p < 0.001 ).
Sensors 21 03188 g008
Figure 9. Example of relationship between Normality Index and abnormal events in the simulated scenario. Shaded blue area indicates a missed bolus postprandial period. Shaded green area indicates an exercise session and 3-h post-exercise period. Shaded red area indicates a section of CGM data classified as abnormal ( N I ( t p ) < 0.2 ).
Figure 9. Example of relationship between Normality Index and abnormal events in the simulated scenario. Shaded blue area indicates a missed bolus postprandial period. Shaded green area indicates an exercise session and 3-h post-exercise period. Shaded red area indicates a section of CGM data classified as abnormal ( N I ( t p ) < 0.2 ).
Sensors 21 03188 g009
Table 1. Number of clusters considered for each patient (P) according to the FS cluster validity index. For patients 5 and 8, not enough hypoglycemia treatments were available to apply clustering (marked as *). In these cases, only a single local model is considered.
Table 1. Number of clusters considered for each patient (P) according to the FS cluster validity index. For patients 5 and 8, not enough hypoglycemia treatments were available to apply clustering (marked as *). In these cases, only a single local model is considered.
P1P2P3P4P5P6P7P8P9P10
Meals ( Π M )5555668555
Night ( Π N )3333334345
Hypo treatment ( Π H )22221 *341 *33
Table 2. Seasonality (in number of samples) resulting from time subseries concatenation in a cluster.
Table 2. Seasonality (in number of samples) resulting from time subseries concatenation in a cluster.
P1P2P3P4P5P6P7P8P9P10
Meals ( Π M )111105106103105103103107103105
Night ( Π N )70666574676869666668
Hypo treatment ( Π H )81516075437465416561
Table 3. Example of local models structure (patient 6), represented as ( p , d , q ) ( P , D , Q ) s .
Table 3. Example of local models structure (patient 6), represented as ( p , d , q ) ( P , D , Q ) s .
PartitionClusterSARIMA Model Structure
Meals ( Π M )1 ( 2 , 0 , 1 ) ( 2 , 0 , 2 ) 103
2 ( 2 , 0 , 2 ) ( 1 , 0 , 1 ) 103
3 ( 4 , 0 , 4 ) ( 2 , 0 , 0 ) 103
4 ( 3 , 0 , 3 ) ( 2 , 0 , 1 ) 103
5 ( 4 , 0 , 1 ) ( 1 , 0 , 1 ) 103
6 ( 3 , 0 , 2 ) ( 1 , 0 , 1 ) 103
Night ( Π N )1 ( 2 , 0 , 0 ) ( 1 , 0 , 2 ) 68
2 ( 2 , 0 , 4 ) ( 1 , 0 , 1 ) 68
3 ( 2 , 0 , 3 ) ( 1 , 0 , 1 ) 68
Hypo treatment ( Π H )1 ( 4 , 0 , 0 ) ( 1 , 0 , 1 ) 74
2 ( 1 , 0 , 2 ) ( 1 , 0 , 1 ) 74
3 ( 1 , 1 , 0 ) ( 1 , 1 , 0 ) 74
Table 4. Accuracy metrics of the trained local models aggregating data for all patients and local models in a partition, as well as overall metrics. The number of computed PH-ahead predictions is reported in each case, which depends on the number of validation events and their length.
Table 4. Accuracy metrics of the trained local models aggregating data for all patients and local models in a partition, as well as overall metrics. The number of computed PH-ahead predictions is reported in each case, which depends on the number of validation events and their length.
Number of RMSE traj RMSE last MAPE traj MAPE last
Predictions(mg/dL)(mg/dL)(%)(%)
PH = 15 min
Meals ( Π M )54,3653.03 (2.46)5.46 (1.11)1.96 (1.61)2.89 (0.43)
2.41 [1.22, 4.16]5.24 [4.79, 5.95]1.53 [0.76, 2.70]2.91 [2.58, 3.23]
Night ( Π N )10,9402.34 (1.98)4.60 (2.54)1.91 (1.56)3.04 (1.38)
1.84 [0.97, 3.15]3.94 [3.55, 4.32]1.51 [0.76, 2.60]2.84 [2.43, 3.23]
Hypo treatment ( Π H )14403.98 (3.60)6.71 (2.78)3.17 (3.19)4.78 (2.30)
3.02 [1.46, 5.21]5.79 [4.80, 7.69]2.16 [1.09, 4.03]4.12 [3.11, 5.90]
Overall66,7452.94 (2.43)5.45 (2.15)1.97 (1.66)3.32 (1.50)
2.31 [1.17, 4.00]5.01 [4.16, 6.03]1.54 [0.77, 2.70]3.04 [2.59, 3.33]
PH = 30 min
Meals ( Π M )52,1874.98 (3.76)9.10 (1.94)3.09 (2.36)4.80 (0.76)
4.01 [2.26, 6.68]8.53 [7.99, 9.84]2.46 [1.35, 4.17]4.80 [4.19, 5.40]
Night ( Π N )10,2113.64 (2.86)7.09 (4.49)2.87 (2.17)4.67 (2.49)
2.92 [1.74, 4.73]5.87 [5.27, 6.99]2.29 [1.33, 3.78]4.24 [3.75, 4.80]
Hypo treatment ( Π H )13046.71 (6.01)11.78 (6.11)4.92 (4.66)7.95 (5.10)
4.88 [2.70, 8.57]10.44 [7.64, 13.57]3.32 [1.81, 6.45]6.85 [4.74, 8.67]
Overall63,7024.80 (3.74)9.04 (4.24)3.09 (2.41)5.41 (3.00)
3.80 [2.16, 6.39]8.08 [6.59, 10.30]2.45 [1.36, 4.13]4.75 [4.06, 5.52]
PH = 60 min
Meals ( Π M )47,8317.45 (5.17)12.52 (3.19)4.50 (3.13)6.68 (1.21)
6.13 [3.77, 9.69]11.69 [10.63, 13.92]3.70 [2.22, 5.95]6.63 [5.67, 7.52]
Night ( Π N )87534.94 (3.58)8.86 (6.82)3.80 (2.59)5.79 (3.86)
4.10 [2.67, 6.11]6.84 [6.07, 8.26]3.15 [2.00, 4.87]4.92 [4.22, 6.03]
Hypo treatment ( Π H )103410.53 (9.53)17.23 (12.39)7.04 (6.49)10.67 (9.46)
7.31 [4.21, 13.55]14.42 [9.22, 21.76]4.59 [2.75, 8.95]6.77 [4.84, 14.34]
Overall57,6187.13 (5.17)12.37 (7.61)4.44 (3.18)7.23 (5.11)
5.73 [3.54, 9.18]10.77 [7.85, 14.01]3.62 [2.18, 5.81]6.09 [4.98, 7.50]
PH = 120 min
Meals ( Π M )39,1199.82 (6.09)14.19 (4.37)5.88 (3.74)8.10 (1.72)
8.32 [5.57, 12.39]13.29 [11.52, 15.35]4.98 [3.22, 7.54]7.95 [6.81, 9.13]
Night ( Π N )58375.98 (3.85)9.41 (8.48)4.47 (2.58)6.19 (5.17)
5.26 [3.75, 7.21]7.15 [6.16, 9.10]3.86 [2.75, 5.50]5.15 [4.30, 6.67]
Hypo treatment ( Π H )52216.63 (14.44)19.27 (13.96)10.36 (9.23)10.50 (7.85)
10.54 [6.32, 21.66]15.53 [8.60, 27.97]6.54 [3.80, 13.45]7.56 [4.36, 15.76]
Overall45,4789.40 (6.20)13.58 (8.72)5.75 (3.78)7.92 (4.72)
7.79 [5.21, 11.81]12.00 [8.12, 15.26]4.82 [3.14, 7.28]7.16 [5.34, 8.84]
PH = 180 min
Meals ( Π M )30,41310.89 (6.09)14.16 (4.75)6.49 (3.77)8.58 (1.97)
9.50 [6.63, 13.52]13.05 [11.02, 15.40]5.57 [3.83, 8.22]8.77 [6.99, 9.80]
Night ( Π N )29356.45 (3.67)9.96 (9.64)4.78 (2.42)6.76 (6.35)
5.84 [4.32, 7.55]7.59 [6.07, 9.85]4.21 [3.12, 5.91]5.12 [4.28, 7.63]
Hypo treatment ( Π H )19320.73 (17.21)21.48 (16.47)12.49 (10.47)14.37 (10.50)
12.87 [7.47, 30.05]13.46 [11.33, 32.33]6.95 [4.66, 20.11]11.06 [5.31, 22.06]
Overall33,54110.56 (6.22)13.69 (9.34)6.37 (3.80)8.71 (5.81)
9.06 [6.30, 13.11]11.67 [9.31, 14.71]5.45 [3.74, 8.01]7.67 [5.65, 9.57]
PH = 240 min
Meals ( Π M )21,86511.56 (5.88)14.32 (4.89)6.81 (3.54)9.06 (2.21)
10.39 [7.45, 14.13]13.21 [10.68, 15.99]6.00 [4.27, 8.52]8.97 [7.09, 10.81]
Night ( Π N )5766.71 (2.50)8.34 (4.44)5.12 (2.13)6.37 (4.14)
6.30 [4.77, 8.25]7.71 [4.99, 9.29]4.87 [3.53, 6.14]4.96 [3.62, 7.08]
Hypo treatment ( Π H )5623.53 (17.21)27.74 (29.20)13.94 (10.27)19.55 (20.59)
16.13 [9.71, 34.75]13.24 [9.86, 51.20]8.51 [5.36, 21.68]10.09 [4.05, 43.91]
Overall22,49711.46 (5.95)13.23 (9.53)6.79 (3.58)8.86 (6.46)
10.27 [7.32, 14.02]11.72 [8.68, 15.08]5.96 [4.25, 8.47]7.93 [5.82, 10.81]
Table 5. Accuracy metrics of the glucose predictor for validation dataset 1 (“normal”).
Table 5. Accuracy metrics of the glucose predictor for validation dataset 1 (“normal”).
Number of RMSE traj RMSE last MAPE traj MAPE last
Predictions(mg/dL)(mg/dL)(%)(%)
PH = 15 min
Meals ( Π M )133,5403.63 (3.11)6.58 (0.96)2.36 (2.00)3.55 (0.36)
2.81 [1.39, 4.93]6.54 [6.10, 6.79]1.83 [0.90, 3.22]3.56 [3.34, 3.85]
Night ( Π N )26,4262.79 (2.31)4.90 (0.87)2.14 (1.75)3.17 (0.63)
2.19 [1.13, 3.80]4.71 [4.29, 5.07]1.67 [0.84, 2.96]3.00 [2.73, 3.69]
Hypo treatment ( Π H )43083.99 (3.35)8.08 (2.97)3.46 (3.15)5.41 (1.68)
3.18 [1.59, 5.42]6.57 [6.43, 10.80]2.57 [1.25, 4.68]5.10 [4.46, 6.15]
Overall164,2743.51 (3.02)6.52 (2.24)2.35 (2.01)4.04 (1.42)
2.71 [1.35, 4.75]6.37 [5.07, 6.70]1.82 [0.89, 3.21]3.63 [3.09, 4.46]
PH = 30 min
Meals ( Π M )128,1446.31 (5.26)12.08 (1.81)3.90 (3.17)6.35 (0.67)
4.88 [2.61, 8.44]11.71 [11.16, 12.33]3.05 [1.61, 5.26]6.30 [5.84, 6.87]
Night ( Π N )24,6594.50 (3.57)7.93 (1.83)3.34 (2.63)5.09 (1.16)
3.58 [2.04, 5.90]7.42 [6.69, 8.35]2.64 [1.49, 4.46]4.63 [4.39, 5.79]
Hypo treatment ( Π H )37466.96 (5.37)13.95 (4.67)5.60 (4.82)9.05 (3.48)
5.49 [3.12, 9.35]12.66 [11.30, 14.53]4.15 [2.25, 7.50]7.90 [7.35, 9.95]
Overall156,5496.04 (5.08)11.32 (3.92)3.86 (3.16)6.83 (2.67)
4.64 [2.51, 8.03]11.27 [8.35, 12.65]3.00 [1.60, 5.16]6.47 [5.55, 7.37]
PH = 60 min
Meals ( Π M )117,35610.45 (8.60)19.49 (3.52)6.30 (4.97)10.19 (1.42)
8.06 [4.54, 13.65]18.58 [17.43, 20.09]4.93 [2.75, 8.34]9.76 [9.28, 10.76]
Night ( Π N )21,1426.50 (4.98)10.46 (2.95)4.74 (3.57)6.63 (1.73)
5.22 [3.33, 8.16]9.67 [8.23, 11.08]3.79 [2.35, 6.05]6.16 [5.58, 7.18]
Hypo treatment ( Π H )270912.25 (9.24)23.60 (9.77)8.87 (7.20)13.75 (6.65)
9.59 [5.42, 16.40]20.94 [17.57, 23.39]6.62 [3.58, 12.05]11.07 [10.60, 15.28]
Overall141,2079.90 (8.30)17.85 (8.21)6.11 (4.89)10.19 (4.90)
7.48 [4.29, 12.83]17.44 [11.08, 20.93]4.74 [2.69, 8.04]9.68 [7.18, 10.76]
PH = 120 min
Meals ( Π M )95,78016.30 (12.49)26.80 (6.03)10.03 (7.72)15.87 (3.10)
12.86 [7.65, 21.14]24.77 [22.77, 28.19]7.87 [4.61, 13.09]14.99 [13.52, 17.46]
Night ( Π N )14,1498.61 (6.18)12.01 (3.62)6.23 (4.48)7.91 (2.50)
7.08 [4.78, 10.50]11.24 [8.71, 14.29]5.05 [3.33, 7.76]7.52 [5.83, 9.14]
Hypo treatment ( Π H )114321.67 (17.55)36.64 (21.12)13.85 (10.65)20.00 (10.06)
15.65 [9.02, 28.52]29.97 [20.72, 42.83]9.97 [5.51, 19.77]16.31 [14.01, 22.75]
Overall111,07215.38 (12.23)25.15 (16.12)9.58 (7.55)14.59 (7.90)
11.80 [7.02, 19.90]22.72 [14.29, 28.19]7.40 [4.36, 12.41]13.77 [9.14, 16.67]
PH = 180 min
Meals ( Π M )74,29721.02 (14.45)32.14 (6.80)13.36 (9.96)21.57 (4.41)
17.24 [10.62, 27.63]30.31 [27.52, 34.38]10.49 [6.35, 17.48]21.58 [17.81, 22.70]
Night ( Π N )718210.71 (6.55)13.25 (4.41)7.71 (4.74)9.21 (3.03)
9.18 [6.37, 13.01]13.32 [9.33, 14.79]6.56 [4.41, 9.48]9.35 [6.50, 10.43]
Hypo treatment ( Π H )37426.67 (20.46)41.50 (25.48)16.83 (12.91)27.95 (16.87)
20.94 [10.72, 34.96]35.28 [29.39, 41.73]12.15 [6.28, 25.29]20.88 [16.53, 34.55]
Overall81,85320.15 (14.28)28.96 (19.10)12.88 (9.77)19.58 (12.64)
16.24 [9.92, 26.56]28.45 [14.79, 34.38]10.00 [6.07, 16.78]17.74 [9.73, 22.01]
PH = 240 min
Meals ( Π M )53,11824.19 (16.07)34.53 (9.29)15.36 (10.99)24.21 (6.91)
20.05 [12.60, 31.81]33.93 [27.40, 37.77]12.36 [7.63, 19.91]23.35 [21.10, 27.92]
Night ( Π N )138411.83 (6.66)12.87 (6.05)8.31 (4.90)9.04 (4.09)
9.59 [7.56, 14.32]10.38 [8.30, 16.19]6.85 [5.13, 10.19]7.54 [5.85, 12.28]
Hypo treatment ( Π H )11732.68 (20.11)41.58 (14.18)21.51 (14.59)33.52 (26.41)
26.69 [16.15, 48.10]43.77 [30.66, 50.34]18.86 [9.74, 33.57]23.21 [16.02, 45.16]
Overall54,61923.90 (16.04)27.28 (15.18)15.19 (10.94)20.00 (15.36)
19.70 [12.28, 31.40]25.58 [13.10, 36.60]12.17 [7.50, 19.71]17.04 [9.15, 24.53]
Table 6. Accuracy metrics of the glucose predictor for validation dataset 2 (“abnormal”).
Table 6. Accuracy metrics of the glucose predictor for validation dataset 2 (“abnormal”).
Number of RMSE traj RMSE last MAPE traj MAPE last
Predictions
PH = 15 min
Meals ( Π M )128,0024.18 (3.72)7.72 (1.12)2.59 (2.34)3.92 (0.34)
3.12 [1.52, 5.63]7.51 [7.17, 8.18]1.96 [0.95, 3.50]3.95 [3.72, 4.25]
Night ( Π N )26,1133.14 (2.86)5.70 (1.17)2.25 (1.80)3.33 (0.52)
2.35 [1.20, 4.15]5.68 [5.17, 6.08]1.79 [0.88, 3.17]3.34 [2.90, 3.64]
Hypo treatment ( Π H )94964.71 (4.57)8.57 (2.80)4.58 (4.69)6.74 (1.57)
3.64 [1.75, 6.40]7.27 [6.04, 11.59]3.09 [1.41, 6.16]6.69 [5.48, 7.72]
Overall163,6114.04 (3.68)7.33 (2.18)2.65 (2.51)4.66 (1.78)
3.00 [1.47, 5.44]6.99 [5.97, 8.18]1.97 [0.95, 3.55]4.08 [3.43, 5.48]
PH = 30 min
Meals ( Π M )122,6177.29 (6.34)14.34 (2.13)4.31 (3.73)7.13 (0.59)
5.42 [2.84, 9.65]13.69 [13.14, 15.10]3.29 [1.70, 5.75]7.04 [6.55, 7.72]
Night ( Π N )24,3495.06 (4.45)9.35 (2.10)3.53 (2.66)5.38 (0.95)
3.79 [2.16, 6.54]9.33 [8.42, 9.87]2.79 [1.54, 4.86]5.31 [4.69, 5.75]
Hypo treatment ( Π H )83748.40 (7.17)15.84 (4.89)7.53 (7.11)11.52 (2.10)
6.74 [3.55, 11.33]14.03 [11.80, 20.75]5.39 [2.66, 10.05]11.66 [9.82, 12.43]
Overall155,3407.00 (6.20)13.18 (4.26)4.36 (3.93)8.01 (2.94)
5.15 [2.71, 9.24]12.70 [9.87, 15.10]3.27 [1.70, 5.77]7.05 [5.75, 9.82]
PH = 60 min
Meals ( Π M )111,84712.16 (10.46)23.62 (4.20)6.99 (5.82)11.73 (1.20)
8.92 [4.98, 15.79]22.89 [20.89, 24.46]5.33 [2.92, 9.24]11.29 [10.76, 12.60]
Night ( Π N )20,8237.35 (6.33)12.65 (3.58)5.04 (3.56)7.10 (1.36)
5.52 [3.42, 9.04]12.60 [11.17, 13.81]4.04 [2.40, 6.74]7.14 [6.48, 7.67]
Hypo treatment ( Π H )621814.75 (11.19)26.73 (9.93)11.76 (10.03)15.87 (4.64)
11.70 [6.66, 19.95]25.76 [17.93, 33.63]8.79 [4.56, 16.33]14.84 [12.01, 19.65]
Overall138,88811.56 (10.16)21.00 (8.82)6.91 (5.94)11.57 (4.58)
8.34 [4.66, 14.92]20.04 [13.81, 24.46]5.17 [2.86, 9.05]10.86 [7.67, 12.98]
PH = 120 min
Meals ( Π M )90,30719.04 (15.74)33.75 (7.58)11.13 (9.08)18.56 (2.67)
14.30 [8.20, 24.39]31.51 [30.93, 36.49]8.57 [4.77, 14.67]17.71 [17.02, 19.02]
Night ( Π N )13,7959.90 (8.78)15.26 (5.67)6.65 (4.54)8.44 (2.12)
7.26 [4.79, 11.98]13.59 [11.92, 18.08]5.20 [3.42, 8.70]8.48 [7.29, 10.16]
Hypo treatment ( Π H )253625.96 (19.05)38.90 (19.18)17.53 (12.18)20.16 (9.07)
20.77 [12.62, 33.16]40.80 [18.61, 51.14]14.87 [8.38, 23.88]21.59 [9.67, 27.76]
Overall106,63818.02 (15.47)29.31 (15.76)10.70 (8.91)15.72 (7.55)
13.21 [7.46, 23.06]27.14 [17.28, 39.21]8.08 [4.51, 14.07]16.46 [8.92, 21.58]
PH = 180 min
Meals ( Π M )68,82524.03 (18.52)39.59 (9.67)14.40 (11.15)24.41 (4.40)
18.60 [11.20, 31.11]37.76 [33.31, 43.42]11.17 [6.48, 19.01]24.10 [22.65, 24.55]
Night ( Π N )680011.49 (10.59)16.14 (7.44)7.61 (5.16)9.10 (2.80)
8.30 [5.71, 13.40]13.66 [10.40, 19.19]5.88 [4.02, 9.72]8.74 [7.46, 10.62]
Hypo treatment ( Π H )66333.35 (25.15)42.76 (26.38)20.56 (15.94)25.95 (14.90)
25.14 [15.71, 40.97]29.77 [21.70, 66.61]16.13 [10.11, 25.79]21.81 [13.20, 33.91]
Overall76,28822.99 (18.40)32.83 (20.20)13.85 (11.00)19.82 (11.71)
17.46 [10.29, 29.79]29.77 [17.89, 39.22]10.60 [6.08, 18.24]18.07 [10.32, 24.55]
PH = 240 min
Meals ( Π M )47,76325.60 (19.12)36.80 (10.52)15.19 (10.76)23.54 (4.84)
20.18 [12.57, 32.58]36.84 [30.45, 41.36]12.18 [7.35, 19.99]23.21 [19.46, 26.55]
Night ( Π N )117611.79 (10.20)15.41 (7.35)7.94 (5.55)9.09 (3.60)
8.39 [6.26, 12.90]12.32 [11.41, 19.31]5.96 [4.46, 9.39]7.86 [6.84, 11.47]
Hypo treatment ( Π H )20346.01 (32.58)42.30 (40.44)26.50 (18.78)28.76 (24.81)
32.35 [21.02, 68.73]27.17 [15.67, 62.29]18.23 [11.87, 36.15]22.90 [11.61, 38.15]
Overall49,14225.36 (19.19)29.84 (22.94)15.06 (10.80)19.19 (14.37)
19.89 [12.28, 32.26]24.65 [13.00, 37.04]12.01 [7.21, 19.82]16.25 [8.29, 25.32]
Table 7. Prediction error of different literature methods with in silico studies. Acronyms: ANN (artificial neural network), NN-PLA (neural network plus linear prediction algorithm), LVX (latent variable-based model), PM (physiological model), CRNN (convolutional recurrent neural networks), DRNN (dilated recurrent neural networks), CHO (carbohydrates), R a (glucose rate of appearance from a meal). * data for the adult cohort.
Table 7. Prediction error of different literature methods with in silico studies. Acronyms: ANN (artificial neural network), NN-PLA (neural network plus linear prediction algorithm), LVX (latent variable-based model), PM (physiological model), CRNN (convolutional recurrent neural networks), DRNN (dilated recurrent neural networks), CHO (carbohydrates), R a (glucose rate of appearance from a meal). * data for the adult cohort.
StudyMethodInputsVirtual Cohort#DaysPH (min) RMSE last
(mg/dL)
Daskalaki et al. [24]ANNCGM and10 adults +8302.8 *
insulin infusion10 adolescents + 10 children454.0 *
Zecchin et al. [25]NN-LPACGM, CHO,20 subjects11309.4
predicted R a
Zhao et al. [26]LVXCGM, insulin10 adults7308.6
infusion, and CHO6014.0
Liu et al. [27]PM 10 adults143010.90
CGM, insulin6024.44
infusion, and CHO9033.50
12037.63
Li et al. [28]CRNNCGM, insulin10 adults360309.38
infusion, and CHO6018.87
Zhu et al. [29]DRNNCGM, insulin10 adults360307.8
infusion, CHO,
and sampling time
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Montaser, E.; Díez, J.-L.; Bondia, J. Glucose Prediction under Variable-Length Time-Stamped Daily Events: A Seasonal Stochastic Local Modeling Framework. Sensors 2021, 21, 3188. https://doi.org/10.3390/s21093188

AMA Style

Montaser E, Díez J-L, Bondia J. Glucose Prediction under Variable-Length Time-Stamped Daily Events: A Seasonal Stochastic Local Modeling Framework. Sensors. 2021; 21(9):3188. https://doi.org/10.3390/s21093188

Chicago/Turabian Style

Montaser, Eslam, José-Luis Díez, and Jorge Bondia. 2021. "Glucose Prediction under Variable-Length Time-Stamped Daily Events: A Seasonal Stochastic Local Modeling Framework" Sensors 21, no. 9: 3188. https://doi.org/10.3390/s21093188

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop