<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Cloud-Hosted Online Learning Approach for Glycemic Index Forecasting ?</article-title>
      </title-group>
      <abstract>
        <p>Recent developments in diabetes care technologies, like wearable devices for continuous glucose monitoring, have made it possible for patients to access relevant data and properly treat diabetes mellitus diseases. Thanks to machine learning, moreover, it has been possible to predict the trend of the level of glucose in the blood in real-time, thus preventing diseases. In this research, we propose to compare the two main state-of-the-art algorithms for time series forecasting, namely Autoregressive Integrated Moving Average (ARIMA) models and Recurrent Neural Network (RNN) models. In particular, we propose an auto adaptive algorithm for ARIMA models' parameters selection based on the Augmented Dickey-Fuller test for stationarity and autocorrelation and partial autocorrelation functions for autoregressive and moving average orders and we show that somehow this would make the ARIMA model preferable to RNNbased models in an online learning scenario for time series forecasting, with a root mean square error of 1.11 mmol/l. We also propose some considerations related to a Google Cloud based infrastructure to host an online learning application, comparing the performance of the tested models also with respect to their training time and their scalability and maintenance, showing that ARIMA models clearly require a lighter infrastructure and a less complex pipeline for managing model life cycle with respect to RNN-based models.</p>
      </abstract>
      <kwd-group>
        <kwd>Continuous Glucose Monitoring</kwd>
        <kwd>Time Series Forecasting</kwd>
        <kwd>Autoregressive Integrated Moving Average</kwd>
        <kwd>Recurrent Neural Network</kwd>
        <kwd>Online Learning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Diabetes mellitus is a metabolic disorder that causes blood glucose level to deviate from
normal values and can lead serious health complications and in some cases, if not
properly treated, even death [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Currently, there is no cure for diabetes, however keeping
blood glucose levels within the recommended range is a key factor in treating this
discomfort. This includes monitoring blood glucose levels, exercising, observing a strict
diet and following an insulin-based treatment [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ]. Recent developments in diabetes
care technologies have made it easier for patients to access relevant data. In particular,
there are continuous glucose monitoring (CGM) technologies that record the level of
glucose in the blood at intervals of a few minutes. CGM technologies have the potential
to be used for the prediction of blood glucose concentration with the consequent
optimization of glycemic control. Furthermore, recently, machine learning and data mining
techniques have reached a sufficient degree of maturity in forecasting problems to allow
for the prediction of the glycemic index trend. In this research, we present a comparison
of the state-of-the-art algorithms for glucose level forecasting with the aim of
developing an online learning framework, which is able to continuously adapt to changes. In
particular, we compare Autoregressive Integrated Moving Average (ARIMA) models
with Recurrent Neural Network (RNN) models and we test their ability to predict the
glucose level’s trend in the near future (30 to 60 minutes). Moreover, we developed
an auto-adaptive learning algorithm to optimize the ARIMA parameter in an online
learning fashion. The approach for hyperparameter optimization we defined uses the
Augmented Dikey-Fuller (ADF) test for stationarity condition to define the
differentiation order and the autocorrelation (ACF) and partial autocorrelation functions (PACF) to
select the range for the autoroegressive and moving average parameters, then optimized
with the Akaike’s Information Criterion (AIC). Differently from other researches in the
field, our algorithm does not perform optimization on a predefined range of the
autoregressive and moving-average steps, but select these ranges considering the trends and
the statistical significance of each point of the ACF and PACF. The following is
organized as follows. In Chapter 2 the most used approaches for the prediction of time series
will be described with a focus on the prediction of the glycemic index. In Chapter 3 we
describe the dataset used for training the model and we furtherly explain the business
need behind this research. In Chapter 4 we describe in detail the approaches that we
intend to test for the objective and in Chapter 5 we present the experimental results.
Finally, in Chapter 6 we describe the implemented architecture for the online learning
purpose and in Chapter 7 some conclusive remarks.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>State of the art</title>
      <p>
        In descriptive statistics, a time series is defined as a collection of constant points in time
and expresses the dynamics of a certain phenomenon over time. The analysis of time
series has two main practical applications: on the one hand, to provide an
interpretation of a phenomenon, identifying components of trends, cyclicality and/or seasonality;
on the other, to predict the future trend of the phenomenon [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Time series can be of
two types: deterministic, if the values of the variable can be exactly determined starting
from the previous values without any error, stochastic,if the values can be determined
only partially, thus introducing an error in the prediction. Most of the time series of real
data belong to this second set and therefore require technical specification to infer the
next values by introducing the lowest possible error [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. In recent years, to overcome the
issue related to diabetes mellitus, CGM technologies that record the level of glucose in
2. STATE OF THE ART
the blood at intervals of a few minutes have spread. The data collected by those
instruments is represented by a time series of the glycemic index. Thanks to the availability
of such data, recently many studies related to glycemic index prediction have emerged.
In [
        <xref ref-type="bibr" rid="ref6 ref7 ref8">6–8</xref>
        ] a taxonomy of the different types of existing algorithms for glycemic index
prediction is provided. In particular, four main approaches are identified on the basis of
the type of model used: physiological models [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], data-driven machine learning
models [
        <xref ref-type="bibr" rid="ref10 ref11 ref12">10–12</xref>
        ], hybrid models [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] and control models [
        <xref ref-type="bibr" rid="ref14 ref15 ref16">14–16</xref>
        ]. Another distinction that
can be made between the types of existing algorithms is based on the type of data that
are considered as inputs. In fact, most of the studies are based on the use of CGM data
as the only source of information to predict glucose levels, while others also use
different inputs such as the meals consumed by patients, the doses of insulin taken and, very
rarely, physical exercise performed [
        <xref ref-type="bibr" rid="ref17 ref18">17, 18</xref>
        ]. Another note on the possible distinctions
of algorithms concerns the time horizon of the prediction: most algorithms focus on a
short-term prediction (i.e., less than 60 minutes) [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ], while others focus on a longer
time horizon [
        <xref ref-type="bibr" rid="ref20 ref21">20, 21</xref>
        ]. Among these techniques, the most used are certainly data-driven
machine learning models. In a systematic study of models based on neural networks [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
which is dated back to 2019, it is shown how most of the studies, 20% of those analyzed,
privilege feed-forward neural networks (FFNN) as a prediction tool, 18% RNN in
various form and 19% an hybridization of physiology-based model and machine learning.
As explained in [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ], the ability of RNNs to model time sequences is still an extensively
studied topic that has shown interesting results. In [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ], for example, Martinsson et al.
propose a method based on RNNs trained using only the historical glucose level. Their
approach, evaluated in terms of root mean square error (RMSE), obtains results
comparable with approaches proposed by other researchers. In [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ], on the other hand, the
objective of the research is to compare the performance of an approach based on RNN
with respect to one based on FFNN both on short-term and long-term predictions. The
result of this research is that RNNs outperform FFNNs on long-term predictions, while
performance is similar on medium- and short-term predictions. A different approach,
but always based on RNN, is presented in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Here, the model that is used is a
recurrent convolutional network. The objective of the study is to evaluate the effectiveness of
the prediction in the short- and medium-term, comparing the performances obtained in
the training phase on a synthetic dataset and the performances obtained in the prediction
phase on a real dataset. Although the performances on the real dataset are worse than
those reported on the synthetic dataset, the results are still competitive with respect to
the state of the art when compared. Besides deep learning techniques, more classical,
but still very performing approaches in the field of time series are represented by the
statistical ARIMA models. The power of these models lies in their ability to model the
time series while keeping the degree of complexity of the model low. ARIMA models
combine two prediction methods: an autoregressive (AR) method and a moving
average (MA) method which represents the baseline statistical models for time series
forecasting. Even though there are also simpler models, as AR, MA, ARMA or ARMAX,
there are several studies that show how ARIMA models can be successfully applied to
glucose level forecasting [
        <xref ref-type="bibr" rid="ref23 ref24 ref25">23–25</xref>
        ]. For example, in [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] a study on the application of
ARIMA models to a case of prediction of the blood glucose level is presented. The
proposed methodology is based on the identification of the model definition parameters in
an optimal way with respect to the forecasting task and subsequently on their
application to the real case. The model definition parameters are the auto-regression order (i.e.
the number of previous measurements needed to determine the current value), the
moving average order (i.e. the number of previous white noise values needed to determine
the current value) and the degree of differentiation (i.e. the number of differentiations
necessary to make the series stationary). In [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ], an ARIMA-based model is proposed
that uses Akaike’s information verification test to determine the value of parameters in
an adaptive way. This type of approach is certainly better than others because it is able
to take into account the variation of the state of the series over time and is able to apply
ARIMA in an adaptive way based on the trend of the series.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Problem Setting</title>
      <p>The goal of this research is that of defining an online learning algorithm for glycemic
index forecasting. The research is, indeed, driven by business needs since the
developed algorithm is intended to be used within a system that aims at monitoring some
vital parameters of bus drivers during their working hours in order to prevent diseases.
In particular, data acquisition takes place thanks to different devices that monitor (with
different frequencies) the blood glucose level in terms of glycemic index, the lipid
profile and HbA1c, the blood pressure and heart rate. Some of these variables are acquired
manually by a specific device once or twice a day. For these variables a prediction is
not needed, but the collected values are visualized in order to monitor their trend. As far
as the glycemic index is concerned, indeed, it is collected by a wearable device called
Glunovo CGM every 3 minutes, and for this variable the goal is to predict the trend of
the series in the near future, in order to alert the driver in case the trend is going out of
the predefined safe boundaries. Thus, the final system must include: a component for
the prediction of the glycemic index signal in the near future; an alerting system capable
of reporting dangerous situations; a dashboard that can be consulted by the doctor who,
based on the predictions made and the other values collected, decides whether to alert
the driver or not. In this research we implement an algorithm that, at each new value
registered by the Glunovo CGM device, analyzes the historical series up to that instant
and provides a real-time forecast of the trend of the glycemic index for the following
period with an horizon of 30 to 60 minutes. Moreover, the algorithm must be able to
adapt to new registered values in an online learning fashion and it must be suitable for
a huge number of drivers.
3.1</p>
      <sec id="sec-3-1">
        <title>Dataset Description</title>
        <p>
          In order to design the online learning framework, we use an open source dataset called
D1NAMO suitable for the analyzed case. The dataset is described by F. Dubosson et
al. in [
          <xref ref-type="bibr" rid="ref29">29</xref>
          ] and contains real readings of the glycemic index acquired under normal
conditions using the wearable device Zephir Bioarness 3. The values of the glycemic
index are acquired every 5 minutes for 9 patients with diabetes, while 6 times a day (non
regularly) for 20 non-diabetic patients. The dataset also contains other information not
relevant for this research since not available in the real scenario. Since for 2 out of the 9
diabetic patients the data collected were relatively scarce, the research was carried out
considering just 7 distinct patients with a minimum number of 928 samples (around 3
days of data collection) for the patient with less detections up to a maximum number of
1438 for the patient with more detections (around 5 days of data collection). In Figure 1
the glucose trend for different patients is shown.
In designing the algorithms for glycemic index prediction, we decided to test and
compare two different models that also respond to two different situations: the first
(ARIMA) aims at having a model for each patient trained for each new data collected
by the device in an online learning scenario; the second (RNN) aims at creating a model
for each patient trained periodically in an offline model retraining scenario
ARIMA models are statistical models that describe the behavior of a series considering
three parameters (described in the following). Consider a time series as a variable yt
that at each instant t is described by the signal value at that instant t, plus an error
value t. For what follows, compare R. Adhikari et al. in [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
        </p>
        <p>yt =
t + t
(1)</p>
        <p>A series is called autoregressive of order p, AR(p), if the value of the series at
instant t is a linear combination of the values of the signal from instants t 1 to tp.</p>
        <p>yt =
1yt 1 +
2yt 2 + ::: +
pyt p + t
(2)</p>
        <p>A series is said to have a moving average of order q, M A(q), if the value of the
series at instant t is a linear combination of the values that describe the trend of the
series from instants t 1 to tq .</p>
        <p>A series is called autoregressive moving average of orders p, q, ARM A(p; q) if it
is both autoregressive of order p and moving average of order q.</p>
        <p>yt =
1yt 1 +
2yt 2 + ::: +
pyt p + t +
1 t 1 +
2 t 2 + ::: +
q t q
(4)</p>
        <p>AR(p); M A(q) or ARM A(p; q) models can only model stationary time series. If
the joint probability distribution function of fyt s; :::; yt; :::; yt+sg is independent of t
for all s, a series yt is strongly stationary. Thus, for a strong stationary process the joint
distribution of any possible set of random variables from the process is independent of
time. However for practical applications, the assumption of strong stationarity is not
always needed and so a somewhat weaker form is considered. A stochastic process is
said to be weakly stationary of order k if the statistical moments of the process up to
that order depend only on time differences and not upon the time of occurrences of the
data being used to estimate the moments. A homogeneous non-stationary series can,
however, be reduced to a stationary series by introducing an appropriate degree of
differentiation d. Using this degree of differentiation d, if the series is also autoregressive
with moving average, the series is called autoregressive integrated with moving average
of order p; d; q ARI M A(p; d; q). It is important to note that neither strong nor weak
stationarity implies the other. However, a weakly stationary process following normal
distribution is also strongly stationary. To verify if a series is stationary it is possible
to use some common statistical test like the one given by Dickey and Fuller. To
determine the optimal parameters for an ARMA model, it is necessary to carry out the ACF
and PACF analysis. These statistical measures reflect how the observations in a time
series are related to each other. The ACF is used to measure the correlation between the
current observation and an observation at lag k (using the Pearson coefficient of
correlation by assuming that each variable is distributed as a Gaussian), while the PACF is
used to measure the correlation between the current observation and an observation at
lag k, after removing the effect of any correlation due to observations at intermediate
lags (i.e. at lags &lt; k ). For each value of the ACF and PACF also a confidence interval is
computed to measure the significance of that computed correlation. For modeling and
forecasting purposes it is often useful to plot the ACF and PACF against consecutive
time lags. These plots help in determining the order of AR and MA terms. Some
empirical considerations, indeed, relates to the following facts: if the ACF decreases slowly
and the PACF decreases very quickly after p steps, the series is AR(p); if the ACF
decreases very fast and the PACF decreases slowly after q step, the series is MA(q); if
both the ACF and the PACF decrease slowly, the series is ARMA. By analyzing the
graph shown in Figure 2, it is possible to see the ACF and PACF of a time series for 2
degrees of differentiation.
Auto adaptive ARIMA parameters optimization algorithm Given the previous
considerations, in this research we define an adaptive logic for optimizing the parameters
of the model p, q and d so that, for each new data point, the best model is recalculated in
real-time on the basis of the historical data in an online learning fashion. In this way, the
trend of the series is predicted for each new data point. Since prediction must be taken in
real-time, it is important to quickly compute the selection of the parameters. The
algorithm we designed works iteratively and is reported in pseudo-code in the following. At
each iteration it takes the historical series (values) and calculates the differential of the
series starting from 0 by incrementally increasing the value of the differential to be
calculated. Once the differential has been calculated, the ADF statistical test is performed.
This test verifies the null hypothesis that there is a root in the time series. The
alternative hypothesis is the stationarity hypothesis. Through this test, it is therefore possible
to determine with statistical significance whether the series is stationary or not. The test
is verified by considering the value of the p-value and the value of the calculated ADF
statistic. If the p-value &lt; 0.05 and the calculated statistic is less than the first critical
value returned by the test, then the series is considered stationary, otherwise the series
is considered non-stationary. Once the test has been performed, if the null hypothesis
holds, the degree of differentiation of the series is increased and the test is repeated,
if the alternative hypothesis holds, instead the series is considered stationary and the
algorithm proceeds in the determination of the parameters p and q. To determine such
parameters, we use the calculation of the ACF and PACF functions. By following the
empirical considerations previously described, to detect p and q we compute the cut-off
of these series and take the first value of the function which is outside the confidence
interval (considering an alpha of 0.05). We therefore consider the maximum value that p
can take, p max, as the cut-off value of the ACF function and the same for q, q max, as
the cut-off value of the PACF function, i.e. as the number of detections of the ACF and
PACF functions that are outside the 95% confidence interval. The choice to exclude the
values that are outside the confidence interval is determined by the fact that those values
do not have an effective statistical significance in determining the trend of the series.
For this reason, the hypothesis is that the p and q parameters should not be higher than
these cut-off values, however it is not guaranteed that the cut-off values are the optimal
model values. Indeed, once the p max and q max parameters have been determined, to
guarantee the optimal choice of the model, a greedy search of the parameters is carried
out, keeping d fixed and making p vary from 1 to the ACF cut-off value and q from 0
to the cut-off value of the PACF. For each model trained, the AIC is calculated. This
parameter is an estimator of the prediction error and, consequently, of the relative
quality of the statistical model calculated on the input data. Indeed, given a collection of
models for a dataset, the AIC estimates the quality of each model relative to the quality
of the others. In this way, the AIC provides an estimate to make the selection of the
models. In this way it is possible to select the best possible model and with each new
data the model can be retrained and used for prediction.</p>
        <p>Algorithm 1: ARIMA Optimal Parameter Selection</p>
        <p>Input: The time series values ts val to train the ARIMA model
Output: The optimal parameter p, d, q of the ARIMA model for the given time series
d 0; check False;
while check=False do
diff val differentiate ts val with order d;
p value, ADF stat, critical val compute ADF test over diff val;
if p value&lt;0.05 and ADF stat&lt;critical val then
acf val compute ACF over diff val;
pacf val compute PACF over diff val;
p max compute cut off of acf val;
q max compute cut off of pacf val;
check True;
else
end
d</p>
        <p>increment d by 1;
end
best p 0; best q 0; aic val 1;
for all p~ 2 [1; p max] do
for all q~ 2 [1; q max] do
arima model compute ARIMA(p~, d, q~);
aic compute AIC for the arima model;
if aic &lt; aic val then
best p p~;
best q q~;
end
end
4.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>RNN model</title>
        <p>
          An RNN is a class of artificial neural network in which the output values of a layer of
a higher level are used as input to a layer of a lower level [
          <xref ref-type="bibr" rid="ref30">30</xref>
          ]. This interconnection
between layers allows the use of one of the layers as state memory, and allows, by
supplying a temporal sequence of values as input, to model a dynamic temporal behavior
dependent on the information received at the previous time [
          <xref ref-type="bibr" rid="ref31">31</xref>
          ]. In the following, the
functioning of the RNN is described in more detail. Consider an RNN with 3 layers:
an input layer, a hidden layer and an output layer. The input of the network is a
sequence of vectors collected at different moments in time. f:::; xt 1; xt; xt+1; :::g; xt =
(x1; x2; :::; xN ). The input unit is connected to the hidden unit in the recurrent layer,
where the connection is defined by a matrix of weights W . The hidden layer has M
units st = (s1; s2; :::; sM ) connected to each other over time through recurring
connections. The hidden layer defines the system memory.
        </p>
        <p>st = f (U xt + W st 1 + bs)
(5)</p>
        <p>In the above equation, f is the activation function of the hidden layer and bs is
the bias vector of the hidden unit. The output layer has P units ht = (h1; h2; :::; hP )
calculated as below, where V is the matrix of weights that connect the hidden layer with
the output layer, g is the activation function of the output layer and bh is the bias vector
of the output unit.</p>
        <p>h = g(V st + bh)
(6)</p>
        <p>
          Thus, RNN represents a non-linear equation of state iterable over time. At any time,
the hidden state provides a prediction of the output based on the input vectors [
          <xref ref-type="bibr" rid="ref32">32</xref>
          ].
In order to train an RNN it is not enough to use a gradient-based algorithm, such as
Stochastic Gradient Descent, (SGD). This is because SGD is unable to take long-range
time dependencies into account. This behavior is caused by the exponential decay of the
gradient when it is propagated backwards and is known as a vanishing gradient problem.
To remedy this situation, a variant of the SGD algorithm is used which avoids running
into the vanishing gradient problem. This change concerns the propagation algorithm
and is called backpropagation through time (BPTT). This propagation technique
consists in unfolding the RNN so that it can be considered as a FFNN. However, if the
network has to model very long time dependencies, this structure is not suitable, since
the BPTT does not guarantee to avoid the vanishing gradient problem.
Long Short Term Memory model To overcome this limitation, architectures have
been introduced that can store very long time dependencies. One of these is Long Short
Term Memory (LSTM) [
          <xref ref-type="bibr" rid="ref33">33</xref>
          ]. The LSTM are RNNs that allow, thanks to their complex
internal structure, to model longer temporal relationships without running into training
problems due to the explosion of the gradient during updates [
          <xref ref-type="bibr" rid="ref33">33</xref>
          ]. This approach
involves modifying the hidden structure by sigmoid or hyperbolic tangent to a memory
cell, where the input and output are gate controlled. These gates control the flow of
information to hidden neurons and preserve the features extracted at the previous instant.
An LSTM cell at each instant t, comprises a status Ct and an output ht. As input, the
cell at time t includes xt, Ct 1 e ht 1. Inside the LSTM cell, the computation is defined
by gates (input, update, forget, output) that allow or not the transmission of information.
        </p>
        <p>
          In order to define the best solution for the given problem, we decided to compare
such LSTM-based models trained on Google Cloud Vertex AI leveraging a
hyperparameter tuning tool based on Google Vizier known as Google HyperTune [
          <xref ref-type="bibr" rid="ref28">28</xref>
          ] with
the ARIMA model with our auto adaptive parameter optimization algorithm. For the
LSTM model Root Mean Squared Error (RMSE) is used as loss function and RMSprop
as optimization algorithm.
5
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Experimental results</title>
      <p>As mentioned in Chapter 3, a public dataset (D1NAMO) is used to train and test the
models. For all tested models, two prediction time horizons are compared, one at 30
minutes and one at 60 minutes. For both cases the training is carried out considering the
measurements in the previous 8 hours. Thus, the time series is divided into sub-serieses
of 8 hours and divided into train and test according to the 80-20 split. Since in the
dataset the detections have a sampling period of 5 minutes, the prediction is made for 6
and 12 subsequent points and the training is done using 96 samples for each series. To
measure the results we use RMSE defined as:</p>
      <p>T
X(y~t
t=1
yt)2jj
(7)</p>
      <p>As far as the ARIMA model is concerned, it is trained with the last 96 samples of
training data and over these the prediction is carried out (to be compared over the first
6 or 12 values of the test set). Then for each subsequent point with respect to the last
96 the ARIMA model is re-trained and the prediction is compared with the test data.
This is done for 7 patient-related time series out of the 9 available, given the relative
scarcity for 2 of these 9, and till all the test data are covered. Results are then averaged.
As far as LSTM is concerned, we train a model for each patient over the training data,
and each model is used to compute the prediction for subsequent values of the time
series in the test set. Also in this case the results are averaged. Glucose values recorded
in the reference dataset are measured in mmol/l, which has a conversion rate in mg/dl
s of 18.02. Furthermore, given the need to make predictions in real time, training and
prediction times are tracked in order to determine the most suitable solution also in
terms of responsiveness. In Table 1 it is shown the RMSE at 30 minute and at 60 for
both the trained models together with the average time necessary to train the models.
As expected, the algorithms are more efficient in the case of shorter time horizons.
5. EXPERIMENTAL RESULTS</p>
      <p>Compared to the ARIMA-based model, in general, the LSTM-based model is slightly
less performing in terms of RMSE. This, as mentioned, is mainly due to the fact that the
ARIMA-based model adapt at every moment in time to the historical series up to that
current instant by extracting short or very short-term dependencies, while the
LSTMbased model are static models, i.e. they do not change with each new detection, but try
to extract longer-term dependencies. Moreover, for the evaluation of the model with a
view to industrialization of the solution, as mentioned above, the training time is also
relevant. Indeed, for each patient and for each new data point (which is estimated to
be collected approximately every 3 minutes using the Glunovo CGM tool) the model is
retrained considering the historical and the new detection in order to make a prediction
in the next 30 or 60 minutes. For ARIMA, the average training time varies as the
parameters p, d and q selected by the developed algorithm vary, but on average the measured
value is 0.5 seconds, while for the LSTM the average training time si of 106 seconds.
This means that the solution based on LSTM does not allow for real time training and
prediction in an online learning fashion. Thus, to use that solution it would be necessary
to train a model for each patient periodically, store it and use that model during
prediction. This implies that a pipeline to manage models update is necessary. The solution
based on ARIMA, on the other hand, allows not to store the model, but just to train it
and to discard it after the prediction have been performed. Thus, the LSTM-based
solution poses a major scalability problem, since as the number of patients increases, the
number of models to re-train and manage will increase, resulting in increased storage
and training costs. Therefore, even if the model is good in terms of performance, its
industrialization is complex to maintain. The solution based on ARIMA, instead, allows
to implement the model in an industrial environment, by training the model with each
new collected data for each patient, guaranteeing the prediction in real time.</p>
      <sec id="sec-4-1">
        <title>5.1 Infrastructural considerations</title>
        <p>
          This study is carried out with the aim of being used by the pilot company within an
application program developed on Google Cloud Platform that continuously monitors
some vital parameters (such as glycemic index, the lipid profile and HbA1c, the blood
pressure and heart rate) and that aims at predicting the trend of the glycemic index in
order to raise alerts. The architecture of the machine learning module implemented is
described in the following. Firstly, the data coming from the sensors are collected and
sent to the time series forecasting module via Google Cloud PubSub [
          <xref ref-type="bibr" rid="ref34">34</xref>
          ]. This tool is
an event-based message management tool. Each time a new message arrives, it is sent to
a Google Cloud Function [
          <xref ref-type="bibr" rid="ref35">35</xref>
          ] which is registered at the specific reception event of
messages from the sensors. Google Cloud Functions are computation tools used to create
single-purpose and stand-alone functions that respond to cloud events (such as REST
calls or, indeed, publication of a pub/sub message) without the need to manage a server
or an environment runtime. Thanks to this tool, it is therefore possible to define a
training and forecasting pipeline of the module described in this study and make this pipeline
available as a fully managed service via API. In order to make predictions, however, it
is necessary for each new message to extract all the previously recorded values for that
patient. For this reason, the Cloud Function not only takes care of implementing the
training and prediction logic of the model, but also of saving and extracting historical
data. As a database for this kind of operation we use Google Cloud BigQuery [
          <xref ref-type="bibr" rid="ref36">36</xref>
          ].
BigQuery is a scalable and cost-effective DBMS optimized for data analysis. Specifically,
the data saved on this DBMS relate to the individual measurements of the wearable
devices, the morphological situation of the patients (weight, height, age), the patient data
and the threshold values (upper and lower) within which every detection or prediction
must be to avoid raising and alert. These threshold values are specific for each device
and for each patient and depend on the patient’s state of health: they are defined by a
specialist doctor who uses the application to enter patient information and to monitor
the summary dashboard of the progress of the various monitored indices of each patient.
6
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusion and future works</title>
      <p>This research presents a comparison of a statistical and a deep learning based approach
for the implementation of a glycemic index time series prediction, monitored by
wearable devices. We compare two state of the art approaches: one based on the
implementation of statistical ARIMA models by designing an algorithm to automatically identify
the value of the optimal parameters of the model based on the use of the ACF and PACF,
so that at each iteration the most accurate model possible is created in an online
fashion; one based on LSTM with the aim of creating a single prediction model for each
monitored patient by taking longer histories into consideration, providing for periodic
offline retraining. We used a public dataset to train and test these models which
contained real blood glucose monitoring data for different patients. Tests were conducted
considering the RMSE with a 30-minute and 60-minute horizon and the time necessary
to train and optimize the algorithm. The training was done considering the series in the
previous 8 hours. The model based on ARIMA, with our custom parameters
optimization algorithm, is the most performing in the 30 and 60 minutes with a RMSE 30 of
1.11 mmol/l and a RMSE 60 of 2.23 mmol/l. Additionally, this model has an average
training time of 0.5 seconds which makes it a good candidate for industrialization. On
the other hand, if the LSTM-based model has good performances in terms of RMSE
(albeit lower than that of the ARIMA-based model), the serving logic of these models
is complex: it would be necessary to train a model for each patient with the consequent
explosion of the resources necessary for saving, serving and periodic re-training of these
models. Thus, we show that the ARIMA-based model can be used in a production
environment in an online learning fashion guaranteeing good performances. However, some
enhancement can be applied. Indeed, recent studies show how it is possible to increase
the performance of glucose level prediction algorithms by considering further data as
input, such as information about meals consumed by patients, the doses of insulin taken
and the physical exercise performed. All this information can thus be used to improve
time series prediction performance. Moreover, in future study, we intend to test the
proposed auto adaptive algorithm also in other time series forecasting contexts, like sales
forecasting, to test its generalizability.
6. CONCLUSION AND FUTURE WORKS</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ogurtsova</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          , da Rocha Fernandes,
          <string-name>
            <given-names>J. D.</given-names>
            ,
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            ,
            <surname>Linnenkamp</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            ,
            <surname>Guariguata</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Cho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.H.</given-names>
            ,
            <surname>Cavan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Shaw</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Makaroff</surname>
          </string-name>
          ,
          <string-name>
            <surname>L</surname>
          </string-name>
          : IDF Diabetes Atlas:
          <article-title>Global estimates for the prevalence of diabetes for 2015 and 2040</article-title>
          .
          <source>Diabetes Research and Clinical Practice</source>
          <volume>128</volume>
          ,
          <fpage>40</fpage>
          -
          <lpage>50</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2. Be´ranger, J.:
          <article-title>The Shift towards a Connected, Assessed</article-title>
          and
          <string-name>
            <given-names>Personalized</given-names>
            <surname>Medicine Centered Upon Medical Datasphere Processing. Elsevier</surname>
          </string-name>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Swan</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The quantified self: Fundamental disruption in big data science and biological discovery</article-title>
          .
          <source>Big data 1(2)</source>
          ,
          <fpage>85</fpage>
          -
          <lpage>99</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Adhikari</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ramesh</surname>
            ,
            <given-names>K. A.</given-names>
          </string-name>
          :
          <article-title>An introductory study on time series modeling and forecasting</article-title>
          . Lambert Academic Publishing, Germany (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Bittanti</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Identificazione dei modelli e sistemi adattivi</article-title>
          .
          <source>3rd edn. Pitagora</source>
          ,
          <string-name>
            <surname>Italy</surname>
          </string-name>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Lunze</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Singh</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marian</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brendel</surname>
            ,
            <given-names>M. D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leonhardt</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Blood glucose control algorithms for type 1 diabetic patients: A methodological review</article-title>
          ,
          <source>Biomedical signal processing and control 8</source>
          (
          <issue>2</issue>
          ),
          <fpage>107</fpage>
          -
          <lpage>119</lpage>
          (
          <issue>20013</issue>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Oviedo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Veh´ı, J.,
          <string-name>
            <surname>Calm</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Armengol</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>A review of personalized blood glucose prediction strategies for T1DM patients</article-title>
          .
          <source>International journal for numerical methods in biomedical engineering 33(6)</source>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Woldaregay</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Arsand</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Walderhaug</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Albers</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mamykina</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Botsis</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hartvigsen</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>Data-driven modeling and prediction of blood glucose dynamics: Machine learning applications in type 1 diabetes</article-title>
          .
          <source>Artificial intelligence in medicine 98</source>
          ,
          <fpage>109</fpage>
          -
          <lpage>134</lpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Bock</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Franc¸ois, G.,
          <string-name>
            <surname>Gillet</surname>
            ,
            <given-names>D.:</given-names>
          </string-name>
          <article-title>A therapy parameter-based model for predicting blood glucose concentrations in patients with type 1 diabetes</article-title>
          .
          <source>Computer methods and programs in biomedicine 118(2)</source>
          ,
          <fpage>107</fpage>
          -
          <lpage>123</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Pappada</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cameron</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosman</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bourey</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Papadimos</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Olorunto</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Borst</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Neural network-based real-time prediction of glucose in patients with insulin-dependent diabetes</article-title>
          .
          <source>Diabetes technology and therapeutics 13(2)</source>
          ,
          <fpage>135</fpage>
          -
          <lpage>141</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Eren-Oruklu</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cinar</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rollins</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Quinn</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Adaptive system identification for estimating future glucose concentrations and hypoglycemia alarms</article-title>
          .
          <source>Automatica</source>
          <volume>48</volume>
          (
          <issue>8</issue>
          ),
          <fpage>1892</fpage>
          -
          <lpage>1897</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Daniels</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , Liu,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Herrero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Georgiou</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.:</surname>
          </string-name>
          <article-title>Convolutional Recurrent Neural Networks for Glucose Prediction</article-title>
          .
          <source>IEEE Journal of Biomedical and Health Informatics</source>
          ,
          <volume>24</volume>
          (
          <issue>2</issue>
          ),
          <fpage>603</fpage>
          -
          <lpage>613</lpage>
          , (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Bunescu</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Struble</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marling</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shubrook</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schwartz</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Blood Glucose Level Prediction Using Physiological Models and Support Vector Regression</article-title>
          .
          <source>In: 2013 12th International Conference on Machine Learning and Applications</source>
          , pp.
          <fpage>135</fpage>
          -
          <lpage>140</lpage>
          , IEEE, Miami, FL, USA (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. van Heusden,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Dassau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Zisser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.C.</given-names>
            ,
            <surname>Seborg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.E.</given-names>
            ,
            <surname>Doyle</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.J.</surname>
          </string-name>
          :
          <article-title>Control-relevant models for glucose control using a priori patient characteristics</article-title>
          .
          <source>IEEE Transactions on Biomedical Engineering</source>
          <volume>59</volume>
          (
          <issue>7</issue>
          ),
          <fpage>1839</fpage>
          -
          <lpage>1849</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Toffanin</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Del Favero</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aiello</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Messori</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cobelli</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Magni</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Glucose-insulin model identified in free-living conditions for hypoglycaemia prevention</article-title>
          .
          <source>Journal of Process Control</source>
          <volume>64</volume>
          ,
          <fpage>27</fpage>
          -
          <lpage>36</lpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Toffanin</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aiello</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Del Favero</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cobelli</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Magni</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Multiple models for artificial pancreas predictions identified from free-living condition data: A proof of concept study</article-title>
          .
          <source>Journal of Process Control</source>
          <volume>77</volume>
          ,
          <fpage>29</fpage>
          -
          <lpage>37</lpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17. Fernandez de Canete, J.,
          <string-name>
            <surname>Gonzalez-Perez</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ramos-Diaz</surname>
            ,
            <given-names>J.C.</given-names>
          </string-name>
          :
          <article-title>Artificial neural networks for closed loop control of in silico and ad hoc type 1 diabetes</article-title>
          .
          <source>Computer methods and programs in biomedicine 106(1)</source>
          ,
          <fpage>55</fpage>
          -
          <lpage>66</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Shah</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Franklin</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Adams-Huet</surname>
            , B., Mitchell,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bouza</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dart</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Phillips</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Effect of meal composition on postprandial glucagon-like peptide-1, insulin, glucagon, Cpeptide, and glucose responses in overweight/obese subjects</article-title>
          .
          <source>European journal of nutrition 56(3)</source>
          ,
          <fpage>1053</fpage>
          -
          <lpage>1062</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Gani</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gribok</surname>
            ,
            <given-names>A.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ward</surname>
            ,
            <given-names>W.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vigersky</surname>
            <given-names>R.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reifman</surname>
          </string-name>
          , J.:
          <article-title>Universal Glucose Models for Predicting Subcutaneous Glucose Concentration in Humans</article-title>
          .
          <source>IEEE Transactions on Information Technology in Biomedicine</source>
          <volume>14</volume>
          (
          <issue>1</issue>
          ),
          <fpage>157</fpage>
          -
          <lpage>165</lpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Montaser</surname>
          </string-name>
          , E., D´ıez,
          <string-name>
            <surname>J-L. Bondia</surname>
          </string-name>
          , J.:
          <article-title>Stochastic seasonal models for glucose prediction in the artificial pancreas</article-title>
          .
          <source>Journal of diabetes science and technology 11(6)</source>
          ,
          <fpage>1124</fpage>
          -
          <lpage>1131</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Zarkogianni</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mitzis</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Litsa</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Arredondo</surname>
            ,
            <given-names>M.T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fico</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fioravanti</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nikita</surname>
            ,
            <given-names>K.S.</given-names>
          </string-name>
          :
          <article-title>Comparative assessment of glucose prediction models for patients with type 1 diabetes mellitus applying sensors for glucose and physical activity monitoring</article-title>
          .
          <source>Medical and biological engineering and computing</source>
          <volume>53</volume>
          (
          <issue>12</issue>
          ),
          <fpage>1333</fpage>
          -
          <lpage>1343</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Hewamalage</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bergmeir</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bandara</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Recurrent neural networks for time series forecasting: Current status and future directions</article-title>
          .
          <source>International Journal of Forecasting</source>
          <volume>7</volume>
          (
          <issue>1</issue>
          ),
          <fpage>388</fpage>
          -
          <lpage>427</lpage>
          (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Shanthi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumar</surname>
          </string-name>
          :
          <article-title>A novel approach for the prediction of glucose concentration in type 1 diabetes ahead in time through ARIMA and differential evolution</article-title>
          .
          <source>Advanced engineering Informatics</source>
          ,
          <volume>38</volume>
          ,
          <fpage>4182</fpage>
          --
          <lpage>4186</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Ying</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rui</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shihong.</surname>
            ,
            <given-names>X.:</given-names>
          </string-name>
          <article-title>Research on glucose concentration predicting based on ARMA model</article-title>
          .
          <source>In: 2014 prognostics and system health management conference (PHM-2014 Hunan)</source>
          , pp.
          <fpage>332</fpage>
          -
          <lpage>335</lpage>
          , IEEE, Zhangjiajie, China (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shi</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xie</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          :
          <article-title>An ARIMA model with adaptive orders for predicting blood glucose concentrations and hypoglycemia</article-title>
          .
          <source>IEEE journal of biomedical and health informatics 23(3)</source>
          ,
          <fpage>1251</fpage>
          -
          <lpage>1260</lpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>Martinsson</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schliep</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eliasson</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mogren</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <article-title>Blood glucose prediction with variance estimation using recurrent neural networks</article-title>
          .
          <source>Journal of Healthcare Informatics Research</source>
          <volume>4</volume>
          (
          <issue>1</issue>
          ),
          <fpage>1</fpage>
          -
          <lpage>18</lpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Allam</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nossai</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gomma</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ibrahim</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Abdelsalam</given-names>
            <surname>Besibes</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.:</surname>
          </string-name>
          <article-title>A Recurrent Neural Network Approach for Predicting Glucose Concentration in Type-1 Diabetic Patients</article-title>
          .
          <source>IFIP Advances in Information and Communication Technology</source>
          <volume>363</volume>
          ,
          <fpage>254</fpage>
          -
          <lpage>259</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Golovin</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Solnik</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moitra</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kochanski</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Karro</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sculley</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Google Vizier: A Service for Black-Box Optimization</article-title>
          .
          <source>In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD '17)</source>
          , pp.
          <fpage>1487</fpage>
          -
          <lpage>1495</lpage>
          . Association for Computing Machinery, New York,USA (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Dubosson</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ranvier</surname>
            ,
            <given-names>J-E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bromuri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calbimonte</surname>
            ,
            <given-names>J-P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ruiz</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schumacher</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The open D1NAMO dataset: A multi-modal dataset for research on non-invasive type 1 diabetes management</article-title>
          .
          <source>Informatics in Medicine Unlocked</source>
          <volume>13</volume>
          ,
          <fpage>92</fpage>
          -
          <lpage>100</lpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30. alehinejad, H.,
          <string-name>
            <surname>Sankar</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barfett</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Colak</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Valaee</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Recent advances in recurrent neural networks</article-title>
          .
          <source>ArXiv preprint</source>
          , arXiv:
          <year>1801</year>
          .
          <volume>01078</volume>
          (
          <year>2017</year>
          )(
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31.
          <string-name>
            <surname>LeCun</surname>
          </string-name>
          , Y.,
          <string-name>
            <surname>Bengio</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hinton</surname>
          </string-name>
          , G.:
          <article-title>Deep learning</article-title>
          .
          <source>Nature</source>
          <volume>521</volume>
          ,
          <fpage>436</fpage>
          -
          <lpage>444</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          32.
          <string-name>
            <surname>Goodfellow</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bengio</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Courville</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Deep learning</article-title>
          . MIT press, (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          33.
          <string-name>
            <surname>Hochreiter</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schmidhuber</surname>
            ,
            <given-names>J.: Long</given-names>
          </string-name>
          <string-name>
            <surname>Short-term Memory</surname>
          </string-name>
          .
          <source>Neural computation 9</source>
          ,
          <fpage>1735</fpage>
          -
          <lpage>1780</lpage>
          (
          <year>1997</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          34. Google Cloud PubSub Documentation, https://cloud.google.com/pubsub/docs.
          <source>Last accessed 31 Aug 2021</source>
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          35. Google Cloud Function Documentation, https://cloud.google.com/functions/docs.
          <source>Last accessed 31 Aug 2021</source>
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          36. Google Cloud BigQuery Documentation, https://cloud.google.com/bigquery/docs.
          <source>Last accessed 31 Aug 2021</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>