Next Article in Journal
Honey and Other Beekeeping Products Intake among the Romanian Population and Their Therapeutic Use
Next Article in Special Issue
Utility of Features in a Natural-Language-Processing-Based Clinical De-Identification Model Using Radiology Reports for Advanced NSCLC Patients
Previous Article in Journal
Design of the System for the Analysis of Disinfection in Automated Guided Vehicle Utilisation
Previous Article in Special Issue
Exploitation of Emerging Technologies and Advanced Networks for a Smart Healthcare System
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Multi-Agent Approach Used to Predict Long-Term Glucose Oscillation in Individuals with Type 1 Diabetes

by
João Paulo Aragão Pereira
1,*,
Anarosa Alves Franco Brandão
1,*,
Joyce da Silva Bevilacqua
2 and
Maria Lucia Cardillo Côrrea-Giannella
3
1
Computing Engineering Department, Escola Politécnica, Universidade de São Paulo, São Paulo 05508-010, Brazil
2
Applied Mathematics Department, Instituto de Matemática e Estatísitica, Universidade de São Paulo, São Paulo 05508-090, Brazil
3
Laboratory of Carbohydrates and Radioimmunoassays (LIM-18), Hospital das Clínicas (HCFMUSP), Faculdade de Medicina, Universidade de São Paulo, São Paulo 05403-900, Brazil
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2022, 12(19), 9641; https://doi.org/10.3390/app12199641
Submission received: 31 August 2022 / Revised: 18 September 2022 / Accepted: 21 September 2022 / Published: 26 September 2022
(This article belongs to the Special Issue Application of Data Analytics in Smart Healthcare)

Abstract

:

Featured Application

This work provides a support and decision system that can support endocrinologists in telemedicine, hospitals, insurance companies and analysis laboratories by being the basis for applications. In addition, it can support end users as a recommendation system and glucose oscillation prediction. Moreover, it can be embedded in insulin pumps (devices or software).

Abstract

The glucose–insulin regulatory system and its glucose oscillations is a recurring theme in the literature because of its impact on human lives, mostly the ones affected by diabetes mellitus. Several approaches have been proposed, from mathematical to data-based models, with the aim of modeling the glucose oscillation curve. Having such a curve, it is possible to predict when to inject insulin in type 1 diabetes (T1D) individuals. However, the literature presents prediction horizons of no longer than 6 h, which could be a problem considering their sleeping time. This work presents Tesseratus, a model that adopts a multi-agent approach used to combine machine learning and mathematical modeling to predict the glucose oscillation for up to 8 h. Tesseratus can support endocrinologists and provide personalized recommendations for T1D individuals to keep their glucose concentration in the ideal range. It brings pioneering results in an experiment with seven real T1D individuals. Using the Parkes error grid as an evaluation metric, it can be depicted that 93.7% of measurements fall in zones A and B during the night period with MAE 27.77 mg/dL. It is our claim that Tesseratus will be a reference for the classification of a glucose prediction model, supporting the mitigation of long-term complications in the T1D individuals.

1. Introduction

Diabetes mellitus is a syndrome characterized by hyperglycemia resulting from defects in insulin secretion, associated or not with resistance to the action of this hormone [1]. Diabetes mellitus affects people all around the world, and it is an important health challenge for the 21st century. Type 1 diabetes mellitus (T1D) is the type in which the pancreas produces little or no insulin [1], causing glucose concentration control problems. Such problems must be treated with insulin injection and frequently causes long-term complications. Currently, more than 1.1 million children and teenagers have T1D around the world [2].
There are several challenges faced by researchers and health professionals, mostly related to developing means to provide treatments that bring better results in terms of short-term glucose control and risks reduction in developing long-term complications. Efforts to address these challenges come from academia to the pharmaceutical industry. From the theoretical and technological point of view, several models were proposed to support the avoidance of hypoglycemic or hyperglycemic conditions in T1D individuals. Moreover, there are models that mimic the dynamic exchange of information between the components of the human glucose–insulin regulatory system (HGIRS) [3]. Nevertheless, to the best of our knowledge, they are still unable to predict the glucose oscillation curve for prediction horizons greater than six hours.
This paper presents Tesseratus, a hybrid model that adopts a multi-agent system (MAS) [4] approach to combine math and data-driven techniques to predict the glucose oscillation for up to eight hours for individuals with T1D. As the tesseract has four dimensions [5], Tesseratus has four main agents, namely (i) the Recommender; (ii) the Predictor; (iii) the Math and (iv) the ML agents. In addition, the model also has reactive agents to receive external data from the T1D individual and to monitor and control inputs and outputs along the system execution.
Tesseratus predicts the behavior of the glucose oscillation by taking into account basal and fast-acting insulin infusion; current glucose concentration; food (carbohydrate, protein and fat) and alcohol intake; and physical activity. Having such information, the model is able to present the predicted glucose curve for a prediction horizon (PH) for up to four hours during the day and up to eight hours during the night.
This paper is organized as follows: Section 2 presents a brief description of the human glucose–insulin regulatory system and its associated mathematical model. Section 3 presents some related work and Section 4 presents the Tesseratus model itself, its architecture and functioning. After, we present the experimental results in Section 5 and the associated discussion in Section 6. Finally, the paper is concluded in Section 7.

2. Human Glucose–Insulin Regulatory System

The human glucose–insulin regulatory system (HGIRS) is part of the human endocrine system [6] and comprises two main hormones, insulin and glucagon, produced and released, respectively, by β and α -cells of the pancreatic islets. These two hormones, which exert opposing effects, act in concert to maintain blood glucose (BG) in a narrow range. During the fasting state, glucagon stimulates hepatic glucose production (HGP) in order to prevent hypoglycemia, while insulin is secreted at levels sufficient to constrain HGP and to maintain BG concentration at approximately 90 mg/dL (basal secretion). After meals, the increase in BG concentration stimulates insulin secretion (meal-related secretion), suppressing HGP and stimulating glucose uptake by insulin-sensitive tissues such as muscle and adipose tissue, eventually restoring normoglycemia. In this research, due to modeling limitations, we do not consider other hormones such as cortisol and growth hormones, which exert direct and indirect effects on glucose metabolism.
Insulin secretion is complex and glucose is the most potent stimulant of insulin release. After eight to ten minutes of food ingestion, the insulin concentration increases, reaching a peak in 30 to 45 min, and then rapidly decreases to baseline values in 90 to 120 min [7]. Insulin is a physiological suppressor of glucagon release; thus, glucagon secretion is low in the postprandial period. On the other hand, glucagon is released during fasting, when BG is in the normal range and insulin concentration is low [7].
In the case of T1D, the autoimmune destruction of pancreatic β -cells prevents insulin secretion. Thus, T1D individuals depend on exogenous insulin administration to mimic the physiological secretion of this hormone, i.e., basal and meal bolus insulin. To maintain the BG concentration to as close as possible to the normal range, it is also necessary to measure BG and to count the amount of macronutrients (especially carbohydrates) before every meal to calculate the bolus insulin dose, which must match the total carbohydrate content of that meal and also correct occasional hyperglycemias.
Optimal glycemic control is crucial to avoid the complications associated with chronic hyperglycemia. However, the procedures described above are relatively complex and are influenced by numerous other factors, such as the type and intensity of physical activity, as well as stress, among others, which impair glycemic control, contributing to the occurrence of episodes of hyper and hypoglycemia. The literature presents several predictive models for glucose oscillation, such as [8,9,10,11], the last one having a night prediction of up to 6 h. However, we could not find any model that predicts glucose oscillation in a continuous and personalized way.
Quantitative methods used to model the metabolic physiology of T1D individuals are usually based on ordinary differential equations (ODE), and are also called compartment models [12]. We propose an extension to the model proposed by Kissler et al., 2014 [3] presented in Equations (1) and (2).
G ( t ) = G i n + f 1 ( I ( t τ 2 ) ) f 2 ( G ( t ) γ 1 + s . ( m m b ) . ( f 3 ( G ( t ) ) . f 4 ( I ( t ) )
I ( t ) = I i n + β f 5 ( G ( t τ 1 ) ) V M A X I ( t ) K M + I ( t )
In the glucose compartment G ( t ) , f 1 describes the hepatic glucose production (HGP); f 2 describes the central nervous system glucose utilization; f 3 describes the muscle/fat glucose utilization; f 4 describes the muscle/fat insulin uptake; and f 5 describes the pancreatic insulin production. The parameters semantics are given in Table 1.
Our extension considers the approach proposed by Schindelboeck et al., 2016 [13] for describing f 1 in compartment G ( t ) , in order to consider alcohol ingestion and replace γ proportionally by e G D R —the estimated glucose disposal rate—following the approach of Epstein et al., 2013 [14]. Nevertheless, we completely exchanged compartment I ( t ) by building piecewise polynomial equations from the pharmacokinetics data of four types of insulin. This mathematical modeling is the core of our Math agent and is described in the following.

2.1. A Mathematical Model for HGIRS

The glucose equation G ( t ) (glycemic value as a function of time) should be calculated and is directly related to the amount and type of macronutrients ingested, as well as the time ( Δ t e x –measured in minutes) and intensity ( V O 2 —maximum volume of oxygen consumed) of physical exercise [15,16] in accordance with [17].
G i n and I i n values refer to the rate of glucose intake and insulin infusion, respectively. G i n is measured in mg/dL.min, varying in the interval [ 0 , 1.08 ] . The insulin equation I ( t ) (insulin concentration value as a function of time) and the value of I 0 (insulin concentration at t ( 0 ) ) come from the pharmacokinetics equations of each type of insulin (Section 2.1.2) selected by each individual.
Thus, having these two equations modeled, we fed our Math agent with them in order to start the labeling of our dataset, as well as to support the continuous learning in Tesseratus.

2.1.1. The Glucose Compartment Equation

The description of how the glucose compartment is modeled by using a similar approach of Equation (1), extending f 1 and reusing f 2 , f 3 and f 4 . In addition, we rename the physical exercise contribution to the model ( f e x = [ 1 + s ( Δ t e x Δ t e x ¯ ) ] ). Therefore, it is represented by
G ( t ) = ( G i n + f 1 ( I ( t τ 1 ) ) ) glucose production f 2 ( G ( t ) ) + γ f e x . ( f 3 ( G ( t ) ) . f 4 ( I ( t ) ) glucose consumption
Our extension in f 1 considers the fact that there are two sources of glucose production: the hepatic glucose production (HGP) [3] and the glucose yielded from the metabolism of ingested macronutrients. In this case, glucagon exerts control over the liver and causes it to dispense glucose, with a slight delay (given by τ 1 ) of between 15 and 20 min [18]. In order to allow for personalization, we defined f 1 considering or not considering alcohol ingestion, following the understanding of Schinfelboeck et al., 2016 [13]. Both Equations (4) and (5) use the reference values proposed by [19,20,21]. Then, H G P m a x is 180 mg/min, α is 0.29 L/mU, V p l a is 3 L and C 5 is 26 μ U/L. Here, H G P m a x stands for hepatic glucose production, α for hepatic sensitivity to changes in insulin, V p l a for the volume of plasma in the body, C 5 for the insulin concentration at which the liver is most efficient and A g ( t ) for alcohol ingestion.
f 1 ( I ( t τ 1 ) ) = H G P m a x . ( 1 A g ( t ) ) ( 1 + exp ( α ( I ( t ) V p l a ) C 5 ) )
or
f 1 ( I ( t τ 1 ) ) = H G P m a x ( 1 + exp ( α ( I ( t ) V p l a ) C 5 ) )

2.1.2. The Exogenous Insulin Equation

Our approach adopted the pharmacokinetics data of four types of insulin (glargine [22], degludec [23], lispro [24] and aspart [25]) to support this modeling based on the approximation of polynomial functions. Since industry information is not enough for producing a viable approximation, we combined them with information from a dataset of seven real Brazilian volunteers that use such insulins to derive the polinomyal functions related to each of them. The dataset is described in Section 5.
For instance, for glargine, an insulin of slow action, we obtained values from [26,27,28,29,30], as well as the FDA report [22] and the industry representative information [31]. On the other hand, for lispro, an insulin of fast action, we obtained values from [32,33,34]. The insulin lispro report produced by FDA [35] was used to confirm the time-of-action and pharmacokinetic information. Having such values, we were able to build a polynomial function p ( t ) that provides an approximation for the exogenous insulin compartment. Each point of p ( t ) represents the concentration of insulin prescribed at a given time (t), considering the parameters of the T1D individual.
Figure 1 presents an example of a polynomial curve p ( t ) for glargine to cover a 24 h period of time. It can be observed that p ( t ) is a piecewise combination of polynomials of degrees four, two and three, as described in Equation (6).
p ( t ) = 0.0259 t 4 + 0.4255 t 3 2.5787 t 2 + 7.213 t + 9.5966 , 0 t 6 0.105 t 2 2 t + 26.655 , 6 < t 8 0.0996 t 4 + 3.8587 t 3 57.701 t 2 + 379.78 t 910.29 , 8 < t 12 0.0808 t 3 + 3.5536 t 2 52.254 t + 269.54 , 12 < t 16 0.011 t 3 + 0.6492 t 2 13.24 t + 102.98 , 16 < t 24
Figure 2 presents an example of a polynomial curve p ( t ) for lispro that covers a period of time of 300 min. It can be observed that p ( t ) is a piecewise combination of polynomials of degrees three and two, as described in Equation (7).
p ( t ) = 0.0015 t 3 + 0.0752 t 2 + 0.0473 t + 0.082 , 0 t 35 0.0022 t 2 + 0.2445 t + 23.638 , 35 < t 45 0.0097 t 2 + 0.9403 t + 7.5778 , 45 < t 60 0.00002 t 3 0.0059 t 2 + 0.3791 t + 23.134 , 60 < t 120 0.0004 t 2 0.2612 t + 42.8774 , 120 < t 220 0.000006 t 2 0.0822 t + 22.163 , 220 < t 300

3. Related Work

This section presents some models that provide hybrid solutions for the predictive modeling of glucose oscillation for T1D. Hybrid solutions usually combine mathematical modeling with data-driven techniques. In a literature search, Refs. [8,9,10,36] presented hybrid predictive models with PHs from 90 to 120 min. Nevertheless, for [16,37,38,39,40,41,42,43,44,45,46], the prediction horizon (PH) varies from 30 to 60 min.
In fact, Refs. [37,41,42] adopt neural network approaches that yield a PH of 60 min when dealing with nine, six and ten real patients, respectively; Ref. [38] adopts a combination of a compartment model and self-organizing map with twelve real patients, achieving a PH of 60 min; Refs. [39,40] adopt a support vector machine approach tested with six and five real patients, respectively, both achieving a PH of 60 min. Moreover, Refs. [43,44,45,46] achieved a PH of 30 min by adopting Bayesian inference, fuzzy logic, neural networks and a Kalman filter, respectively.
For long-term PH, we can state that Georga and colleagues et al., 2013 [8] adopted a multivariate regression approach to derive a predictive model for subcutaneous glucose concentration prediction in T1D individuals. The method was evaluated with a dataset composed of twenty-seven real T1D individuals and presented average prediction mean square errors of 5.21 mg/dL for 15 min, 6.03 mg/dL for 30 min, 7.14 mg/dL for 60 min and 7.62 mg/dL for 120 min PHs. Liu and colleagues et al., 2019 [9] presented a glucose forecasting algorithm suited for long-term PHs. The algorithm is based on compartmental models for the HGIRS. It was evaluated with clinical data of ten real T1D individuals. For a 120 min PH, there was an improvement of 18.8% in the prediction accuracy measured with the root mean square error (RMSE), 17.9% in the A-region of error grid analysis (EGA) and 80.9% in the hypoglycaemia prediction calculated by the Matthews correlation coefficient. Cescon, Johansson and Renard et al., 2015 [10] presented a subspace-based linear multi-step predictor as a predictive model for short-term glucose oscillation. The model was evaluated with seven real T1D individuals and obtained a prediction error standard deviation of 58.06 mg/dL at 120 min. Contreras and colleagues et al., 2018 [36] combined physiological models for HGIRS with grammatical evolution as a search-based technique to design a predictive model for short-term glucose oscillation. Considering the CEG, they achieved more than 96% of results falling inside regions A and B for 90 min.
Since there are T1D individuals that feed at intervals greater than two hours, their results are not helpful for them. The proposal of the Tesseratus model is to extract the best features of each approach (physiology, data and multi-agent) in order to reach a longer PH at personalized intervals of four hours in the full daytime period and eight hours in the night period, keeping the MAE below 28 mg/dL in both periods and for all PHs. A discussion of the results is in Section 5.

4. Tesseratus Model

Tesseratus adopts a multi-agent approach to define a hybrid model to predict the glucose oscillation for up to four hours during daytime and for up to eight hours at the night period. It is a hybrid model because agents are defined using both compartment models (described in Section 2.1) and data-driven techniques, such as machine learning (ML). Tesseratus has two types of agents: reactive agents and intelligent agents. Nevertheless, we decomposed the problem in such a way that each agent is responsible for a portion of the phenomenon [47], which means that there are several agents of each type. The reactive agents are responsible for collecting data and feeding intelligent agents with the collected data or for monitoring data, error and ODE parameters. Intelligent agents are responsible for using data to predict the glucose oscillation. The intelligent agents are: the Recommender agent, the Predictor agent, the ML agent and the Math agent.
The Recommender agent has a knowledge base composed of labeled glucose oscillation prediction curves (within the range or out of range—following a semaphore metaphor) and is responsible for finding and labeling suitable curves for received data and delivering them to the user. The Predictor agent has a knowledge base of labeled predicted values and actions and is responsible for asking the Math and ML agents for information to populate its knowledge base and for providing glucose oscillation prediction curves to the Recommender agent. The Math agent has the math modeling presented in Section 2.1 as the core for the generation of glucose oscillation prediction curves, and the ML agent learns the glucose oscillation prediction curves from the combination of received data provided by reactive agents and by the Math agent. Communication is bidirectional between intelligent agents. The Predictor agent communicates with all intelligent agents, and the ML agent communicates with the Predictor and Math agents. Reactive agents only send messages to intelligent agents. Having received these messages, intelligent agents act accordingly to recommend a glucose oscillation prediction curve or to adapt the recommendation given the monitored context (prediction error above a threshold, the need for updating ODE parameters or non-conformance of collected data as expected).
Tesseratus innovates in the problem solution by adopting a learning policy that considers both information from the individuals collected data and from the mathematical modeling. Therefore, at the very beginning, we defined a set-up step for knowledge acquisition and data labeling. In this step, the Math agent generates glucose values and associated labeling, providing information to accelerate the learning using the generated glucose values and associate labeling, and the ML agent reuses knowledge from the Math agent. All intelligent agents knowledge bases are built in a continuous reinforcement learning cycle that begins with the Math agent knowledge combined with a reward policy based on the semaphore metaphor. Data are labeled green, yellow or red depending on the glucose concentration and the absolute error, both within pre-established thresholds. The reader may observe in Table 2 that there are two rewards labeled as green and two other rewards labeled as red because excellent and normal glucose levels associated with an absolute error smaller than 30 mg/dL are labeled as green, depending on the PH; and hyperglycemia and hypoglycemia levels are labeled as red, as well as an absolute error bigger than 30 mg/dL. For the red label, the reward should be considered if at least one of the situations occur. An acceptable glucose concentration is labeled as yellow. By absolute error, we mean the error between the measured and predicted glucose values.
The architecture of Tesseratus is presented in Figure 3, where numbers are adopted to support its explanation flow.
  • Reactive agents collect data from continuous glucose monitors (CGM), voice or manually, and send them to the Recommender agent;
  • The Recommender agent receives data, associates them with their time frame, creating a tuple < d a t a , t i m e > , and checks its knowledge base (KB) if there are actions to be taken related to them;
  • If yes, the predicted oscillation curve is labeled in the ideal range (80–120 mg/dL during fasting, and up to 160 mg/dL in postprandial periods), stored in the KB as < t i m e , l a b e l , c u r v e > , and sends it to the user;
  • If not, the Recommender agent requests information about prediction curves to the Predictor agent;
  • The Predictor agent checks its KB to see if there is a suitable prediction curve. If not, it propagates the request to the ML and Math agents;
  • The ML agent and Math agent, at a given time frame, store the prediction values in their KB and return the value linked with the prediction calculation to the Predictor agent;
  • The Predictor agent analyzes the value received and, if it is a value that is in the ideal range, sends a return message to the Recommender agent; otherwise, it requests more options for the ML and Math agents. At this point, the Predictor agent stores the input and output in its KB with a specific timestamp;
  • The Recommender agent could send recommendations to the environment from its base of action, or simply send the predicted oscillation curve with an ideal glucose label achieved;
  • The best glucose value is sent to the environment, as well as hypothetical complementary recommendations;
  • The actions and knowledge at that specific time frame are stored in the Recommender agent’s KB.

4.1. Tesseratus Implementation

All agents were implemented in a serverless architecture based on microservices [48]. The multi-agent system (MAS) follows an event-based approach and runs on a public cloud platform [49]. The KB of each intelligent agent uses a non-relational, non-server management key-value database, with flexibility for unstructured data, and also for being horizontally scalable.
A Smart Python Agent Development Environment (SPADE) [50] was used as the multiagent platform. Communication among agents is based on instant messaging, an interesting feature that allows for presence notification, enabling the system to know the current state of the agents in real-time. SPADE agents are based on behaviors, and were extended to create the hybrid agents with a Belief–Desire–Intention (BDI) [51] layer.

4.2. Tesseratus Set Up

In order to prepare the model to be used, there is a setting-up step for knowledge acquisition. In this step, intelligent agents use data provided by the T1D individual during a week to create their associated KB. As aforementioned, the Math agent accelerates the ML agent learning by providing information regarding glucose prediction values based on the HGIRS mathematical modeling presented in Section 2.1. In addition, the Math also uses the pre-defined semaphore to label generated values as green, yellow and red. Nevertheless, ML agent uses the labeled data to learn in a supervised learning process [4]. This step adopts an approach similar to active learning. Figure 4 depicts this learning flow, which is described next.
  • Reactive agents collect environmental information via sensors (every 5 min from GCM), by voice or manually;
  • The Recommender agent receives data and asks the Predictor agent to calculate and generate the glucose curve;
  • The Predictor agent asks the ML agent to create a timestamp and generate the glucose curve;
  • The ML agent asks the Math agent to label the generated value based on the predefined semaphore;
  • The Math agent forwards the labeling payload to the ML agent;
  • The ML agent sends to the Predictor agent the timestamp, glucose curve, predictions and label based on the data received;
  • The Predictor agent receives the message and forwards it to the Recommender agent;
  • The Predictor agent receives the new information and classifies it in each KB according to the received label (green, yellow and red).

4.3. Tesseratus Functioning

After the set up, Tesseratus starts its functioning in a continuous learning cycle based on reinforcement learning, with receipt of new data provided by the reactive agents in order to carry out the validation of values.
The Math and ML agents generate knowledge for the Recommender and Predictor agents. In addition, they also take advantage of information provided by the other reactive agents in order to update and/or correct the values of the parameters used in the ODE, which are the core of the Math agent. Moreover, we consider the time series associated with the green labeled data to adopt the sliding window approach [52] and achieve different PHs, from 15 min to 8 h. For instance, since the glucose concentration dataset is measured every five minutes, the ML agent used the last two hours of historical data on carbohydrates and five hours on bolus insulin to predict it (see green and black dashed left-right arrows of Figure 5). These time slots were chosen based on the duration of carbohydrate metabolism and the average time of fast-acting insulin action in the human body, respectively. In Figure 5, insulin values (in mU/mL) of the five-hour sliding window are represented by the black dashed left-right arrow, whereas carbohydrate values (in grams) of the two-hour sliding window are represented by the green dashed left-right arrow. They were used to predict the oscillation glucose for up to eight hours (blue dashed right arrow).

5. Results

Tesseratus was implemented as a Python [53] prototype (version 3.8). Its setup was conducted considering data collected from seven T1D Brazilian volunteers during a week. The volunteers profiles are described in Table 3, where their ID, sex, age, abdominal circumference (AC) and body mass (BM) are given. In addition, Table 4 presents the time of data collection, the origin of glucose values and the type of insulin, with a concentration of 100 units per mL (100 U/mL). Other data collected from the T1D individuals were the HbA1c (hemoglobin A1c) value and whether they were hypertensive (1) or not (0) in order to calculate the eGDR (mg/(kg min)) of each individual (Table 5). The ID is only used to identify the individual.
An example of how it is possible to analyze the behavior of each individual is represented in Figure 6 for volunteer R-BRA07. Her profile is characterized in Table 3, Table 4 and Table 5: R-BRA07 is non-hypertensive, and her hemoglobin A1c is 7.5%, yielding an eGDR of 9.34 (mg/kg min). The glucose rate of ascent and descent was collected every 30 min, between midnight and 8 am, during 14 days. These data were compared with the Tesseratus prediction ones and further plotted in a Parkes error grid [54] (Section 5.1). It is possible to notice that there is a tendency for the glucose concentration to fall in the early hours of the morning, but, for example, there is a rise every day from five in the morning. The glucose oscillation is quite peculiar and can be affected by the dawn phenomenon, which is characterized by hyperglycemia during early morning [55]. Another factor that influences the continuity of the glucose concentration increase is having breakfast almost every day at six o’clock with a carbohydrate intake.

5.1. Testing and Validation

Through the natural competition established between the Math and ML agents, with their respective strategies, it was possible to establish the best result between them and practice a continuous flow of active reinforcement learning using historical data from seven volunteers for up to 21 days. The best result is always closer to the ideal glucose range: 80–120 mg/dL in fasting and up to 160 mg/dL in the postprandial period.
Daytime and night-time windows were personalized for each individual (Table 6), with the addition of information related to their usual sleeping hours (night-time) and active hours (daytime). Such personalization is needed to decide whether Tesseratus must be fed by a new external stimulus. In addition, our prediction horizon for the night-time is eight hours at most, and individuals with night-time windows greater than that must have their prediction horizon updated.
We used the Parkes error grid (PEG) [56] to evaluate errors in the measurement of predicted glucose oscillation provided by Tesseratus. PEG was adopted because it is compliant with ISO15197 [57] and separates T1D individuals from individuals with type 2 DM. Moreover, PEG had its technical issues revised by Pfutzner et al., 2013 [54], who established exact borders for the performance zones for glucose measurements and supported the accuracy definition for glucose monitors. The zones are categorized as A, B, C, D and E. The associate meaning for a measurement of being in a zone is: zone A—clinically accurate measurements, no effect on clinical action; zone B—altered clinical action, little or no effect on clinical outcome; zone C—altered clinical action, likely to affect clinical outcome; zone D—altered clinical action, could have significant clinical risk; zone E—altered clinical action, could have dangerous consequences.
PEG was used considering the predicted F measured values, and the success metric was simple: the more prediction points that fall within zones A and B, the better the model. Table 7 details the PEG for the daytime window considering each prediction horizon (PH) (from 15 min to 4 h). It can be depicted that 95.1% of measurements, on average, fall in zones A and B. The same result is presented in Figure 7, showing a total of 3804 predictions. Zones A and B are the closest ones to the diagonal line of the plot.
For the night-time window, Table 8 details the PEG of each PH (from 15 min to 8 h). It can be depicted that 93.7% of measurements, on average, fall in zones A and B. The same result is presented in Figure 8, showing a total of 1400 predictions. It is important to observe that, for a PH of 480 min (eight hours), the Tesseratus model presented a PEG of 95% falling between zones A and B.
Among other well-known error evaluation metrics, such as mean absolute percentage error (MAPE), mean absolute error (MAE) and root mean square error (RMSE), we considered MAE and MAPE the most relevant to evaluate the success of our model, because T1D individuals need predictions as close to real measurements as possible. Thus, the lower the MAE and MAPE values, the better the model is in relation to the prediction.
In fact, such metrics are calculated considering absolute values for the difference (measured value minus predicted glucose concentration). Therefore, we evaluate MAE and MAPE considering such errors for all PHs, and organized them for daytime and nightt-ime in Table 9 and Table 10, respectively. It is important to note that the daytime window runs from 15 to 240 min and night-time window from 15 to 480 min.

6. Discussion

Both results linked to PEG analysis and MAE are pioneers, due to the long-term prediction horizons, e.g, seven or eight hours for night-time. To the best of our knowledge, there is no literature presenting these prediction horizons. However, we compared Tesseratus with other models that address a shorter PH. In fact, whenever we consider PEG, we can cite [37,58] for a PH of one hour. On one hand, the study by Munoz-Organero [37] considered nine real individuals and obtained a PEG of 87.22% falling in zones A+B, while the study by Foss-Freitas et al. [58] considered 21 real individuals and obtained a Clarke error grid (CEG) of 94% falling in zones A and B. It is worth noting that both PEG and CEG are comparable error grids [59]. Tesseratus outperformed both for the same PH, achieving a PEG of 97.9% falling in zones A and B for daytime, and 98.9% at night-time.
Whenever we consider MAE as the error, we can cite [60], who obtained an MAE equal to 51.3 mg/dL for a PH of 60 min, whereas Tesseratus reached 26.41 mg/dL, both at daytime. It is worth noting that the smaller the MAE, the better the values. Finally, if the considered error is MAPE, Foss-Freitas et al., 2019 [58] presented interesting results for a PH ranging from 30 to 360 min. A comparison with Tesseratus is presented in Table 11 considering night-time PH. Observe that Tesseratus outperforms them for a PH of 120, 180 and 360 min, the last one being the highest PH that they achieve. Nevertheless, they outperform Tesseratus for short PHs such as 30 and 60 min. We advocate that this is not an issue, since the need for long-term prediction is paramount for night-time.
In addition to the results achieved, it is worth mentioning the main contributions of the Tesseratus model in a summarized way: (1) a combination of different techniques in the same model working in an orchestrated way, from mathematics to ML (supervised and reinforcement learning), represented by agents; (2) continuous learning for applicability in real individuals with T1D; (3) delegating the task of a continuous self-adjustment process about prediction errors to the agents; (4) Tesseratus works independently of sex and age; (5) it was tested with real individuals; (6) applicability in technology-based healthcare; (7) prediction of glucose oscillation of up to eight hours, depending on the individual’s lifestyle, with an acceptable absolute error; (8) support for personalized recommendations on macronutrients, insulin and physical exercise, based on ML models, and not just fixed rules.
All of the aforementioned contributions indicate the feasibility of Tesseratus to be embedded as the underlying model to: an open source artificial pancreas system [61]; a commercial artificial pancreas (closed-loop) [62]; insulin pumps [63,64]; and a recommendation system, to cite a few. It is our claim that it must facilitate the daily life of T1D individuals, automating most of the individual T1D’s 180 extra daily health-related decisions [65].

7. Conclusions

The paper presented Tesseratus, a hybrid model that adopts a multi-agent approach to address the problem of predicting glucose concentration for T1D individuals. Tesseratus has reactive and intelligent agents, where the reactive agents act as sensors and monitors, and intelligent agents act as an oracle or as an apprentice. The oracle knowledge is provided by a mathematical model for the HGIRS and it transfers knowledge to the apprentice, which also learn from data provided by sensors and monitors. Tesseratus uses a dual continuous learning model that can mitigate errors between the predicted and continuously measured values, in addition to the ODE’s own input parameters. The combination of techniques is advantageous, as it consists of models with complementary functions, resulting in a cohesive, well-adjusted model capable of generalization.
Tesseratus was validated with seven real T1D Brazilian individuals that provided their data collected for up to 21 days: the seven initial days were used to personalize the model and the following days were used to validate the model capacity of predicting glucose oscillation for a PH that ranges from 15 min to 4 h during daytime and from 15 min to 8 h at night-time. As the evaluation of the MAE indicates, Tesseratus is able to predict glucose oscillation with an accuracy equal to or less than 30 mg/dL (1.7 mmol/L). As future work, it is our intention to continuously improve the performance of the Tesseratus while reducing the error of the predicted value by removing some specific restrictions found in the literature: (a) constant values of parameters from mathematical models for prediction calculations; (b) agent’s support for continuous learning and ODE parameter values correction; (c) barriers to combining different prediction models, using active learning, reusing, combining and adapting knowledge from different agents [66].
Some limitations need to be addressed in future work, such as: (1) it does not support pregnant women and type 2 individuals with diabetes mellitus; (2) for now, it only supports four types of insulin analogues: aspart, lispro, glargine and degludec; (3) the dataset is still small, performed with historical data for only seven real individuals; (4) few insulin sensors or pumps were tested during the research, according to Table 4; (5) it is necessary to test with new variables: stress, hormonal effects, blood oxygen and heart rate; (6) it is necessary to analyze blood glucose and insulin concentration associated with comorbidities.

Author Contributions

Conceptualization, J.P.A.P., A.A.F.B., J.d.S.B. and M.L.C.C.-G.; methodology, J.P.A.P. and A.A.F.B.; software, J.P.A.P.; validation, J.P.A.P., A.A.F.B. and J.d.S.B.; formal analysis, J.P.A.P. and J.d.S.B.; investigation, J.P.A.P.; resources, J.P.A.P. and A.A.F.B.; data curation, J.P.A.P.; writing—original draft preparation, J.P.A.P.; writing—review and editing, J.P.A.P., A.A.F.B., J.d.S.B. and M.L.C.C.-G.; visualization, J.P.A.P.; supervision, A.A.F.B.; project administration, J.P.A.P. and A.A.F.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

The study was conducted in accordance with the Declaration of Helsinki, and approved by the Ethics Committee of the University Hospital of São Paulo (HU-USP) (protocol code 1819188—approved on 24 September 2021), for studies involving humans.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study (Free and Informed Consent Term).

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ACAbdominal Circumference
APArtificial Pancreas
BGBlood Glucose
BMBody Mass
CGMContinuous Glucose Monitoring
CNSCentral Nervous System
DMDiabetes Mellitus
EGAError Grid Analysis
eGDRestimated Glucose Disposal Rate
HBA1CGlycated Hemoglobin
HGIRSHuman Glucose–Insulin Regulatory System
HGPHepatic Glucose Production
IDFInternational Diabetes Federation
IT1DIndividuals with T1D
MAEMean Absolute Error
MASMulti-Agent System
MLMachine Learning
ODEOrdinary Differential Equations
PEGParkes Error Grid
RMSERoot Mean Square Error
PHPrediction Horizon
SBDBrazilian Society of Diabetes
T1DType 1 Diabetes Mellitus
TEXTime of Exercise
VO2Volume of Oxygen

References

  1. SBD. Diretrizes da Sociedade Brasileira de Diabetes—Guidelines of the Brazilian Society of Diabetes. 2022. Available online: https://diretriz.diabetes.org.br (accessed on 10 January 2022).
  2. Sun, H.; Saeedi, P.; Karuranga, S.; Pinkepank, M.; Ogurtsova, K.; Duncan, B.B.; Stein, C.; Basit, A.; Chan, J.C.N.; Magliano, D.J.; et al. IDF Diabetes Atlas: Global, regional and country-level diabetes prevalence estimates for 2021 and projections for 2045. Diabetes Res. Clin. Pract. 2022, 183, 109119. [Google Scholar] [CrossRef]
  3. Kissler, S.; Cichowitz, C.; Sankaranarayanan, S.; Bortz, D. Determination of personalized diabetes treatment plans using a two-delay model. J. Theor. Biol. 2014, 359, 101–111. [Google Scholar] [CrossRef]
  4. Russell, S.J.; Norvig, P. Artificial Intelligence: A Modern Approach, 3rd ed.; Pearson Education: Upper Saddle River, NJ, USA, 2016. [Google Scholar]
  5. Ramírez, A.; Pérez-Aguila, R. A Method for Obtaining the Tesseract by Unraveling the 4D Hypercube. In Proceedings of the 10th International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision’2002, WSCG 2002, Plzen-Bory, Czech Republic, 4–8 February 2002; pp. 1–8. Available online: http://wscg.zcu.cz/wscg2002/Papers_2002/E37.pdf (accessed on 6 July 2022).
  6. Shlomo, M.; Auchus, R.; Goldfine, A.; Koenig, R.; Rosen, C. Williams Textbook of Endocrinology, 14th ed.; Elsevier: Amsterdam, The Netherlands, 2019. [Google Scholar]
  7. Gardner, D.; Shoback, D. Greenspanś Basic & Clinical Endocrinology, 10th ed.; Mc Graw Hill: New York, NY, USA, 2018. [Google Scholar]
  8. Georga, E.I.; Protopappas, V.C.; Ardigò, D.; Marina, M.; Zavaroni, I.; Polyzos, D.; Fotiadis, D.I. Multivariate prediction of subcutaneous glucose concentration in type 1 diabetes patients based on support vector regression. IEEE J. Biomed. Health Inform. 2013, 17, 71–81. [Google Scholar] [CrossRef]
  9. 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]
  10. Cescon, M.; Johansson, R.; Renard, E. Subspace-based linear multi-step predictors in type 1 diabetes mellitus. Biomed. Signal Process. Control 2015, 22, 99–110. [Google Scholar] [CrossRef]
  11. Vu, L.; Kefayati, S.; Idé, T.; Pavuluri, V.; Jackson, G.; Latts, L.; Zhong, Y.; Agrawal, P.; Chang, Y. Predicting Nocturnal Hypoglycemia from Continuous Glucose Monitoring Data with Extended Prediction Horizon. AMIA Annu. Symp. Proc. 2020, 2020, 874–882. [Google Scholar]
  12. Smith, H. An Introduction to Delay Differential Equations with Applications to the Life Sciences, 1st ed.; Texts in Applied Mathematics 57; Springer: New York, NY, USA, 2011. [Google Scholar]
  13. Schindelboeck, D.; Praus, F.; Gall, W. A Diabetes Self-Management Prototype in an AAL-Environment to Detect Remarkable Health States. Stud. Health Technol. Informat. 2016, 223, 273–280. [Google Scholar]
  14. Epstein, E.J.; Osman, J.L.; Cohen, H.W.; Rajpathak, S.N.; Lewis, O.; Crandall, J.P. Use of the Estimated Glucose Disposal Rate as a Measure of Insulin Resistance in an Urban Multiethnic Population With Type 1 Diabetes. Diabetes Care 2013, 36, 2280–2285. [Google Scholar] [CrossRef]
  15. Nelson, R.K.; Horowitz, J.F.; Holleman, R.G.; Swartz, A.M.; Strath, S.J.; Kriska, A.M.; Richardson, C.R. Daily physical activity predicts degree of insulin resistance: A cross-sectional observational study using the 2003–2004 National Health and Nutrition Examination Survey. Int. J. Behav. Nutr. Phys. Act. 2013, 10, 10. [Google Scholar] [CrossRef]
  16. Liu, C.; Vehi, J.; Oliver, N.; Georgiou, P.; Herrero, P. Enhancing blood glucose prediction with meal absorption and physical exercise information. arXiv 2018, arXiv:1901.07467. [Google Scholar]
  17. SBD-EXERCISE. 2022. Available online: https://diabetes.org.br/atividade-fisica/ (accessed on 16 May 2022).
  18. Bratusch-Marrain, P.; Komjati, M.; Waldhäusl, W. Efficacy of pulsatile versus continuous insulin administration on hepatic glucose production and glucose utilization in type I diabetic humans. Diabetes 1986, 35, 922–926. [Google Scholar] [CrossRef] [PubMed]
  19. Li, J.; Kuang, Y.; Mason, C. Modeling the glucose–insulin regulatory system and ultradian insulin secretory oscillations with two explicit time delays. J. Theor. Biol. 2006, 242, 722–735. [Google Scholar] [CrossRef] [PubMed]
  20. Sturis, J.; Polonsky, K.; Mosekilde, E.; Cauter, E. Computer model for mechanisms underlying ultradian oscillations of insulin and glucose. Am. J. Physiol. 1991, 260, E801–E809. [Google Scholar] [CrossRef] [PubMed]
  21. Tolić, I.M.; Mosekilde, E.; Sturis, J. Modeling the insulin–glucose feedback system: The significance of pulsatile insulin secretion. J. Theor. Biol. 2000, 207, 361–375. [Google Scholar] [CrossRef]
  22. FDA-Glargine. 2022. Available online: https://www.accessdata.fda.gov/drugsatfda_docs/label/2007/021081s024lbl.pdf (accessed on 10 September 2021).
  23. FDA-Degludec. 2022. Available online: https://www.accessdata.fda.gov/drugsatfda_docs/label/2015/203314lbl.pdf (accessed on 10 September 2021).
  24. FDA-Lispro. 2022. Available online: https://www.accessdata.fda.gov/drugsatfda_docs/label/2003/20563scm044_humalog_lbl.pdf (accessed on 10 September 2021).
  25. FDA-Aspart. 2022. Available online: https://www.accessdata.fda.gov/drugsatfda_docs/label/2012/020986s057lbl.pdf (accessed on 10 September 2021).
  26. Owens, D.R.; Bailey, T.S.; Fanelli, C.; Yale, J.F.; Bolli, G. Clinical relevance of pharmacokinetic and pharmacodynamic profiles of insulin degludec (100, 200 U/mL) and insulin glargine (100, 300 U/mL)—A review of evidence and clinical interpretation. Diabetes Metab. 2019, 45, 330–340. [Google Scholar] [CrossRef]
  27. Porcellati, F.; Rossetti, P.; Ricci, N.B.; Pampanelli, S.; Torlone, E.; Campos, S.H.; Andreoli, A.M.; Bolli, G.B.; Fanelli, C.G. Pharmacokinetics and pharmacodynamics of the long-acting insulin analog glargine after 1 week of use compared with its first administration in subjects with type 1 diabetes. Diabetes Care 2007, 30, 1261–1263. [Google Scholar] [CrossRef]
  28. Abe, S.; Inoue, G.; Yamada, S.; Irie, J.; Nojima, H.; Tsuyusaki, K.; Usui, K.; Atsuda, K.; Yamanouchi, T. Two-way crossover comparison of insulin glargine and insulin detemir in basal-bolus therapy using continuous glucose monitoring. Diabetes Metab. Syndr. Obesity Targets Ther. 2011, 4, 283. [Google Scholar]
  29. Barnett, A.H. Insulin glargine in the treatment of type 1 and type 2 diabetes. Vasc. Health Risk Manag. 2006, 2, 59. [Google Scholar] [CrossRef]
  30. Linnebjerg, H.; Lam, E.C.Q.; Seger, M.E.; Coutant, D.; Chua, L.; Chong, C.L.; Ferreira, M.M.; Soon, D.; Zhang, X. Comparison of the pharmacokinetics and pharmacodynamics of LY2963016 insulin glargine and EU-and US-approved versions of Lantus insulin glargine in healthy subjects: Three randomized euglycemic clamp studies. Diabetes Care 2015, 38, 2226–2233. [Google Scholar] [CrossRef]
  31. SANOFI-Lantus. 2020. Available online: http://products.sanofi.ca/en/lantus.pdf (accessed on 12 December 2020).
  32. Slattery, D.; Amiel, S.; Choudhary, P. Optimal prandial timing of bolus insulin in diabetes management: A review. Diabetic Med. 2018, 35, 306–316. [Google Scholar] [CrossRef]
  33. Plank, J.; Wutte, A.; Brunner, G.; Siebenhofer, A.; Semlitsch, B.; Sommer, R.; Hirschberger, S.; Pieber, T.R. A direct comparison of insulin aspart and insulin lispro in patients with type 1 diabetes. Diabetes Care 2002, 25, 2053–2057. [Google Scholar] [CrossRef] [PubMed]
  34. de la Peña, A.; Seger, M.; Soon, D.; Scott, A.J.; Reddy, S.R.; Dobbins, M.A.; Brown-Augsburger, P.; Linnebjerg, H. Bioequivalence and comparative pharmacodynamics of insulin lispro 200 U/mL relative to insulin lispro (Humalog®) 100 U/mL. Clin. Pharmacol. Drug Dev. 2016, 5, 69–75. [Google Scholar] [CrossRef]
  35. FDA-Lispro(a). 2022. Available online: https://www.accessdata.fda.gov/drugsatfda_docs/label/2007/020563s082lbl.pdf (accessed on 17 January 2022).
  36. Contreras, I.; Bertachi, A.; Biagi, L.; Vehí, J.; Oviedo, S. Using Grammatical Evolution to Generate Short-term Blood Glucose Prediction Models. In Proceedings of the KHD@ IJCAI, Stockholm, Schweden, 13 July 2018; pp. 91–96. Available online: http://ceur-ws.org/Vol-2148/paper15.pdf (accessed on 1 November 2019).
  37. Munoz-Organero, M. Deep Physiological Model for Blood Glucose Prediction in T1DM Patients. Sensors 2020, 20, 3896. [Google Scholar] [CrossRef] [PubMed]
  38. Zarkogianni, K.; Litsa, E.; Vazeou, A.; Nikita, K.S. Personalized glucose-insulin metabolism model based on self-organizing maps for patients with Type 1 Diabetes Mellitus. In Proceedings of the 13th IEEE International Conference on BioInformatics and BioEngineering, Chania, Greece, 10–13 November 2013; pp. 1–4. [Google Scholar] [CrossRef]
  39. Saiti, K.; Macaš, M.; Lhotská, L.; Štechová, K.; Pithová, P. Ensemble methods in combination with compartment models for blood glucose level prediction in type 1 diabetes mellitus. Comput. Methods Programs Biomed. 2020, 196, 105628. [Google Scholar] [CrossRef]
  40. Bunescu, R.; Struble, N.; Marling, C.; Shubrook, J.; Schwartz, F. Blood glucose level prediction using physiological models and support vector regression. In Proceedings of the 2013 12th International Conference on Machine Learning and Applications, Miami, FL, USA, 4–7 December 2013; Volume 1, pp. 135–140. [Google Scholar] [CrossRef]
  41. Bertachi, A.; Biagi, L.; Contreras, I.; Luo, N.; Vehí, J. Prediction of Blood Glucose Levels And Nocturnal Hypoglycemia Using Physiological Models and Artificial Neural Networks. In Proceedings of the KHD@ IJCAI, Stockholm, Schweden, 13 July 2018; pp. 85–90. Available online: http://ceur-ws.org/Vol-2148/paper14.pdf (accessed on 8 December 2020).
  42. Mirshekarian, S.; Bunescu, R.; Marling, C.; Schwartz, F. Using LSTMs to learn physiological models of blood glucose behavior. In Proceedings of the 2017 39th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Jeju Island, Korea, 11–15 July 2017; pp. 2887–2891. [Google Scholar] [CrossRef]
  43. Wang, W.; Wang, S.; Wang, X.; Liu, D.; Geng, Y.; Wu, T. A Glucose-Insulin Mixture Model and Application to Short-Term Hypoglycemia Prediction in the Night Time. IEEE Trans. Biomed. Eng. 2020, 68, 834–845. [Google Scholar] [CrossRef]
  44. Isfahani, M.K.; Zekri, M.; Marateb, H.R.; Faghihimani, E. A hybrid dynamic wavelet-based modeling method for blood glucose concentration prediction in type 1 diabetes. J. Med. Signals Sens. 2020, 10, 174–184. [Google Scholar] [CrossRef]
  45. Zecchin, C.; Facchinetti, A.; Sparacino, G.; Cobelli, C. Jump neural network for online short-time prediction of blood glucose from continuous monitoring sensors and meal information. Comput. Methods Programs Biomed. 2014, 113, 144–152. [Google Scholar] [CrossRef]
  46. Hajizadeh, I.; Rashid, M.; Turksoy, K.; Samadi, S.; Feng, J.; Sevil, M.; Hobbs, N.; Lazaro, C.; Maloney, Z.; Littlejohn, E.; et al. Incorporating unannounced meals and exercise in adaptive learning of personalized models for multivariable artificial pancreas systems. J. Diabetes Sci. Technol. 2018, 12, 953–966. [Google Scholar] [CrossRef]
  47. Amigoni, F.; Dini, M.; Gatti, N.; Somalvico, M. Anthropic agency: A multiagent system for physiological processes. Artif. Intell. Med. 2003, 27, 305–334. [Google Scholar] [CrossRef]
  48. Azure. 2022. Available online: https://docs.microsoft.com/en-us/azure/architecture/microservices/model/microservice-boundaries (accessed on 10 September 2022).
  49. Azure. 2022. Available online: https://azure.microsoft.com/en-us/ (accessed on 5 March 2022).
  50. SPADE. Smart Python Agent Development Environment 2020. Available online: https://spade-mas.readthedocs.io/en/latest/readme.html (accessed on 10 May 2020).
  51. Bordini, R.H.; Hübner, J.; Wooldridge, M. Programming Multi-Agent Systems in Agent-Speak Using Jason; Wiley: New York, NY, USA, 2007. [Google Scholar]
  52. Alfian, G.; Syafrudin, M.; Rhee, J.; Anshari, M.; Mustakim, M.; Fahrurrozi, I. Blood Glucose Prediction Model for Type 1 Diabetes based on Extreme Gradient Boosting. IOP Conf. Ser. Mater. Sci. Eng. 2020, 803, 012012. [Google Scholar] [CrossRef]
  53. PYTHON. 2022. Available online: https://www.python.org/ (accessed on 1 November 2018).
  54. Pfützner, A.; Klonoff, D.; Pardo, S.; Parkes, J. Technical aspects of the Parkes Error Grid. J. Diabetes Sci. Technol. 2013, 7, 1275–1281. [Google Scholar] [CrossRef] [Green Version]
  55. Furutani, E. Closed-loop blood glucose control for type 1 diabetes. Electron. Commun. Jpn. 2019, 102, 22–26. [Google Scholar] [CrossRef]
  56. Parkes, J.L.; Slatin, S.L.; Pardo, S.; Ginsberg, B.H. A new consensus error grid to evaluate the clinical significance of inaccuracies in the measurement of blood glucose. Diabetes Care 2000, 23, 1143–1148. [Google Scholar] [CrossRef]
  57. Pleus, S.; Baumstark, A.; Jendrike, N.; Mende, J.; Link, M.; Zschornack, E.; Haug, C.; Freckmann, G. System accuracy evaluation of 18 CE-marked current-generation blood glucose monitoring systems based on EN ISO 15197:2015. BMJ Open Diabetes Res. Care 2020, 8, e001067. [Google Scholar] [CrossRef]
  58. Foss-Freitas, M.C.; Moreira, G.S.; Antloga, V.P.; Neto, C.R.; Rodrigues, E.M.; Da Costa, M.F.; Pereira, A.; Matsumoto, Y.K. 930-P: Blood Glucose Levels Prediction Accuracy for T1DM Patients Using Neural Networks to Combine Insulin Doses, Food Nutrients, and Heart Rate. Diabetes 2019, 68, 930-P. [Google Scholar] [CrossRef]
  59. Klonoff, D.; Lias, C.; Vigersky, R.; Clarke, W.; Parkes, J.; Sacks, D.; Kirkman, M.; Kovatchev, B. Error Grid Panel. The surveillance error grid. J. Diabetes Sci. Technol. 2014, 8, 658–672. [Google Scholar] [CrossRef] [PubMed]
  60. Zecchin, C.; Facchinetti, A.; Sparacino, G.; Cobelli, C. How Much Is Short-Term Glucose Prediction in Type 1 Diabetes Improved by Adding Insulin Delivery and Meal Content Information to CGM Data? A Proof-of-Concept Study. J. Diabetes Sci. Technol. 2016, 10, 1149–1160. [Google Scholar] [CrossRef] [PubMed]
  61. OpenAPS. 2022. Available online: https://openaps.org/ (accessed on 2 July 2022).
  62. FDA-ControlIQ. 2022. Available online: https://www.fda.gov/news-events/press-announcements/fda-authorizes-first-interoperable-automated-insulin-dosing-controller-designed-allow-more-choices (accessed on 30 June 2022).
  63. MINIMED-640G. 2020. Available online: https://www.medtronicdiabeteslatino.com/br/wp-content/uploads/2018/12/Sistema-Minimed-640G.pdf (accessed on 21 March 2021).
  64. Control-IQ. 2022. Available online: https://www.tandemdiabetes.com/providers/products/control-iq (accessed on 5 August 2022).
  65. Tack, C.; Lancee, G.; Heeren, B.; Engelen, L.; Hendriks, S.; Zimmerman, L.; De Massari, D.; van Gelder, M.; van de Belt, T. Glucose Control, Disease Burden, and Educational Gaps in People With Type 1 Diabetes: Exploratory Study of an Integrated Mobile Diabetes App. JMIR Diabetes 2018, 3, e9531. [Google Scholar] [CrossRef]
  66. Kholghi, M.; Sitbon, L.; Zuccon, G.; Nguyen, A. Active learning: A step towards automating medical concept extraction. J. Am. Med. Inform. Assoc. 2015, 23, 289–296. [Google Scholar] [CrossRef]
Figure 1. The piecewise polynomial for Glargine insulin (slow-acting) considering 0.36 U/kg concentration.
Figure 1. The piecewise polynomial for Glargine insulin (slow-acting) considering 0.36 U/kg concentration.
Applsci 12 09641 g001
Figure 2. The piecewise polynomial for Lispro insulin (fast-acting) considering 0.16 U/kg concentration.
Figure 2. The piecewise polynomial for Lispro insulin (fast-acting) considering 0.16 U/kg concentration.
Applsci 12 09641 g002
Figure 3. Tesseratus architecture.
Figure 3. Tesseratus architecture.
Applsci 12 09641 g003
Figure 4. Tesseratus set up: acquiring knowledge.
Figure 4. Tesseratus set up: acquiring knowledge.
Applsci 12 09641 g004
Figure 5. Sliding window approach for time series: carbohydrates and insulin.
Figure 5. Sliding window approach for time series: carbohydrates and insulin.
Applsci 12 09641 g005
Figure 6. Ascent and descent glucose rate from individual R-BRA07 during 14 days along nighttime (from midnight to eight am) considering time intervals of 30 min.
Figure 6. Ascent and descent glucose rate from individual R-BRA07 during 14 days along nighttime (from midnight to eight am) considering time intervals of 30 min.
Applsci 12 09641 g006
Figure 7. PEG (daytime period) for seven T1D individuals. Green dots lay at zones A and B (95.1% on average): 3804 predictions.
Figure 7. PEG (daytime period) for seven T1D individuals. Green dots lay at zones A and B (95.1% on average): 3804 predictions.
Applsci 12 09641 g007
Figure 8. Parkes error grid (night period) for seven T1D individuals. Green dots lay at zones A and B (93.7% on average): 1400 predictions.
Figure 8. Parkes error grid (night period) for seven T1D individuals. Green dots lay at zones A and B (93.7% on average): 1400 predictions.
Applsci 12 09641 g008
Table 1. Parameters of the glucose and insulin compartment models.
Table 1. Parameters of the glucose and insulin compartment models.
SymbolDescription
I i n Insulin infusion rate
G i n Glucose intake rate
β Relative pancreatic β -cell function
γ Relative insulin sensitivity
sRate of insulin sensitivity increase per minute of exercise
mDaily minutes of physical activity
m b Baseline minutes of physical activity
V m a x Maximum insulin clearance rate
K M Enzyme’s half-saturation value
Table 2. Tesseratus reward policy.
Table 2. Tesseratus reward policy.
StateReward
Green10
Green8
Yellow0
Red−5
Red−10
Table 3. Characteristics of each individual.
Table 3. Characteristics of each individual.
IDSex (M/F)Age (years)AC (cm)BM (kg)
R-BRA01F367957
R-BRA02M5011590
R-BRA03M289170
R-BRA04M45132120
R-BRA05M399383
R-BRA06M399178
R-BRA07F659068
Table 4. Satellite characteristics used to collect data.
Table 4. Satellite characteristics used to collect data.
IDDaysSourceInsulin
R-BRA0114FreeStyle Libre®aspart + degludec
R-BRA0221Minimed 640G®lispro
R-BRA0314FreeStyle Libre®aspart + degludec
R-BRA0421Minimed 640G®lispro
R-BRA0514FreeStyle Libre®aspart + glargine
R-BRA0621Paradigm VEO 754®lispro
R-BRA0714FreeStyle Libre®lispro + degludec
Table 5. Information used to calculate estimated glucose disposal rate (eGDR).
Table 5. Information used to calculate estimated glucose disposal rate (eGDR).
IDHypertensiveHbA1c (%)eGDR
R-BRA010511.7
R-BRA02164.51
R-BRA0306.39.91
R-BRA0415.63.2
R-BRA05088.8
R-BRA060610
R-BRA0707.59.34
Table 6. Volunteers’ nighttime and daytime windows.
Table 6. Volunteers’ nighttime and daytime windows.
IDNighttimeDaytime
R-BRA0110:41 p.m.–07:59 a.m.08:00 a.m.–10:40 p.m.
R-BRA0210:01 p.m.–05:59 a.m.06:00 a.m.–10:00 p.m.
R-BRA0310:01 p.m.–07:59 a.m.08:00 a.m.–10:00 p.m.
R-BRA0409:16 p.m.–08:59 a.m.09:00 a.m.–09:15 p.m.
R-BRA0511:59 p.m.–07:34 a.m.07:35 a.m.–11:58 p.m.
R-BRA0609:51 p.m.–05:29 a.m.05:30 a.m.–09:50 p.m.
R-BRA0708:51 p.m.–05:59 a.m.06:00 a.m.–08:50 p.m.
Table 7. Results of PEG for Tesseratus (3804 predictions plotted)—daytime period.
Table 7. Results of PEG for Tesseratus (3804 predictions plotted)—daytime period.
PHA (%)B (%)C (%)D (%)E (%)A + B (%)
15 min936.80.20099.8
30 min76.922.20.80099.1
60 min56.441.520.1097.9
90 min50.144.94.70.3095
120 min50.341.87.40.5092.1
180 min46448.90.90.290
240 min49.640.49.70.3090
Average62.332.84.40.5095.1
Table 8. Results of PEG for Tesseratus (1400 predictions plotted)—night period.
Table 8. Results of PEG for Tesseratus (1400 predictions plotted)—night period.
PHA (%)B (%)C (%)D (%)E (%)A + B (%)
15 min8612.41.70098.4
30 min72.226.90.90099.1
60 min57.141.81.10098.9
90 min5044.45.60094.4
120 min47.746.75.60094.4
180 min45.344.78.60.70.690
240 min48.842.28.40.6091
300 min46.244.881.2091
360 min54.237.86.51.5092
420 min52.339.76.71.3092
480 min62334.50.5095
Average55.837.95.60.7093.7
Table 9. Mean Absolut Error (MAE)—daytime and nighttime comparison of PH concerning seven T1D individuals. General average MAE at daytime and nighttime for Tesseratus.
Table 9. Mean Absolut Error (MAE)—daytime and nighttime comparison of PH concerning seven T1D individuals. General average MAE at daytime and nighttime for Tesseratus.
PHDaytime (avg in mg/dL)Night-Time (avg in mg/dL)
15 min9.189.27
30 min16.9716.09
60 min26.4126.26
90 min30.2428.09
120 min30.5428.3
180 min33.6132.68
240 min25.0134.49
300 min35.16
360 min34.97
420 min33.96
480 min26.37
Tesseratus24.5627.77
Table 10. Mean Absolut Percentage Error (MAPE)—daytime and nighttime comparison of PH concerning seven T1D individuals. General average MAPE at daytime and nighttime for Tesseratus.
Table 10. Mean Absolut Percentage Error (MAPE)—daytime and nighttime comparison of PH concerning seven T1D individuals. General average MAPE at daytime and nighttime for Tesseratus.
PHDaytime (%)Night-Time (%)
15 min87.84
30 min13.3214.43
60 min20.5222.78
90 min24.9828.11
120 min30.7928.04
180 min33.2631.19
240 min37.8230.57
300 min23.96
360 min36.49
420 min32
480 min25.33
Tesseratus22.0125.51
Table 11. MAPE at nighttime comparison between Foss-Freitas et al., 2019 [58] and Tesseratus— 21 days of training.
Table 11. MAPE at nighttime comparison between Foss-Freitas et al., 2019 [58] and Tesseratus— 21 days of training.
PHFoss-Freitas et al., 2019 [58] (%)Tesseratus (%)
30 min714.43
60 min16.822.78
120 min32.728.04
180 min4531.19
360 min44.236.49
420 min32
480 min25.33
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Aragão Pereira, J.P.; Franco Brandão, A.A.; Bevilacqua, J.d.S.; Côrrea-Giannella, M.L.C. A Multi-Agent Approach Used to Predict Long-Term Glucose Oscillation in Individuals with Type 1 Diabetes. Appl. Sci. 2022, 12, 9641. https://doi.org/10.3390/app12199641

AMA Style

Aragão Pereira JP, Franco Brandão AA, Bevilacqua JdS, Côrrea-Giannella MLC. A Multi-Agent Approach Used to Predict Long-Term Glucose Oscillation in Individuals with Type 1 Diabetes. Applied Sciences. 2022; 12(19):9641. https://doi.org/10.3390/app12199641

Chicago/Turabian Style

Aragão Pereira, João Paulo, Anarosa Alves Franco Brandão, Joyce da Silva Bevilacqua, and Maria Lucia Cardillo Côrrea-Giannella. 2022. "A Multi-Agent Approach Used to Predict Long-Term Glucose Oscillation in Individuals with Type 1 Diabetes" Applied Sciences 12, no. 19: 9641. https://doi.org/10.3390/app12199641

APA Style

Aragão Pereira, J. P., Franco Brandão, A. A., Bevilacqua, J. d. S., & Côrrea-Giannella, M. L. C. (2022). A Multi-Agent Approach Used to Predict Long-Term Glucose Oscillation in Individuals with Type 1 Diabetes. Applied Sciences, 12(19), 9641. https://doi.org/10.3390/app12199641

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