<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article article-type="research-article" dtd-version="2.3" xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Appl. Math. Stat.</journal-id>
<journal-title>Frontiers in Applied Mathematics and Statistics</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Appl. Math. Stat.</abbrev-journal-title>
<issn pub-type="epub">2297-4687</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">707884</article-id>
<article-id pub-id-type="doi">10.3389/fams.2021.707884</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Applied Mathematics and Statistics</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>A Function Approximation Approach to the Prediction of Blood Glucose Levels</article-title>
<alt-title alt-title-type="left-running-head">Mhaskar et&#x20;al.</alt-title>
<alt-title alt-title-type="right-running-head">BG Prediction <italic>via</italic> Function Approximation</alt-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name>
<surname>Mhaskar</surname>
<given-names>H. N.</given-names>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
<xref ref-type="corresp" rid="c001">&#x2a;</xref>
<uri xlink:href="https://loop.frontiersin.org/people/281015/overview"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Pereverzyev</surname>
<given-names>S. V.</given-names>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/288454/overview"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>van der Walt</surname>
<given-names>M. D.</given-names>
</name>
<xref ref-type="aff" rid="aff3">
<sup>3</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/306889/overview"/>
</contrib>
</contrib-group>
<aff id="aff1">
<label>
<sup>1</sup>
</label>Institute of Mathematical Sciences, Claremont Graduate University, <addr-line>Claremont</addr-line>, <addr-line>CA</addr-line>, , <country>United&#x20;States</country>
</aff>
<aff id="aff2">
<label>
<sup>2</sup>
</label>The Johann Radon Institute for Computational and Applied Mathematics (RICAM), Austrian Academy of Sciences, <addr-line>Linz</addr-line>, <country>Austria</country>
</aff>
<aff id="aff3">
<label>
<sup>3</sup>
</label>Department of Mathematics and Computer Science, Westmont College, <addr-line>Santa Barbara</addr-line>, <addr-line>CA</addr-line>, <country>United&#x20;States</country>
</aff>
<author-notes>
<fn fn-type="edited-by">
<p>
<bold>Edited by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/181600/overview">Hau-Tieng Wu</ext-link>, Duke University, United&#x20;States</p>
</fn>
<fn fn-type="edited-by">
<p>
<bold>Reviewed by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/288652/overview">Valeriya Naumova</ext-link>, Simula Research Laboratory, Norway</p>
<p>
<ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/369818/overview">Xin Guo</ext-link>, Hong Kong Polytechnic University, China</p>
</fn>
<corresp id="c001">
<sup>&#x2a;</sup>Correspondence: H. N, Mhaskar, <email>hrushikesh.mhaskar@cgu.edu</email>
</corresp>
<fn fn-type="other">
<p>This article was submitted to Mathematics of Computation and Data Science, a section of the journal Frontiers in Applied Mathematics and Statistics</p>
</fn>
</author-notes>
<pub-date pub-type="epub">
<day>30</day>
<month>08</month>
<year>2021</year>
</pub-date>
<pub-date pub-type="collection">
<year>2021</year>
</pub-date>
<volume>7</volume>
<elocation-id>707884</elocation-id>
<history>
<date date-type="received">
<day>10</day>
<month>05</month>
<year>2021</year>
</date>
<date date-type="accepted">
<day>09</day>
<month>07</month>
<year>2021</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#xa9; 2021 Mhaskar, Pereverzyev and van der Walt.</copyright-statement>
<copyright-year>2021</copyright-year>
<copyright-holder>Mhaskar, Pereverzyev and van der Walt</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these&#x20;terms.</p>
</license>
</permissions>
<abstract>
<p>The problem of real time prediction of blood glucose (BG) levels based on the readings from a continuous glucose monitoring (CGM) device is a problem of great importance in diabetes care, and therefore, has attracted a lot of research in recent years, especially based on machine learning. An accurate prediction with a 30, 60, or 90&#xa0;min prediction horizon has the potential of saving millions of dollars in emergency care costs. In this paper, we treat the problem as one of function approximation, where the value of the BG level at time <inline-formula id="inf1">
<mml:math id="m1">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> (where <italic>h</italic> the prediction horizon) is considered to be an unknown function of <italic>d</italic> readings prior to the time <italic>t</italic>. This unknown function may be supported in particular on some unknown submanifold of the <italic>d</italic>-dimensional Euclidean space. While manifold learning is classically done in a semi-supervised setting, where the entire data has to be known in advance, we use recent ideas to achieve an accurate function approximation in a supervised setting; i.e.,&#x20;construct a model for the target function. We use the state-of-the-art clinically relevant PRED-EGA grid to evaluate our results, and demonstrate that for a real life dataset, our method performs better than a standard deep network, especially in hypoglycemic and hyperglycemic regimes. One noteworthy aspect of this work is that the training data and test data may come from different distributions.</p>
</abstract>
<kwd-group>
<kwd>hermite polynomial</kwd>
<kwd>continuous glucose monitoring</kwd>
<kwd>blood glucose prediction</kwd>
<kwd>supervised learning</kwd>
<kwd>prediction error-grid analysis</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1">
<title>1 Introduction</title>
<p>Diabetes is a major disease affecting humanity. According to the 2020 National Diabetes Statistics report [<xref ref-type="bibr" rid="B3">3</xref>], more than 34,000,000 people had diabetes in the United&#x20;States alone in 2018, contributing to nearly 270,000 deaths and costing nearly 327 billion dollars in 2017. There is so far no cure for diabetes, and one of the important ingredients in keeping it in control is to monitor blood glucose levels regularly. Continuous glucose monitoring (CGM) devices are used increasingly for this purpose. These devices typically record blood sugar readings at 5&#xa0;min intervals, resulting in a time series. This paper aims at predicting the level and rate of change of the sugar levels at a medium range prediction horizon; i.e.,&#x20;looking ahead for 30&#x2013;60&#xa0;min. A clinically reliable prediction of this nature is extremely useful in conjunction with other communication devices in avoiding unnecessary costs and dangers. For example, hypoglycemia may lead to loss of consciousness, confusion or seizures [<xref ref-type="bibr" rid="B9">9</xref>]. However, since the onset of hypoglycemic periods are often silent (without indicating symptoms), it can be very hard for a human to predict in advance. If these predictions are getting communicated to a hospital by some wearable communication device linked with the CGM device, then a nurse could alert the patient if the sugar levels are expected to reach dangerous levels, so that the patient could drive to the hospital if necessary, avoiding a dangerous situation, not to mention an expensive call for an ambulance.</p>
<p>Naturally, there are many papers dealing with prediction of blood glucose (BG) based not just on CGM recordings but also other factors such as meals, exercise, etc. In particular, machine learning has been used extensively for this purpose. We refer to [<xref ref-type="bibr" rid="B9">9</xref>] for a recent review of BG prediction methods based on machine learning, with specific focus on predicting and detecting hypoglycemia.</p>
<p>The fundamental problem of machine learning is the following. We have (training) data of the form <inline-formula id="inf2">
<mml:math id="m2">
<mml:mrow>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mi mathvariant="italic">&#x3f5;</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, where, for some integer <inline-formula id="inf3">
<mml:math id="m3">
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>, <inline-formula id="inf4">
<mml:math id="m4">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mi mathvariant="normal">&#x211d;</mml:mi>
<mml:mi>d</mml:mi>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula> are realizations of a random variable, <italic>f</italic> is an unknown real valued function, and the<inline-formula id="inf5">
<mml:math id="m5">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="italic">&#x3f5;</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s are realizations of a mean zero random variable. The distributions of both the random variables are not known. The problem is to approximate <italic>f</italic> with a suitable model, especially for the points which are not in the training data. For example, in the prediction of a time series <inline-formula id="inf6">
<mml:math id="m6">
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mn>0</mml:mn>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mn>1</mml:mn>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> with a prediction horizon of <italic>h</italic> based on <italic>d</italic> past readings can be (and is in&#x20;this paper) viewed as a problem of approximating an unknown&#x20;function <italic>f</italic> such that <inline-formula id="inf7">
<mml:math id="m7">
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> for each <italic>j</italic>. Thus, <inline-formula id="inf8">
<mml:math id="m8">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf9">
<mml:math id="m9">
<mml:mrow>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
<p>Such problems have been studied in approximation theory for more than a century. Unfortunately, classical approximation theory techniques do not apply directly in this context, mainly because the data does not necessarily become dense on any known domain such as a cube, sphere, etc., and we cannot control the locations of the points <inline-formula id="inf10">
<mml:math id="m10">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>. This is already clear from the example given above&#x2013;it is impossible to require that the BG readings be at a pre-chosen set of points.</p>
<p>Manifold learning tries to ameliorate this problem by assuming that the data lies on some unknown manifold, and developing techniques to learn various quantities related to the manifold, in particular, the eigen-decomposition of the Laplace-Beltrami operator. Since these objects must be learnt from the data, these techniques are applicable in the semi-supervised setting, in which we have all the data points <inline-formula id="inf11">
<mml:math id="m11">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> available in advance. In [<xref ref-type="bibr" rid="B8">8</xref>], we have used deep manifold learning to predict BG levels using CGM data. Being in the semi-supervised setting, this approach cannot be used directly for prediction based on data that was not included in the original data set we worked&#x20;with.</p>
<p>Recently, we have discovered [<xref ref-type="bibr" rid="B7">7</xref>] a more direct method to approximate functions on unknown manifolds without trying to learn anything about the manifold itself, and giving an approximation with theoretically guaranteed errors on the entire manifold; not just the points in the original data set. The purpose of this paper is to use this new tool for BG prediction based on CGM readings which can be used on patients not in the same data sets, and for readings for the patients in the data set which are not included among the training&#x20;data.</p>
<p>In this context, the numerical accuracy of the prediction alone is not clinically relevant. The Clarke Error-Grid Analysis (C-EGA) [<xref ref-type="bibr" rid="B2">2</xref>] is devised to predict whether the prediction is reasonably accurate, or erroneous without serious consequences (clinically uncritical), or results in unnecessary treatment (overcorrection), or dangerous (either because it fails to identify a rise or drop in BG or because it confuses a rise in BG for a drop or vice versa). The Prediction Error-Grid Analysis (PRED-EGA), on the other hand, categorizes a prediction as accurate, erroneous with benign (not serious) consequences or erroneous with potentially dangerous consequences in the hypoglycemic (low BG), euglycemic (normal BG), and hyperglycemic (high BG) ranges separately. This stratification is of great importance because consequences caused by a prediction error in the hypoglycemic range are very different from ones in the euglycemic or the hyperglycemic range. In addition, the categorization is based not only on reference BG estimates paired with the BG estimates predicted for the same moments (as C-EGA does), but also on reference BG directions and rates of change paired with the corresponding estimates predicted for the same moments. It is argued in [<xref ref-type="bibr" rid="B14">14</xref>] that this is a much better clinically meaningful assessment tool than C-EGA, and is therefore the assessment tool we choose to use in this&#x20;paper.</p>
<p>Since different papers on the subject use different criterion for assessment it is impossible for us to compare our results with those in most of these papers. Besides, a major objective of this paper is to illustrate the use and utility of the theory in [<xref ref-type="bibr" rid="B7">7</xref>] from the point of view of machine learning. So, we will demonstrate the superiority of our results in the hypoglycemic and hyperglycemic regimes over those obtained by a blind training of a deep network using the MATLAB Deep Learning Toolbox. We will also compare our results with those obtained by the techniques used in [<xref ref-type="bibr" rid="B6">6</xref>, <xref ref-type="bibr" rid="B8">8</xref>, <xref ref-type="bibr" rid="B10">10</xref>]. However, we note that these methods are not directly comparable to ours. In [<xref ref-type="bibr" rid="B10">10</xref>], the authors use the data for only one patient as training data, which leads to a meta-learning model that can be used serendipitously on other patients, although a little bit of further training is still required for each patient to apply this model. In contrast, we require a more extensive &#x201c;training data,&#x201d; but there is no training in the classical sense, and the application to new patients consists of a simple matrix vector multiplication. The method in [<xref ref-type="bibr" rid="B6">6</xref>] is a linear extrapolation method, where the coefficients are learnt separately on each patient. It does not result in a model that can be trained once for all and applied to other patients in a simple manner. As pointed out earlier, the method in [<xref ref-type="bibr" rid="B8">8</xref>] requires that the entire data set be available even before the method can start to work. So, unlike our method, it cannot be trained on a part of the data set and applied to a completely different data set, not available at the beginning.</p>
<p>We will explain the problem and the evaluation criterion in <xref ref-type="sec" rid="s3">Section 3</xref>. Prior work on this problem is reviewed briefly in <xref ref-type="sec" rid="s2">Section 2</xref>. The methodology and algorithm used in this paper are described in <xref ref-type="sec" rid="s4">Section 4</xref>. The results are discussed in <xref ref-type="sec" rid="s5">Section 5</xref>. The mathematical background behind the methods described in <xref ref-type="sec" rid="s4">Section 4</xref> is summarized in <xref ref-type="app" rid="app1">Appendix A</xref>.</p>
</sec>
<sec id="s2">
<title>2 Prior Work</title>
<p>Given the importance of the problem, many researchers have worked on it in several directions. Below we highlight the main trends relevant to our&#x20;work.</p>
<p>The majority of machine learning models (30% of those studied in the survey paper [<xref ref-type="bibr" rid="B9">9</xref>]) are based on artificial neural networks such as convolutional neural networks, recurrent neural networks and deep learning techniques. For example, in [<xref ref-type="bibr" rid="B17">17</xref>], the authors develop a deep learning model based on a dilated recurrent neural network to achieve 30-min blood glucose prediction. The authors assess the accuracy of their method by calculating the root mean squared error (RMSE) and mean absolute relative difference (MARD). While they achieve good results, a limitation of the method is the reliance on various input parameters such as meal intake and insulin dose which are often recorded manually and might therefore be inaccurate. In [<xref ref-type="bibr" rid="B11">11</xref>], on the other hand, a feed-forward neural network is designed with eleven neurons in the input layer (corresponding to variables such as CGM data, the rate of change of glucose levels, meal intake and insulin dosage), and nine neurons with hyperbolic tangent transfer function in the hidden layer. The network was trained with the use of data from 17 patients and tested on data from 10 other patients for a 75-min prediction, and evaluated using C-EGA. Although good results are achieved in the C-EGA grid in this paper, a limitation of the method is again the large amount of additional input information necessary to design the model, as described&#x20;above.</p>
<p>A second BG prediction class employs decision trees. The authors of [<xref ref-type="bibr" rid="B13">13</xref>], for example, use random forests to perform a 30-min prediction to specifically detect postprandial hypoglycemia, that is, hypoglycemia occurring after a meal. They use statistical analyses like sensitivity and specificity to evaluate their method. In [<xref ref-type="bibr" rid="B16">16</xref>], prediction is again achieved by random forests and incorporating a wide variety of additional input features such as physiological and physical activity parameters. Mean Absolute Percentage Error (MAPE) is used as assessment methodology. The authors of [<xref ref-type="bibr" rid="B5">5</xref>] use a classification and regression tree (CART) to perform a 15-min prediction using BG data only, again using sensitivity and specificity to test the performance of their method.</p>
<p>A third class of methods employ kernel-based regularization techniques to achieve prediction (for example [<xref ref-type="bibr" rid="B10">10</xref>], and references therein), where Tikhonov regularization is used to find the best least square fit to the data, assuming the minimizer belongs to a reproducing kernel Hilbert space (RKHS). Of course, these methods are quite sensitive to the choice of kernel and regularization parameters. Therefore, the authors in [<xref ref-type="bibr" rid="B10">10</xref>] develop methods to choose both the kernel and regularization parameter adaptively, or through meta-learning (&#x201c;learning to learn&#x201d;) approaches. C-EGA and PRED-EGA are used as performance metrics.</p>
<p>Time series techniques are also employed in the literature. In [<xref ref-type="bibr" rid="B12">12</xref>], a tenth-order auto-regression (AR) model is developed, where the AR coefficients are determined through a regularized least square method. The model is trained patient-by-patient, typically using the first 30% of the patient&#x2019;s BG measurements, for a 30-min or 60-min prediction. The method is tested on a time series containing glucose values measured every minute, and evaluation is again done through the C-EGA grid. The authors in [<xref ref-type="bibr" rid="B15">15</xref>] develop a first-order AR model, patient-by-patient, with time-varying AR coefficients determined through weighted least squares. Their method is tested on a time series containing glucose values measured every 3&#xa0;min, and quantified using statistical metrics such as RMSE. As noted in [<xref ref-type="bibr" rid="B10">10</xref>], these methods seem to be sensitive to gaps in the input&#x20;data.</p>
<p>A summary of the methods described above is given in <xref ref-type="table" rid="T1">Table&#x20;1</xref>.</p>
<table-wrap id="T1" position="float">
<label>TABLE 1</label>
<caption>
<p>A summary of related work on BG prediction.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="center">Ref</th>
<th align="center">Method</th>
<th align="center">PH (min)</th>
<th align="center">Data</th>
<th align="center">Assessment</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">[<xref ref-type="bibr" rid="B17">17</xref>]</td>
<td>DL</td>
<td align="center">30</td>
<td>BG, meal intake, insulin dose</td>
<td>RMSE, MARD</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="B11">11</xref>]</td>
<td>NN</td>
<td align="center">75</td>
<td>BG, BG rate of change, meal intake, insulin dose</td>
<td>C-EGA</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="B13">13</xref>]</td>
<td>RF</td>
<td align="center">30</td>
<td>BG</td>
<td>Sensitivity/specificity</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="B16">16</xref>]</td>
<td>RF</td>
<td align="center">60</td>
<td>BG, physical activity, physiological measurements, meal intake</td>
<td>MAPE</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="B5">5</xref>]</td>
<td>CART</td>
<td align="center">15</td>
<td>BG</td>
<td>Sensitivity/specificity</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="B10">10</xref>]</td>
<td>KBR</td>
<td align="center">30, 60, 75</td>
<td>BG</td>
<td>C-EGA</td>
</tr>
<tr>
<td align="left"/>
<td/>
<td align="center">10, 20</td>
<td>BG</td>
<td>PRED-EGA</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="B12">12</xref>]</td>
<td>AR</td>
<td align="center">30, 60</td>
<td>BG</td>
<td>C-EGA</td>
</tr>
<tr>
<td align="left">[<xref ref-type="bibr" rid="B15">15</xref>]</td>
<td>AR</td>
<td align="center">30</td>
<td>BG</td>
<td>RMSE</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn>
<p>PH, prediction horizon; DL, deep learning; NN, neural network; RF, random forest; CART, classification and regresssion tree; KBR, kernel-based regularization; AR, autoregression. RMSE, root mean squared error; MARD, mean absolute relative difference; C-EGA, Clarke error-grid analysis; MAPE, mean absolute percentage error; PRED-EGA, prediction error-grid analysis.</p>
</fn>
</table-wrap-foot>
</table-wrap>
<p>It should be noted that the majority of BG prediction models (63.64% of those analyzed in [<xref ref-type="bibr" rid="B9">9</xref>]), including many of the references described above, are dependent on additional input features (such as meal intake, insulin dosage and physical activity) in addition to historical BG data. Since such data could be inaccurate and hard to obtain, we have intentionally made the design decision in our work to base our method on historical BG data&#x20;only.</p>
</sec>
<sec id="s3">
<title>3 The Set-up</title>
<p>We use two different clinical data sets provided by the DirectNet Central Laboratory [<xref ref-type="bibr" rid="B1">1</xref>], which lists BG levels of different patients taken at 5-min intervals with the CGM device; i.e.,&#x20;for each patient <italic>p</italic> in the patient set <italic>P</italic>, we are given a time series <inline-formula id="inf12">
<mml:math id="m12">
<mml:mrow>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, where <inline-formula id="inf13">
<mml:math id="m13">
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> denotes the BG level at time <inline-formula id="inf14">
<mml:math id="m14">
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>. The relevant details of the two data sets are described in <xref ref-type="table" rid="T2">Table&#x20;2</xref>.</p>
<table-wrap id="T2" position="float">
<label>TABLE 2</label>
<caption>
<p>Summary statistics for datasets D and J.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="center"/>
<th align="center">Dataset D</th>
<th align="center">Dataset J</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">No of patients</td>
<td align="center">25</td>
<td align="center">25</td>
</tr>
<tr>
<td align="left">Total no of observations</td>
<td align="center">5,542</td>
<td align="center">5,837</td>
</tr>
<tr>
<td align="left">Avg no of observations per patient</td>
<td align="center">221.68</td>
<td align="center">233.48</td>
</tr>
<tr>
<td align="left">Min BG</td>
<td align="center">40</td>
<td align="center">48.07</td>
</tr>
<tr>
<td align="left">Max BG</td>
<td align="center">356</td>
<td align="center">390.93</td>
</tr>
<tr>
<td align="left">Mean BG</td>
<td align="center">128.15</td>
<td align="center">163.92</td>
</tr>
<tr>
<td align="left">SD in BG</td>
<td align="center">60.61</td>
<td align="center">67.59</td>
</tr>
<tr>
<td align="left">Avg % hypoglycemic readings per patient</td>
<td align="center">13.50</td>
<td align="center">4.33</td>
</tr>
<tr>
<td align="left">Avg % euglycemic readings per patient</td>
<td align="center">69.83</td>
<td align="center">57.98</td>
</tr>
<tr>
<td align="left">Avg % hyperglycemic readings per patient</td>
<td align="center">16.67</td>
<td align="center">37.69</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Our goal is to predict for each <italic>j</italic>, the level <inline-formula id="inf15">
<mml:math id="m15">
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, given readings <inline-formula id="inf16">
<mml:math id="m16">
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> for appropriate values of <italic>h</italic> and <italic>d</italic>. We took <inline-formula id="inf17">
<mml:math id="m17">
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>7</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (a sampling horizon <inline-formula id="inf18">
<mml:math id="m18">
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> of 30&#xa0;min has been suggested as the optimal one for BG prediction in [<xref ref-type="bibr" rid="B4">4</xref>, <xref ref-type="bibr" rid="B6">6</xref>]). We tested prediction horizons of 30&#xa0;min (<inline-formula id="inf19">
<mml:math id="m19">
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>) (the most common prediction horizon according to the analysis in [<xref ref-type="bibr" rid="B9">9</xref>]), 60&#xa0;min (<inline-formula id="inf20">
<mml:math id="m20">
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>12</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>) and 90&#xa0;min (<inline-formula id="inf21">
<mml:math id="m21">
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>18</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>).</p>
</sec>
<sec id="s4">
<title>4 Methodology in the Current Paper</title>
<sec id="s4-1">
<title>4.1 Data Reformulation</title>
<p>For each patient <italic>p</italic> in the set <italic>P</italic> of patients in the data sets, the data is in the form of a time series <inline-formula id="inf22">
<mml:math id="m22">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>N</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:math>
</inline-formula> of BG levels at time <inline-formula id="inf23">
<mml:math id="m23">
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, where <inline-formula id="inf24">
<mml:math id="m24">
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>5</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> minutes. We re-organize the data in the form<disp-formula id="equ1">
<mml:math id="m25">
<mml:mrow>
<mml:msup>
<mml:mi mathvariant="script">P</mml:mi>
<mml:mtext>&#x2a;</mml:mtext>
</mml:msup>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mi>j</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>N</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>h</mml:mi>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2009;</mml:mtext>
<mml:mi>p</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>For any patient <inline-formula id="inf25">
<mml:math id="m26">
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>P</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, we will abbreviate<disp-formula id="equ2">
<mml:math id="m27">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mtext>&#x2003;</mml:mtext>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>and write<disp-formula id="equ3">
<mml:math id="m28">
<mml:mrow>
<mml:mi mathvariant="script">P</mml:mi>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mi>j</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>N</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>h</mml:mi>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2009;</mml:mtext>
<mml:mi>p</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>The problem of BG prediction is then seen as the classical problem of machine learning; i.e.,&#x20;to find a functional relationship <italic>f</italic> such that <inline-formula id="inf26">
<mml:math id="m29">
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2248;</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, for all <italic>p</italic> and <inline-formula id="inf27">
<mml:math id="m30">
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>N</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</sec>
<sec id="s4-2">
<title>4.2 Training Data Selection</title>
<p>To obtain training data, we form the training set <italic>C</italic> by randomly selecting (according to a uniform probability distribution) <italic>c</italic>&#x2009;% of the patients in <italic>P</italic>. The training data are now defined to be all the data of each patient in <italic>C</italic>, that is,<disp-formula id="equ4">
<mml:math id="m31">
<mml:mrow>
<mml:msup>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi mathvariant="normal">&#x22c6;</mml:mi>
</mml:msup>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mi>j</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>N</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>h</mml:mi>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2009;</mml:mtext>
<mml:mi>p</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>C</mml:mi>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>Since we define the training and test data in terms of patients, choosing the entire data for a patient in the training (respectively, test) data, we may now simplify the notation by writing <inline-formula id="inf28">
<mml:math id="m32">
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> rather than <inline-formula id="inf29">
<mml:math id="m33">
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, with the understanding that if <inline-formula id="inf30">
<mml:math id="m34">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> represents a data point for a patient <italic>p</italic>, <inline-formula id="inf31">
<mml:math id="m35">
<mml:mrow>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> is the corresponding value for the same patient <italic>p</italic>. For future reference, we also define<disp-formula id="equ5">
<mml:math id="m36">
<mml:mrow>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mi>p</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>C</mml:mi>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</disp-formula>and the testing patient set <inline-formula id="inf32">
<mml:math id="m37">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>P</mml:mi>
<mml:mi mathvariant="normal">&#x2216;</mml:mi>
<mml:mi>C</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, with<disp-formula id="equ6">
<mml:math id="m38">
<mml:mrow>
<mml:mi mathvariant="script">Q</mml:mi>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mi mathvariant="script">P</mml:mi>
<mml:mo>\</mml:mo>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>s</mml:mi>
<mml:mi>p</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mi>p</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>Q</mml:mi>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
</sec>
<sec id="s4-3">
<title>4.3 BG Range Classification</title>
<p>To get accurate results in each BG range, we want to be able to adapt the training data and parameters used for predictions in each range&#x2013;as noted previously, consequences of prediction errors in the separate BG ranges are very different. To this&#x20;end, we divide the measurements in <inline-formula id="inf33">
<mml:math id="m39">
<mml:mi mathvariant="script">C</mml:mi>
</mml:math>
</inline-formula> into three clusters <inline-formula id="inf34">
<mml:math id="m40">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi>o</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi>e</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf35">
<mml:math id="m41">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi>r</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, based on <inline-formula id="inf36">
<mml:math id="m42">
<mml:mrow>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, the BG value at time <inline-formula id="inf37">
<mml:math id="m43">
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, for each <inline-formula id="inf38">
<mml:math id="m44">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>:<disp-formula id="equ7">
<mml:math id="m45">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi>o</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mo>:</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>70</mml:mn>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mtext>&#x2009;</mml:mtext>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mtext>hyp</mml:mtext>
<mml:mi mathvariant="bold">o</mml:mi>
<mml:mtext>glycemia</mml:mtext>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>;</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="equ8">
<mml:math id="m46">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi>e</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mo>:</mml:mo>
<mml:mn>70</mml:mn>
<mml:mo>&#x3c;</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mtext>&#x2009;</mml:mtext>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold">e</mml:mi>
<mml:mtext>uglycemia</mml:mtext>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>;</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="equ9">
<mml:math id="m47">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi>r</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mo>:</mml:mo>
<mml:mn>180</mml:mn>
<mml:mo>&#x3c;</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>450</mml:mn>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mtext>&#x2009;</mml:mtext>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mtext>hype</mml:mtext>
<mml:mi mathvariant="bold">r</mml:mi>
<mml:mtext>glycemia</mml:mtext>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>with<disp-formula id="equ10">
<mml:math id="m48">
<mml:mrow>
<mml:msubsup>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi>&#x2113;</mml:mi>
<mml:mi mathvariant="normal">&#x22c6;</mml:mi>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi>&#x2113;</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mi>&#x2113;</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mi>o</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>e</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>In addition, we also classify each <inline-formula id="inf39">
<mml:math id="m49">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">Q</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> as follows:<disp-formula id="equ11">
<mml:math id="m50">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="script">Q</mml:mi>
<mml:mi>o</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">Q</mml:mi>
<mml:mo>:</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>70</mml:mn>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mtext>&#x2009;</mml:mtext>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mtext>hyp</mml:mtext>
<mml:mi mathvariant="bold">o</mml:mi>
<mml:mtext>glycemia</mml:mtext>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>;</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="equ12">
<mml:math id="m51">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="script">Q</mml:mi>
<mml:mi>e</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">Q</mml:mi>
<mml:mo>:</mml:mo>
<mml:mn>70</mml:mn>
<mml:mo>&#x3c;</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold">e</mml:mi>
<mml:mtext>uglycemia</mml:mtext>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mtext>&#x2009;</mml:mtext>
<mml:mo>;</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="equ13">
<mml:math id="m52">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="script">Q</mml:mi>
<mml:mi>r</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">Q</mml:mi>
<mml:mo>:</mml:mo>
<mml:mn>180</mml:mn>
<mml:mo>&#x3c;</mml:mo>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>450</mml:mn>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
<mml:mtext>&#x2009;</mml:mtext>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mtext>hype</mml:mtext>
<mml:mi mathvariant="bold">r</mml:mi>
<mml:mtext>glycemia</mml:mtext>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>Ideally, the classification of each <inline-formula id="inf40">
<mml:math id="m53">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">Q</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> should also be done based on the value of <inline-formula id="inf41">
<mml:math id="m54">
<mml:mrow>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (as was done for the classification of the training data <inline-formula id="inf42">
<mml:math id="m55">
<mml:mi mathvariant="script">C</mml:mi>
</mml:math>
</inline-formula>). However, since the values <inline-formula id="inf43">
<mml:math id="m56">
<mml:mrow>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> are only available for the training data and not for the test data, we use the next best available measurement for each <inline-formula id="inf44">
<mml:math id="m57">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, namely <inline-formula id="inf45">
<mml:math id="m58">
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, the BG value at time&#x20;<inline-formula id="inf46">
<mml:math id="m59">
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</sec>
<sec id="s4-4">
<title>4.4 Prediction</title>
<p>Before making the BG predictions, it is necessary to scale the input readings so that the components of each <inline-formula id="inf47">
<mml:math id="m60">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">P</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> are in <inline-formula id="inf48">
<mml:math id="m61">
<mml:mrow>
<mml:mo>[</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>/</mml:mo>
<mml:mn>2,1</mml:mn>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>]</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>. This is done through the transformation<disp-formula id="equ14">
<mml:math id="m62">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x21a6;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>M</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>m</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>M</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>m</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>where <inline-formula id="inf49">
<mml:math id="m63">
<mml:mrow>
<mml:mi>M</mml:mi>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>max</mml:mtext>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>:</mml:mo>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">C</mml:mi>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf50">
<mml:math id="m64">
<mml:mrow>
<mml:mi>m</mml:mi>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>min</mml:mtext>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>:</mml:mo>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">C</mml:mi>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
<p>With <inline-formula id="inf51">
<mml:math id="m65">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>F</mml:mi>
<mml:mo>&#x5e;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>F</mml:mi>
<mml:mo>&#x5e;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>Y</mml:mi>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> defined as in <xref ref-type="app" rid="app1">(Appendix A)</xref> used with training data <italic>Y</italic> and evaluated at a point <inline-formula id="inf52">
<mml:math id="m66">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, we are finally ready to compute the BG prediction for each <inline-formula id="inf53">
<mml:math id="m67">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">Q</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> by<disp-formula id="equ15">
<mml:math id="m68">
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>F</mml:mi>
<mml:mo>&#x5e;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>n</mml:mi>
<mml:mi>o</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>&#x3b1;</mml:mi>
<mml:mi>o</mml:mi>
</mml:msub>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi>o</mml:mi>
<mml:mi mathvariant="normal">&#x22c6;</mml:mi>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mi mathvariant="script">Q</mml:mi>
<mml:mi>o</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>F</mml:mi>
<mml:mo>&#x5e;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>n</mml:mi>
<mml:mi>e</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>&#x3b1;</mml:mi>
<mml:mi>e</mml:mi>
</mml:msub>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi>e</mml:mi>
<mml:mi mathvariant="normal">&#x22c6;</mml:mi>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mi mathvariant="script">Q</mml:mi>
<mml:mi>e</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>F</mml:mi>
<mml:mo>&#x5e;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>n</mml:mi>
<mml:mi>r</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>&#x3b1;</mml:mi>
<mml:mi>r</mml:mi>
</mml:msub>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mi mathvariant="script">C</mml:mi>
<mml:mi>r</mml:mi>
<mml:mi mathvariant="normal">&#x22c6;</mml:mi>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mi mathvariant="script">Q</mml:mi>
<mml:mi>r</mml:mi>
</mml:msub>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>The construction of the estimator <inline-formula id="inf54">
<mml:math id="m69">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>F</mml:mi>
<mml:mo>&#x5e;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> involves several technical details regarding the classical Hermite polynomials. For ease of reading, the details of this construction are deferred to the <xref ref-type="app" rid="app1">Appendix A</xref>.</p>
</sec>
<sec id="s4-5">
<title>4.5 Evaluation</title>
<p>To evaluate the performance of the final output <inline-formula id="inf55">
<mml:math id="m70">
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2009;</mml:mtext>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">Q</mml:mi>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> we use the PRED-EGA mentioned in <xref ref-type="sec" rid="s3">Section 3</xref>. Specifically, a PRED-EGA grid is constructed by using comparisons of <inline-formula id="inf56">
<mml:math id="m71">
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> with the reference value <inline-formula id="inf57">
<mml:math id="m72">
<mml:mrow>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>. This involves comparing<disp-formula id="equ16">
<mml:math id="m73">
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mtext>with</mml:mtext>
<mml:mtext>&#x2003;</mml:mtext>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</disp-formula>as well as the rates of change<disp-formula id="equ17">
<mml:math id="m74">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mfrac>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mtext>with</mml:mtext>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>for all <inline-formula id="inf58">
<mml:math id="m75">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">Q</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>. Based on these comparisons, PRED-EGA classifies <inline-formula id="inf59">
<mml:math id="m76">
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> as being Accurate, Benign or Erroneous.</p>
<p>We repeat the entire process described in <xref ref-type="sec" rid="s4-2">Subsections 4.2</xref>&#x2013;<xref ref-type="sec" rid="s4-5">4.5</xref> for a fixed number of trials, after which we report the average of the PRED-EGA grid placements, over all <inline-formula id="inf60">
<mml:math id="m77">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">Q</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> and over all trials, as the final evaluation.</p>
<p>A Summary of the method is given in <xref ref-type="other" rid="alg1">Algorithm&#x20;1</xref>.</p>
<p>
<statement content-type="algorithm" id="alg1">
<label>
</label>
<p>
<inline-graphic xlink:href="fams-07-707884-fx1.tif"/>
</p>
</statement>
</p>
</sec>
</sec>
<sec sec-type="results|discussion" id="s5">
<title>5 Results and Discussion</title>
<p>As mentioned in <xref ref-type="sec" rid="s3">Section 3</xref>, we apply our method to data provided by the DirecNet Central Laboratory. Time series for the 25 patients in data set D and the 25 patients in data set J that contain the largest number of BG measurements are considered. These specific data sets were obtained to study the performance of CGM devices in children with Type I diabetes; as such, all of the patients are less than 18&#xa0;years old. Summary statistics of the two data sets are provided in <xref ref-type="table" rid="T2">Table&#x20;2</xref>. Our method is a general purpose algorithm, where these details do not play any significant role, except in affecting the outcome of the experiments.</p>
<p>We provide results obtained by implementing our method in MATLAB, as described in <xref ref-type="other" rid="alg1">Algorithm 1</xref>. For our implementation, we employ a sampling horizon <inline-formula id="inf61">
<mml:math id="m78">
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> of 30&#xa0;min (<inline-formula id="inf62">
<mml:math id="m79">
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>7</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>), 50% training data (<inline-formula id="inf63">
<mml:math id="m80">
<mml:mrow>
<mml:mi>c</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>50</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>) (which is comparable to approaches followed in for example [<xref ref-type="bibr" rid="B12">12</xref>]) and a total of 100 trials (<inline-formula id="inf64">
<mml:math id="m81">
<mml:mrow>
<mml:mi>T</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>100</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>). For all the experiments, the function approximation parameters <inline-formula id="inf65">
<mml:math id="m82">
<mml:mrow>
<mml:msub>
<mml:mi>n</mml:mi>
<mml:mi>o</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi>n</mml:mi>
<mml:mi>e</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf66">
<mml:math id="m83">
<mml:mrow>
<mml:msub>
<mml:mi>n</mml:mi>
<mml:mi>r</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> referenced in <xref ref-type="other" rid="alg1">Algorithm 1</xref> were chosen in the range <inline-formula id="inf67">
<mml:math id="m84">
<mml:mrow>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mn>3</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mn>7</mml:mn>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> with <inline-formula id="inf68">
<mml:math id="m85">
<mml:mrow>
<mml:msub>
<mml:mi>&#x3b1;</mml:mi>
<mml:mi>o</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mi>&#x3b1;</mml:mi>
<mml:mi>e</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mi>&#x3b1;</mml:mi>
<mml:mi>r</mml:mi>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>. We provide results for prediction horizons <inline-formula id="inf69">
<mml:math id="m86">
<mml:mrow>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>m</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mi>t</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> of 30&#xa0;min (<inline-formula id="inf70">
<mml:math id="m87">
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>), 60&#xa0;min (<inline-formula id="inf71">
<mml:math id="m88">
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>12</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>) and 90&#xa0;min (<inline-formula id="inf72">
<mml:math id="m89">
<mml:mrow>
<mml:mi>h</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>18</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>) (again, comparable to prediction horizons in for example [12, 13, 17]). After testing our method on all 25 patients in each data set separately, the average PRED-EGA scores (in percent) are displayed in <xref ref-type="table" rid="T3">Tables 3</xref>,&#x20;<xref ref-type="table" rid="T4">4</xref>.</p>
<table-wrap id="T3" position="float">
<label>TABLE 3</label>
<caption>
<p>Average PRED-EGA scores (in percent) for different prediction horizons on <bold>dataset D</bold>.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="3" align="left"/>
<th colspan="3" align="center">Hypoglycemia:</th>
<th colspan="3" align="center">Euglycemia:</th>
<th colspan="3" align="center">Hyperglycemia:</th>
</tr>
<tr>
<th colspan="3" align="center">BG <inline-formula id="inf73">
<mml:math id="m90">
<mml:mrow>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>70</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dL)</th>
<th colspan="3" align="center">BG <inline-formula id="inf74">
<mml:math id="m91">
<mml:mrow>
<mml:mn>70</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dL)</th>
<th colspan="3" align="center">BG <inline-formula id="inf75">
<mml:math id="m92">
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dL)</th>
</tr>
<tr>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td colspan="10" align="left">
<bold>30&#xa0;min prediction horizon</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">85.05</td>
<td align="center">13.34</td>
<td align="center">1.61</td>
<td align="center">84.96</td>
<td align="center">11.93</td>
<td align="center">3.11</td>
<td align="center">64.18</td>
<td align="center">22.89</td>
<td align="center">12.93</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.24</td>
<td align="center">0.26</td>
<td align="center">99.50</td>
<td align="center">83.42</td>
<td align="center">13.94</td>
<td align="center">2.65</td>
<td align="center">47.00</td>
<td align="center">16.73</td>
<td align="center">36.27</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">88.72</td>
<td align="center">4.49</td>
<td align="center">6.79</td>
<td align="center">80.32</td>
<td align="center">17.36</td>
<td align="center">2.32</td>
<td align="center">64.88</td>
<td align="center">21.90</td>
<td align="center">13.22</td>
</tr>
<tr>
<td align="left">&#x2003;Legendre polynomials (2013)</td>
<td align="center">49.49</td>
<td align="center">25.85</td>
<td align="center">24.66</td>
<td align="center">53.88</td>
<td align="center">37.28</td>
<td align="center">8.84</td>
<td align="center">41.40</td>
<td align="center">34.90</td>
<td align="center">23.70</td>
</tr>
<tr>
<td align="left">&#x2003;FARL (2012)</td>
<td align="center">72.42</td>
<td align="center">8.80</td>
<td align="center">18.78</td>
<td align="center">74.54</td>
<td align="center">18.79</td>
<td align="center">6.67</td>
<td align="center">55.45</td>
<td align="center">26.42</td>
<td align="center">18.13</td>
</tr>
<tr>
<td colspan="10" align="left">
<bold>60&#xa0;min prediction horizon</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">80.44</td>
<td align="center">12.33</td>
<td align="center">7.23</td>
<td align="center">82.78</td>
<td align="center">11.59</td>
<td align="center">5.63</td>
<td align="center">63.83</td>
<td align="center">20.92</td>
<td align="center">15.25</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.39</td>
<td align="center">0.62</td>
<td align="center">98.99</td>
<td align="center">82.30</td>
<td align="center">14.70</td>
<td align="center">3.00</td>
<td align="center">47.48</td>
<td align="center">18.70</td>
<td align="center">33.82</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">54.30</td>
<td align="center">4.72</td>
<td align="center">40.98</td>
<td align="center">79.99</td>
<td align="center">17.29</td>
<td align="center">2.72</td>
<td align="center">59.78</td>
<td align="center">21.13</td>
<td align="center">19.09</td>
</tr>
<tr>
<td align="left">&#x2003;Legendre polynomials (2013)</td>
<td align="center">25.66</td>
<td align="center">34.54</td>
<td align="center">39.80</td>
<td align="center">36.20</td>
<td align="center">49.44</td>
<td align="center">14.36</td>
<td align="center">33.27</td>
<td align="center">32.21</td>
<td align="center">34.52</td>
</tr>
<tr>
<td align="left">&#x2003;FARL (2012)</td>
<td align="center">47.11</td>
<td align="center">6.80</td>
<td align="center">46.10</td>
<td align="center">71.62</td>
<td align="center">21.29</td>
<td align="center">7.09</td>
<td align="center">48.57</td>
<td align="center">23.91</td>
<td align="center">27.51</td>
</tr>
<tr>
<td colspan="10" align="left">
<bold>90&#xa0;min prediction horizon</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">80.60</td>
<td align="center">10.05</td>
<td align="center">9.35</td>
<td align="center">80.19</td>
<td align="center">9.96</td>
<td align="center">9.85</td>
<td align="center">56.07</td>
<td align="center">15.44</td>
<td align="center">28.49</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.32</td>
<td align="center">0.38</td>
<td align="center">99.30</td>
<td align="center">83.01</td>
<td align="center">14.26</td>
<td align="center">2.73</td>
<td align="center">53.05</td>
<td align="center">13.77</td>
<td align="center">33.18</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">33.07</td>
<td align="center">4.42</td>
<td align="center">62.51</td>
<td align="center">80.12</td>
<td align="center">15.87</td>
<td align="center">4.01</td>
<td align="center">56.73</td>
<td align="center">20.84</td>
<td align="center">22.43</td>
</tr>
<tr>
<td align="left">&#x2003;Legendre polynomials (2013)</td>
<td align="center">20.67</td>
<td align="center">39.28</td>
<td align="center">40.05</td>
<td align="center">27.98</td>
<td align="center">51.64</td>
<td align="center">20.38</td>
<td align="center">20.00</td>
<td align="center">30.94</td>
<td align="center">49.06</td>
</tr>
<tr>
<td align="left">&#x2003;FARL (2012)</td>
<td align="center">35.98</td>
<td align="center">2.53</td>
<td align="center">61.49</td>
<td align="center">74.41</td>
<td align="center">16.97</td>
<td align="center">8.62</td>
<td align="center">46.17</td>
<td align="center">26.69</td>
<td align="center">27.14</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="T4" position="float">
<label>TABLE 4</label>
<caption>
<p>Average PRED-EGA scores (in percent) for different prediction horizons on <bold>dataset J</bold>.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="3" align="left"/>
<th colspan="3" align="center">Hypoglycemia:</th>
<th colspan="3" align="center">Euglycemia:</th>
<th colspan="3" align="center">Hyperglycemia:</th>
</tr>
<tr>
<th colspan="3" align="center">BG <inline-formula id="inf76">
<mml:math id="m93">
<mml:mrow>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>70</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
<th colspan="3" align="center">BG <inline-formula id="inf77">
<mml:math id="m94">
<mml:mrow>
<mml:mn>70</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
<th colspan="3" align="center">BG <inline-formula id="inf78">
<mml:math id="m95">
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
</tr>
<tr>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td colspan="10" align="left">
<bold>30&#xa0;min prediction horizon:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">82.80</td>
<td align="center">6.60</td>
<td align="center">10.60</td>
<td align="center">84.30</td>
<td align="center">10.90</td>
<td align="center">4.80</td>
<td align="center">75.33</td>
<td align="center">11.48</td>
<td align="center">13.19</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.06</td>
<td align="center">0.06</td>
<td align="center">99.88</td>
<td align="center">81.40</td>
<td align="center">14.50</td>
<td align="center">4.10</td>
<td align="center">59.87</td>
<td align="center">8.85</td>
<td align="center">31.28</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">72.09</td>
<td align="center">1.52</td>
<td align="center">26.39</td>
<td align="center">83.12</td>
<td align="center">14.74</td>
<td align="center">2.14</td>
<td align="center">73.91</td>
<td align="center">12.03</td>
<td align="center">14.06</td>
</tr>
<tr>
<td align="left">&#x2003;Legendre polynomials (2013)</td>
<td align="center">70.68</td>
<td align="center">11.75</td>
<td align="center">17.57</td>
<td align="center">74.48</td>
<td align="center">19.67</td>
<td align="center">5.85</td>
<td align="center">62.82</td>
<td align="center">26.08</td>
<td align="center">11.10</td>
</tr>
<tr>
<td align="left">&#x2003;FARL (2012)</td>
<td align="center">69.61</td>
<td align="center">7.98</td>
<td align="center">22.41</td>
<td align="center">83.87</td>
<td align="center">12.31</td>
<td align="center">3.82</td>
<td align="center">73.95</td>
<td align="center">16.43</td>
<td align="center">9.62</td>
</tr>
<tr>
<td colspan="10" align="left">
<bold>60&#xa0;min prediction horizon:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">84.27</td>
<td align="center">5.66</td>
<td align="center">10.07</td>
<td align="center">75.43</td>
<td align="center">11.11</td>
<td align="center">13.46</td>
<td align="center">63.13</td>
<td align="center">8.49</td>
<td align="center">28.38</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.06</td>
<td align="center">0.13</td>
<td align="center">99.81</td>
<td align="center">81.12</td>
<td align="center">14.64</td>
<td align="center">4.24</td>
<td align="center">59.83</td>
<td align="center">8.21</td>
<td align="center">31.96</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">35.89</td>
<td align="center">0.87</td>
<td align="center">63.24</td>
<td align="center">79.50</td>
<td align="center">14.96</td>
<td align="center">5.54</td>
<td align="center">71.37</td>
<td align="center">12.53</td>
<td align="center">16.10</td>
</tr>
<tr>
<td align="left">&#x2003;Legendre polynomials (2013)</td>
<td align="center">50.16</td>
<td align="center">22.65</td>
<td align="center">27.19</td>
<td align="center">52.44</td>
<td align="center">34.36</td>
<td align="center">13.20</td>
<td align="center">42.89</td>
<td align="center">36.08</td>
<td align="center">21.03</td>
</tr>
<tr>
<td align="left">&#x2003;FARL (2012)</td>
<td align="center">42.28</td>
<td align="center">1.61</td>
<td align="center">56.11</td>
<td align="center">76.74</td>
<td align="center">14.48</td>
<td align="center">8.78</td>
<td align="center">67.56</td>
<td align="center">16.75</td>
<td align="center">15.69</td>
</tr>
<tr>
<td colspan="10" align="left">
<bold>90&#xa0;min prediction horizon:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">71.07</td>
<td align="center">5.94</td>
<td align="center">22.99</td>
<td align="center">73.64</td>
<td align="center">9.00</td>
<td align="center">17.36</td>
<td align="center">60.28</td>
<td align="center">6.30</td>
<td align="center">33.42</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.10</td>
<td align="center">0.50</td>
<td align="center">99.85</td>
<td align="center">81.09</td>
<td align="center">14.75</td>
<td align="center">4.16</td>
<td align="center">59.47</td>
<td align="center">9.49</td>
<td align="center">31.04</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">6.84</td>
<td align="center">1.03</td>
<td align="center">92.13</td>
<td align="center">77.85</td>
<td align="center">13.93</td>
<td align="center">8.22</td>
<td align="center">68.29</td>
<td align="center">13.04</td>
<td align="center">18.67</td>
</tr>
<tr>
<td align="left">&#x2003;Legendre polynomials (2013)</td>
<td align="center">52.58</td>
<td align="center">15.71</td>
<td align="center">31.71</td>
<td align="center">38.46</td>
<td align="center">40.44</td>
<td align="center">21.10</td>
<td align="center">27.92</td>
<td align="center">37.13</td>
<td align="center">34.95</td>
</tr>
<tr>
<td align="left">&#x2003;FARL (2012)</td>
<td align="center">31.58</td>
<td align="center">1.23</td>
<td align="center">67.18</td>
<td align="center">74.96</td>
<td align="center">13.10</td>
<td align="center">11.95</td>
<td align="center">61.96</td>
<td align="center">14.06</td>
<td align="center">23.98</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>For comparison, <xref ref-type="table" rid="T3">Tables 3</xref>, <xref ref-type="table" rid="T4">4</xref> also display predictions on the same data sets using four other methods:<list list-type="simple">
<list-item>
<p>i) MATLAB&#x2019;s built-in Deep Learning Toolbox. We used a network architecture consisting of three fully connected convolutional and output layers and appropriate input, normalization, activation, and averaging layers. As before, we used 50% training data and averaged the experiment over 100 trials, for prediction windows of 30&#xa0;min, 60 and 90&#xa0;min and data sets D and&#x20;J.</p>
</list-item>
<list-item>
<p>ii) The diffusion geometry approach, based on the eigen-decomposition of the Laplace-Beltrami operator, we followed in our 2017 paper [<xref ref-type="bibr" rid="B8">8</xref>]. As mentioned in <xref ref-type="sec" rid="s1">Section 1</xref>, this approach can be classified as semi-supervised learning, where we need to have all the data points <inline-formula id="inf79">
<mml:math id="m96">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> available in advance. Because of this requirement, this approach cannot be used for prediction based on data that was not included in the original data set we worked with. Indeed, this is one of the main motivations for our current method, which is not dependent on this requirement. Nevertheless, we include a comparison of the diffusion geometry approach with our current method for greater justification of the accuracy of our current method. Again, we used 50% training data and averaged the experiment over 100 trials, for prediction windows of 30, 60 and 90&#xa0;min and data sets D and&#x20;J.</p>
</list-item>
<list-item>
<p>iii) The Legendre polynomial prediction method followed in our 2013 paper [<xref ref-type="bibr" rid="B6">6</xref>]. In this context, the main mathematical problem can be summarized as that of estimating the derivative of a function at the end point of an interval, based on measurements of the function in the past. An important difference between our current method and the Legendre polynoimal approach is that with the latter, learning is based on the data for each patient separately (each patient forms a data set in itself, as explained in <xref ref-type="sec" rid="s1">Section 1</xref>). Therefore, the method is philosophically different from ours. We nevertheless include a comparison for prediction windows of 30&#xa0;min, 60 and 90&#xa0;min and data sets D and&#x20;J.</p>
</list-item>
<list-item>
<p>iv) The Fully Adaptive Regularized Learning (FARL) approach in the 2012 paper [<xref ref-type="bibr" rid="B10">10</xref>], which uses meta-learning to choose the kernel and regularization parameters adaptively (briefly described in <xref ref-type="sec" rid="s2">Section 2</xref>). As explained in [<xref ref-type="bibr" rid="B10">10</xref>], a strong suit of FARL is that it is expected to be portable from patient to patient without any readjustment. Therefore, the results reported below were obtained by implementing the code and parameters used in [<xref ref-type="bibr" rid="B10">10</xref>] directly on data sets D and J for prediction windows of 30&#xa0;min, 60 and 90&#xa0;min, with no adjustments for the kernel and regularization parameters. As explained earlier, this method is also not directly compared to our theoretically well founded method.</p>
</list-item>
</list>
</p>
<p>The percentage accurate predictions and predictions with benign consequences in all three BG ranges, as obtained using all five methods, for a 30&#xa0;min, 60 and 90&#xa0;min prediction window, are displayed visually in <xref ref-type="fig" rid="F1">Figures 1</xref>,&#x20;<xref ref-type="fig" rid="F2">2</xref>.</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption>
<p>Percentage accurate predictions and predictions with benign consequences in all three BG ranges (blue: hypoglycemia; orange: euglycemia; grey: hyperglycemia) for dataset D, for all five methods for different prediction windows (30, 60, and 90&#xa0;min).</p>
</caption>
<graphic xlink:href="fams-07-707884-g001.tif"/>
</fig>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption>
<p>Percentage accurate predictions and predictions with benign consequences in all three BG ranges (blue: hypoglycemia; orange: euglycemia; grey: hyperglycemia) for dataset J, for all five methods for different prediction windows (30, 60, and 90&#xa0;min).</p>
</caption>
<graphic xlink:href="fams-07-707884-g002.tif"/>
</fig>
<p>By comparing the percentages in Tables 3, 4 and the bar heights in <xref ref-type="fig" rid="F1">Figures 1</xref>, <xref ref-type="fig" rid="F2">2</xref>, it is clear that our method far outperforms the competitors in the hypoglycemic range, except for the 30&#xa0;min prediction on data set D, where the diffusion geometry approach is slightly more accurate&#x2013;but it is important to remember that the diffusion geometry approach has all the data points available from the outset. The starkest difference is between our method and Matlab&#x2019;s Deep Learning Toolbox&#x2013;the latter achieves less than 1.5% accurate and benign consequence predictions regardless of the size of the prediction window or data set. There is also a marked difference between our method and the Legendre polynomial approach, especially for longer prediction horizons. Our method achieves comparable or higher accuracy in the hyperglycemic range, except for the 60 and 90&#xa0;min predictions on data set J, where the diffusion geometry and FARL approaches achieve more accurate predictions. The methods display comparable accuracy in the euglycemic range, except for the 60 and 90&#xa0;min predictions on dataset J, where Matlab&#x2019;s toolbox, the diffusion geometry approach and the FARL method achieve higher accuracy.</p>
<p>
<xref ref-type="table" rid="T5">Tables 5</xref>, <xref ref-type="table" rid="T6">6</xref> display the results when testing those methods that are dependent on training data selection (that is, our current method, the Deep Learning Toolbox and the diffusion geometry approach in our 2017 paper) on different training set sizes (namely, 30, 50, 70 and 90%). For these experiments, we used a fixed prediction window of 30&#xa0;min, and training data was drawn randomly according to a uniform probability distribution in each case. While the Deep Learning Toolbox and diffusion geometry approach sometimes perform slightly better than our method in the euglycemic and hypoglycemic ranges, respectively, our method consistently outperforms both of these in the other two blood glucose ranges. The results are displayed visually as well in <xref ref-type="fig" rid="F3">Figures 3</xref>,&#x20;<xref ref-type="fig" rid="F4">4</xref>.</p>
<table-wrap id="T5" position="float">
<label>TABLE 5</label>
<caption>
<p>Percentage accurate predictions for different training set sizes and a 30&#xa0;min prediction horizon on <bold>dataset D</bold>.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="2" align="left"/>
<th align="center">Hypoglycemia:</th>
<th align="center">Euglycemia:</th>
<th align="center">Hyperglycemia:</th>
</tr>
<tr>
<th align="center">BG <inline-formula id="inf80">
<mml:math id="m97">
<mml:mrow>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>70</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
<th align="center">BG <inline-formula id="inf81">
<mml:math id="m98">
<mml:mrow>
<mml:mn>70</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
<th align="center">BG <inline-formula id="inf82">
<mml:math id="m99">
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td colspan="4" align="left">
<bold>30% training data:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">83.02</td>
<td align="center">86.15</td>
<td align="center">64.14</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.88</td>
<td align="center">77.89</td>
<td align="center">44.50</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">82.56</td>
<td align="center">80.83</td>
<td align="center">63.89</td>
</tr>
<tr>
<td colspan="4" align="left">
<bold>50% training data:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">85.05</td>
<td align="center">84.96</td>
<td align="center">64.18</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.24</td>
<td align="center">83.42</td>
<td align="center">47.00</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">88.72</td>
<td align="center">80.32</td>
<td align="center">64.88</td>
</tr>
<tr>
<td colspan="4" align="left">
<bold>70% training data:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">86.62</td>
<td align="center">85.79</td>
<td align="center">64.47</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.06</td>
<td align="center">88.14</td>
<td align="center">48.94</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">90.72</td>
<td align="center">80.34</td>
<td align="center">64.99</td>
</tr>
<tr>
<td colspan="4" align="left">
<bold>90% training data:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">86.77</td>
<td align="center">86.34</td>
<td align="center">65.20</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.09</td>
<td align="center">89.71</td>
<td align="center">46.97</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">93.22</td>
<td align="center">80.87</td>
<td align="center">65.84</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="T6" position="float">
<label>TABLE 6</label>
<caption>
<p>Percentage accurate predictions for different training set sizes and a 30&#xa0;min prediction horizon on <bold>dataset J</bold>.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="2" align="left"/>
<th align="center">Hypoglycemia:</th>
<th align="center">Euglycemia:</th>
<th align="center">Hyperglycemia:</th>
</tr>
<tr>
<th align="center">BG <inline-formula id="inf83">
<mml:math id="m100">
<mml:mrow>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>70</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
<th align="center">BG <inline-formula id="inf84">
<mml:math id="m101">
<mml:mrow>
<mml:mn>70</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
<th align="center">BG <inline-formula id="inf85">
<mml:math id="m102">
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td colspan="4" align="left">
<bold>30% training data:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">81.79</td>
<td align="center">83.34</td>
<td align="center">76.12</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.07</td>
<td align="center">74.75</td>
<td align="center">60.81</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">67.02</td>
<td align="center">83.99</td>
<td align="center">75.33</td>
</tr>
<tr>
<td colspan="4" align="left">
<bold>50% training data:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">82.80</td>
<td align="center">84.30</td>
<td align="center">75.33</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.06</td>
<td align="center">81.40</td>
<td align="center">59.87</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">72.09</td>
<td align="center">83.12</td>
<td align="center">73.91</td>
</tr>
<tr>
<td colspan="4" align="left">
<bold>70% training data:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">86.40</td>
<td align="center">81.89</td>
<td align="center">77.21</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.00</td>
<td align="center">86.26</td>
<td align="center">60.93</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">74.45</td>
<td align="center">81.28</td>
<td align="center">73.47</td>
</tr>
<tr>
<td colspan="4" align="left">
<bold>90% training data:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">87.67</td>
<td align="center">81.43</td>
<td align="center">76.40</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0</td>
<td align="center">88.30</td>
<td align="center">62.45</td>
</tr>
<tr>
<td align="left">&#x2003;Diffusion geometry (2017)</td>
<td align="center">73.90</td>
<td align="center">81.33</td>
<td align="center">70.98</td>
</tr>
</tbody>
</table>
</table-wrap>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption>
<p>Percentage accurate predictions and predictions with benign consequences in all three BG ranges (blue: hypoglycemia; orange: euglycemia; grey: hyperglycemia) with a 30&#xa0;min prediction window on dataset D, for different training set sizes (30, 50, 70 and 90%).</p>
</caption>
<graphic xlink:href="fams-07-707884-g003.tif"/>
</fig>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption>
<p>Percentage accurate predictions and predictions with benign consequences in all three BG ranges (blue: hypoglycemia; orange: euglycemia; grey: hyperglycemia) with a 30&#xa0;min prediction window on dataset J, for different training set sizes (30, 50, 70 and 90%).</p>
</caption>
<graphic xlink:href="fams-07-707884-g004.tif"/>
</fig>
<p>As mentioned in <xref ref-type="sec" rid="s1">Section 1</xref>, a feature of our method is that it does not require any information about the data manifold other than its dimension. So, in principle, one could &#x201c;train&#x201d; on one data set and apply the resulting model to another data set taken from a different manifold. We illustrate this by constructing our model based on one of the data sets D or J and testing it on the other data set. Building on this idea, we also demonstrate the accuracy of our method as compared to MATLAB&#x2019;s Deep Learning Toolbox when trained on data set D and applied to perform prediction on data set J, and vice versa, which is the only other method that is directly comparable with the philosophy behind our method. These results are reported in <xref ref-type="table" rid="T7">Tables 7</xref>, <xref ref-type="table" rid="T8">8</xref>. It is clear that we are successful in our goal of training on one data set and predicting on a different data set. The percentage accurate predictions and predictions with benign consequences when training and testing on different datasets are comparable to the cases when we are training and testing on the same dataset; in fact, we obtain even better results in the hypoglycemic BG range when training and testing across different datasets.</p>
<table-wrap id="T7" position="float">
<label>TABLE 7</label>
<caption>
<p>Average PRED-EGA scores (in percent) for different prediction horizons on <bold>dataset D</bold>, with <bold>training data selected from dataset J</bold>.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="3" align="left"/>
<th colspan="3" align="center">Hypoglycemia:</th>
<th colspan="3" align="center">Euglycemia:</th>
<th colspan="3" align="center">Hyperglycemia:</th>
</tr>
<tr>
<th colspan="3" align="center">BG <inline-formula id="inf86">
<mml:math id="m103">
<mml:mrow>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>70</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
<th colspan="3" align="center">BG <inline-formula id="inf87">
<mml:math id="m104">
<mml:mrow>
<mml:mn>70</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
<th colspan="3" align="center">BG <inline-formula id="inf88">
<mml:math id="m105">
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
</tr>
<tr>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td colspan="10" align="left">
<bold>30&#xa0;min prediction horizon:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">85.85</td>
<td align="center">12.23</td>
<td align="center">1.92</td>
<td align="center">85.51</td>
<td align="center">11.48</td>
<td align="center">3.01</td>
<td align="center">54.95</td>
<td align="center">24.21</td>
<td align="center">20.84</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.01</td>
<td align="center">0.00</td>
<td align="center">99.99</td>
<td align="center">90.91</td>
<td align="center">8.09</td>
<td align="center">1.01</td>
<td align="center">50.43</td>
<td align="center">14.99</td>
<td align="center">34.58</td>
</tr>
<tr>
<td colspan="10" align="left">
<bold>60&#xa0;min prediction horizon:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">85.05</td>
<td align="center">12.30</td>
<td align="center">2.65</td>
<td align="center">79.86</td>
<td align="center">10.59</td>
<td align="center">9.55</td>
<td align="center">45.73</td>
<td align="center">18.52</td>
<td align="center">35.75</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.00</td>
<td align="center">0.01</td>
<td align="center">99.99</td>
<td align="center">90.57</td>
<td align="center">8.39</td>
<td align="center">1.03</td>
<td align="center">52.37</td>
<td align="center">16.08</td>
<td align="center">31.55</td>
</tr>
<tr>
<td colspan="10" align="left">
<bold>90&#xa0;min prediction horizon:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">78.01</td>
<td align="center">9.41</td>
<td align="center">12.58</td>
<td align="center">79.65</td>
<td align="center">10.16</td>
<td align="center">10.19</td>
<td align="center">43.18</td>
<td align="center">12.36</td>
<td align="center">44.46</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.00</td>
<td align="center">0.01</td>
<td align="center">99.99</td>
<td align="center">89.83</td>
<td align="center">8.74</td>
<td align="center">1.43</td>
<td align="center">56.35</td>
<td align="center">12.58</td>
<td align="center">31.07</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="T8" position="float">
<label>TABLE 8</label>
<caption>
<p>Average PRED-EGA scores (in percent) for different prediction horizons on <bold>dataset J</bold>, with <bold>training data selected from dataset D</bold>.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="3" align="left"/>
<th colspan="3" align="center">Hypoglycemia:</th>
<th colspan="3" align="center">Euglycemia:</th>
<th colspan="3" align="center">Hyperglycemia:</th>
</tr>
<tr>
<th colspan="3" align="center">BG <inline-formula id="inf89">
<mml:math id="m106">
<mml:mrow>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>70</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
<th colspan="3" align="center">BG <inline-formula id="inf90">
<mml:math id="m107">
<mml:mrow>
<mml:mn>70</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
<th colspan="3" align="center">BG <inline-formula id="inf91">
<mml:math id="m108">
<mml:mrow>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>180</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (mg/dl)</th>
</tr>
<tr>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
<th align="center">Acc.</th>
<th align="center">Benign</th>
<th align="center">Error</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td colspan="10" align="left">
<bold>30&#xa0;min prediction horizon:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">82.18</td>
<td align="center">17.59</td>
<td align="center">0.23</td>
<td align="center">79.72</td>
<td align="center">14.04</td>
<td align="center">6.24</td>
<td align="center">74.19</td>
<td align="center">16.30</td>
<td align="center">9.51</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.01</td>
<td align="center">0.00</td>
<td align="center">99.99</td>
<td align="center">89.16</td>
<td align="center">9.44</td>
<td align="center">1.40</td>
<td align="center">60.47</td>
<td align="center">4.62</td>
<td align="center">34.91</td>
</tr>
<tr>
<td colspan="10" align="left">
<bold>60&#xa0;min prediction horizon:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">88.08</td>
<td align="center">10.07</td>
<td align="center">1.85</td>
<td align="center">73.50</td>
<td align="center">14.41</td>
<td align="center">12.09</td>
<td align="center">63.90</td>
<td align="center">11.64</td>
<td align="center">24.46</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.05</td>
<td align="center">0.01</td>
<td align="center">94.94</td>
<td align="center">89.79</td>
<td align="center">9.05</td>
<td align="center">1.16</td>
<td align="center">60.94</td>
<td align="center">4.20</td>
<td align="center">34.86</td>
</tr>
<tr>
<td colspan="10" align="left">
<bold>90&#xa0;min prediction horizon:</bold>
</td>
</tr>
<tr>
<td align="left">&#x2003;Our method</td>
<td align="center">74.79</td>
<td align="center">10.36</td>
<td align="center">14.85</td>
<td align="center">67.83</td>
<td align="center">13.20</td>
<td align="center">18.97</td>
<td align="center">57.70</td>
<td align="center">10.55</td>
<td align="center">31.75</td>
</tr>
<tr>
<td align="left">&#x2003;Matlab DL Toolbox</td>
<td align="center">0.09</td>
<td align="center">0.14</td>
<td align="center">99.77</td>
<td align="center">89.38</td>
<td align="center">9.38</td>
<td align="center">1.24</td>
<td align="center">58.85</td>
<td align="center">4.98</td>
<td align="center">36.17</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>
<xref ref-type="fig" rid="F5">Figures 5</xref>, <xref ref-type="fig" rid="F6">6</xref> display box plots for the 100 trials for the methods dependent on training data selection (that is, our current method, the Deep Learning Toolbox and the 2017 diffusion geometry approach) and prediction windows using data sets D and J, respectively. Our method performs fairly consistently over different trials.</p>
<fig id="F5" position="float">
<label>FIGURE 5</label>
<caption>
<p>Boxplot for the 100 experiments conducted with 50% training data for each prediction method (O &#x3d; our method, M &#x3d; MATLAB Deep Learning Toolbox, D &#x3d; diffusion geometry approach) with a 30&#xa0;min (<bold>top</bold>), 60&#xa0;min (<bold>middle</bold>) and 90&#xa0;min (<bold>bottom</bold>) prediction horizon and dataset D. Each of the graphs show the percentage accurate predictions in the hypoglycemic range (<bold>left</bold>), euglycemic range (<bold>middle</bold>) and hyperglycemic range (<bold>right</bold>).</p>
</caption>
<graphic xlink:href="fams-07-707884-g005.tif"/>
</fig>
<fig id="F6" position="float">
<label>FIGURE 6</label>
<caption>
<p>Boxplot for the 100 experiments conducted with 50% training data for each prediction method (O &#x3d; our method, M &#x3d; MATLAB Deep Learning Toolbox, D &#x3d; diffusion geometry approach) with a 30&#xa0;min (<bold>top</bold>), 60&#xa0;min (<bold>middle</bold>) and 90&#xa0;min (<bold>bottom</bold>) prediction horizon and dataset J.&#x20;Each of the graphs show the percentage accurate predictions in the hypoglycemic range (<bold>left</bold>), euglycemic range (<bold>middle</bold>) and hyperglycemic range (<bold>right</bold>).</p>
</caption>
<graphic xlink:href="fams-07-707884-g006.tif"/>
</fig>
</sec>
<sec id="s6">
<title>6 Conclusion</title>
<p>In this paper, we demonstrate a direct method to approximate functions on unknown manifolds [<xref ref-type="bibr" rid="B7">7</xref>] in the context of BG prediction for diabetes management. The results are evaluated using the state-of-the-art PRED-EGA grid [<xref ref-type="bibr" rid="B14">14</xref>]. Unlike classical manifold learning, our method yields a model for the BG prediction on data not seen during training, even for test data which is drawn from a different distribution from the training data. Our method outperforms other methods in the literature in 30, 60, and 90&#xa0;min predictions in the hypoglycemic and hyperglycemic BG ranges, and is especially useful for BG prediction for patients that are not included in the training&#x20;set.</p>
</sec>
</body>
<back>
<sec id="s7">
<title>Data Availability Statement</title>
<p>Publicly available datasets were analyzed in this study. This data can be found here: <ext-link ext-link-type="uri" xlink:href="http://direcnet.jaeb.org/Studies.aspx">http://direcnet.jaeb.org/Studies.aspx</ext-link>.</p>
</sec>
<sec id="s8">
<title>Author Contributions</title>
<p>All authors listed have made a substantial, direct, and intellectual contribution to the work and approved it for publication.</p>
</sec>
<sec id="s9">
<title>Funding</title>
<p>The research of HM is supported in part by NSF grant DMS 2012355 and ARO grant W911NF2110218. The research by SP has been partly supported by BMK, BMDW, and the Province of Upper Austria in the frame of the COMET Programme managed by FFG in the COMET Module&#x20;S3AI.</p>
</sec>
<sec sec-type="COI-statement" id="s10">
<title>Conflict of Interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="disclaimer" id="s11">
<title>Publisher&#x2019;s Note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<ack>
<p>The authors would like to thank Professor Sampath Sivananthan at the Indian Institute of Technology, Delhi, India for providing us with the code used in <xref ref-type="bibr" rid="B10">[10]</xref> for the FARL approach.</p>
</ack>
<ref-list>
<title>References</title>
<ref id="B1">
<label>1.</label>
<citation citation-type="web">
<collab>DirecNet Central Laboratory</collab> (<year>2005</year>). <comment>Available at: <ext-link ext-link-type="uri" xlink:href="http://direcnet.jaeb.org/Studies.aspx">http://direcnet.jaeb.org/Studies.aspx</ext-link>
</comment> (<comment>Accessed January 1, 2021</comment>).</citation>
</ref>
<ref id="B2">
<label>2.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Clarke</surname>
<given-names>WL</given-names>
</name>
<name>
<surname>Cox</surname>
<given-names>D</given-names>
</name>
<name>
<surname>Gonder-Frederick</surname>
<given-names>L. A</given-names>
</name>
<name>
<surname>Carter</surname>
<given-names>W</given-names>
</name>
<name>
<surname>Pohl</surname>
<given-names>S. L</given-names>
</name>
</person-group>. <article-title>Evaluating Clinical Accuracy of Systems for Self-Monitoring of Blood Glucose</article-title>. <source>Diabetes care</source> (<year>1987</year>) <volume>10</volume>(<issue>5</issue>):<fpage>622</fpage>&#x2013;<lpage>8</lpage>. <pub-id pub-id-type="doi">10.2337/diacare.10.5.622</pub-id> </citation>
</ref>
<ref id="B3">
<label>3.</label>
<citation citation-type="book">
<collab>Centers for Disease Control, Prevention</collab>. <source>National Diabetes Statistics Report</source>. <publisher-loc>Atlanta, GA</publisher-loc>: <publisher-name>Centers for Disease Control and Prevention, US Department of Health and Human Services</publisher-name> (<year>2020</year>). p. <fpage>12</fpage> <comment>15</comment>.</citation>
</ref>
<ref id="B4">
<label>4.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hayes</surname>
<given-names>AC</given-names>
</name>
<name>
<surname>Mastrototaro</surname>
<given-names>J.&#x20;J</given-names>
</name>
<name>
<surname>Moberg</surname>
<given-names>SB</given-names>
</name>
<name>
<surname>Mueller</surname>
<given-names>JC</given-names>
<suffix>Jr</suffix>
</name>
<name>
<surname>Clark</surname>
<given-names>HB</given-names>
</name>
<name>
<surname>Tolle</surname>
<given-names>MCV</given-names>
</name>
<etal/>
</person-group> <article-title>Algorithm Sensor Augmented Bolus Estimator for Semi-closed Loop Infusion System</article-title>. <source>US Patent</source> (<year>2009</year>) <volume>7</volume>(<issue>547</issue>):<fpage>281</fpage>. <comment>June 16. Available at: <ext-link ext-link-type="uri" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://patents.google.com/patent/US20060173406A1/en">https://patents.google.com/patent/US20060173406A1/en</ext-link>
</comment> </citation>
</ref>
<ref id="B5">
<label>5.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Jung</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Lee</surname>
<given-names>Y-B</given-names>
</name>
<name>
<surname>Jin</surname>
<given-names>S-M</given-names>
</name>
<name>
<surname>Park</surname>
<given-names>S-M</given-names>
</name>
</person-group>. <article-title>Prediction of Daytime Hypoglycemic Events Using Continuous Glucose Monitoring Data and Classification Technique</article-title>. <comment>arXiv preprint arXiv:1704.08769</comment>, <year>2017</year>. </citation>
</ref>
<ref id="B6">
<label>6.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mhaskar</surname>
<given-names>HN</given-names>
</name>
<name>
<surname>Naumova</surname>
<given-names>V</given-names>
</name>
<name>
<surname>Pereverzyev</surname>
<given-names>SV</given-names>
</name>
</person-group>. <article-title>Filtered Legendre Expansion Method for Numerical Differentiation at the Boundary point with Application to Blood Glucose Predictions</article-title>. <source>Appl Maths Comput</source> (<year>2013</year>) <volume>224</volume>:<fpage>835</fpage>&#x2013;<lpage>47</lpage>. <pub-id pub-id-type="doi">10.1016/j.amc.2013.09.015</pub-id> </citation>
</ref>
<ref id="B7">
<label>7.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Mhaskar</surname>
<given-names>H</given-names>
</name>
</person-group>. <source>Deep Gaussian Networks for Function Approximation on Data Defined Manifolds</source> (<year>2019</year>). <comment>arXiv preprint arXiv:1908.00156</comment>.</citation>
</ref>
<ref id="B8">
<label>8.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mhaskar</surname>
<given-names>HN</given-names>
</name>
<name>
<surname>Sergei</surname>
<given-names>V</given-names>
</name>
<name>
<surname>Mariavan der Walt</surname>
<given-names>D</given-names>
</name>
</person-group>. <article-title>A Deep Learning Approach to Diabetic Blood Glucose Prediction</article-title>. <source>Front Appl Maths Stat</source> (<year>2017</year>) <volume>3</volume>(<issue>14</issue>). <pub-id pub-id-type="doi">10.3389/fams.2017.00014</pub-id> <comment>Pereverzyev</comment>. </citation>
</ref>
<ref id="B9">
<label>9.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mujahid</surname>
<given-names>O</given-names>
</name>
<name>
<surname>Contreras</surname>
<given-names>I</given-names>
</name>
<name>
<surname>Vehi</surname>
<given-names>J</given-names>
</name>
</person-group>. <article-title>Machine Learning Techniques for Hypoglycemia Prediction: Trends and Challenges</article-title>. <source>Sensors</source> (<year>2021</year>) <volume>21</volume>(<issue>2</issue>):<fpage>546</fpage>. <pub-id pub-id-type="doi">10.3390/s21020546</pub-id> </citation>
</ref>
<ref id="B10">
<label>10.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Naumova</surname>
<given-names>V</given-names>
</name>
<name>
<surname>Pereverzyev</surname>
<given-names>SV</given-names>
</name>
<name>
<surname>Sivananthan</surname>
<given-names>S</given-names>
</name>
</person-group>. <article-title>A Meta-Learning Approach to the Regularized Learning-Case Study: Blood Glucose Prediction</article-title>. <source>Neural Networks</source> (<year>2012</year>) <volume>33</volume>:<fpage>181</fpage>&#x2013;<lpage>93</lpage>. <pub-id pub-id-type="doi">10.1016/j.neunet.2012.05.004</pub-id> </citation>
</ref>
<ref id="B11">
<label>11.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Pappada</surname>
<given-names>SM</given-names>
</name>
<name>
<surname>Cameron</surname>
<given-names>BD</given-names>
</name>
<name>
<surname>Rosman</surname>
<given-names>PM</given-names>
</name>
<name>
<surname>Bourey</surname>
<given-names>RE</given-names>
</name>
<name>
<surname>Papadimos</surname>
<given-names>TJ</given-names>
</name>
<name>
<surname>Olorunto</surname>
<given-names>W</given-names>
</name>
<etal/>
</person-group> <article-title>Neural Network-Based Real-Time Prediction of Glucose in Patients with Insulin-dependent Diabetes</article-title>. <source>Diabetes Tech Ther</source> (<year>2011</year>) <volume>13</volume>(<issue>2</issue>):<fpage>135</fpage>&#x2013;<lpage>41</lpage>. <pub-id pub-id-type="doi">10.1089/dia.2010.0104</pub-id> </citation>
</ref>
<ref id="B12">
<label>12.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Reifman</surname>
<given-names>J</given-names>
</name>
<name>
<surname>Rajaraman</surname>
<given-names>S</given-names>
</name>
<name>
<surname>Gribok</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Ward</surname>
<given-names>WK</given-names>
</name>
</person-group>. <article-title>Predictive Monitoring for Improved Management of Glucose Levels</article-title>. <source>J&#x20;Diabetes Sci Technol</source> (<year>2007</year>) <volume>1</volume>(<issue>4</issue>):<fpage>478</fpage>&#x2013;<lpage>86</lpage>. <pub-id pub-id-type="doi">10.1177/193229680700100405</pub-id> </citation>
</ref>
<ref id="B13">
<label>13.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Seo</surname>
<given-names>W</given-names>
</name>
<name>
<surname>Lee</surname>
<given-names>YB</given-names>
</name>
<name>
<surname>Lee</surname>
<given-names>S</given-names>
</name>
<name>
<surname>Jin</surname>
<given-names>SM</given-names>
</name>
<name>
<surname>Park</surname>
<given-names>SM</given-names>
</name>
</person-group>. <article-title>A Machine-Learning Approach to Predict Postprandial Hypoglycemia</article-title>. <source>BMC Med Inform Decis Mak</source> (<year>2019</year>) <volume>19</volume>(<issue>1</issue>):<fpage>210</fpage>&#x2013;<lpage>3</lpage>. <pub-id pub-id-type="doi">10.1186/s12911-019-0943-4</pub-id> </citation>
</ref>
<ref id="B14">
<label>14.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sivananthan</surname>
<given-names>S</given-names>
</name>
<name>
<surname>Naumova</surname>
<given-names>V</given-names>
</name>
<name>
<surname>Man</surname>
<given-names>CD</given-names>
</name>
<name>
<surname>Facchinetti</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Renard</surname>
<given-names>E</given-names>
</name>
<name>
<surname>Cobelli</surname>
<given-names>C</given-names>
</name>
<etal/>
</person-group> <article-title>Assessment of Blood Glucose Predictors: the Prediction-Error Grid Analysis</article-title>. <source>Diabetes Tech Ther</source> (<year>2011</year>) <volume>13</volume>(<issue>8</issue>):<fpage>787</fpage>&#x2013;<lpage>96</lpage>. <pub-id pub-id-type="doi">10.1089/dia.2011.0033</pub-id> </citation>
</ref>
<ref id="B15">
<label>15.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sparacino</surname>
<given-names>G</given-names>
</name>
<name>
<surname>Zanderigo</surname>
<given-names>F</given-names>
</name>
<name>
<surname>Corazza</surname>
<given-names>S</given-names>
</name>
<name>
<surname>Maran</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Facchinetti</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Cobelli</surname>
<given-names>C</given-names>
</name>
</person-group>. <article-title>Glucose Concentration Can Be Predicted Ahead in Time from Continuous Glucose Monitoring Sensor Time-Series</article-title>. <source>IEEE Trans Biomed Eng</source> (<year>2007</year>) <volume>54</volume>(<issue>5</issue>):<fpage>931</fpage>&#x2013;<lpage>7</lpage>. <pub-id pub-id-type="doi">10.1109/tbme.2006.889774</pub-id> </citation>
</ref>
<ref id="B16">
<label>16.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Reza Vahedi</surname>
<given-names>M</given-names>
</name>
<name>
<surname>MacBride</surname>
<given-names>KB</given-names>
</name>
<name>
<surname>Woo</surname>
<given-names>W</given-names>
</name>
<name>
<surname>Kim</surname>
<given-names>Y</given-names>
</name>
<name>
<surname>Fong</surname>
<given-names>C</given-names>
</name>
<name>
<surname>Padilla</surname>
<given-names>AJ</given-names>
</name>
<etal/>
</person-group> &#x201c;<article-title>Predicting Glucose Levels in Patients with Type1 Diabetes Based on Physiological and Activity Data</article-title>,&#x201d; In <source>Proceedings of the 8th ACM MobiHoc 2018 Workshop on Pervasive Wireless Healthcare Workshop</source> (<year>2018</year>). p. <fpage>1</fpage>&#x2013;<lpage>5</lpage>. <pub-id pub-id-type="doi">10.1145/3220127.3220133</pub-id> </citation>
</ref>
<ref id="B17">
<label>17.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Zhu</surname>
<given-names>T</given-names>
</name>
<name>
<surname>Li</surname>
<given-names>K</given-names>
</name>
<name>
<surname>Chen</surname>
<given-names>J</given-names>
</name>
<name>
<surname>Herrero</surname>
<given-names>P</given-names>
</name>
<name>
<surname>Georgiou</surname>
<given-names>P</given-names>
</name>
</person-group>. <article-title>Dilated Recurrent Neural Networks for Glucose Forecasting in Type 1 Diabetes</article-title>. <source>J&#x20;Healthc Inform Res</source> (<year>2020</year>) <volume>4</volume>(<issue>3</issue>):<fpage>308</fpage>&#x2013;<lpage>24</lpage>. <pub-id pub-id-type="doi">10.1007/s41666-020-00068-2</pub-id> </citation>
</ref>
</ref-list>
<app-group>
<app id="app1">
<title>Appendix</title>
<sec>
<title>A Theoretical aspects</title>
<p>In this section, we describe the theoretical background behind the estimator <inline-formula id="inf92">
<mml:math id="m109">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>F</mml:mi>
<mml:mo>&#x5e;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mtext>&#x393;</mml:mtext>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> used in this paper to predict the BG level. We focus only on the essential definitions, referring to [<xref ref-type="bibr" rid="B7">7</xref>] for details.</p>
<p>Let <inline-formula id="inf93">
<mml:math id="m110">
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mo>&#x2265;</mml:mo>
<mml:mi>q</mml:mi>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> be integers, <inline-formula id="inf94">
<mml:math id="m111">
<mml:mi mathvariant="double-struck">X</mml:mi>
</mml:math>
</inline-formula> be a <italic>q</italic> dimensional, compact, connected, sub-manifold of <inline-formula id="inf95">
<mml:math id="m112">
<mml:mrow>
<mml:msup>
<mml:mi mathvariant="normal">&#x211d;</mml:mi>
<mml:mi>d</mml:mi>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula> (without boundary), with geodesic distance &#x3c1; and volume measure <inline-formula id="inf96">
<mml:math id="m113">
<mml:mrow>
<mml:msup>
<mml:mi>&#x3bc;</mml:mi>
<mml:mtext>&#x2a;</mml:mtext>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>, normalized so that <inline-formula id="inf97">
<mml:math id="m114">
<mml:mrow>
<mml:msup>
<mml:mi>&#x3bc;</mml:mi>
<mml:mtext>&#x2a;</mml:mtext>
</mml:msup>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>. The operator <inline-formula id="inf98">
<mml:math id="m115">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>F</mml:mi>
<mml:mo>&#x5e;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> does not require any knowledge of the manifold other than <italic>q</italic>. Our construction is based on the classical Hermite polynomials which are best introduced by the recurrence relations (<xref ref-type="disp-formula" rid="equ18">A.1</xref>). The orthonormalized Hermite polynomial <inline-formula id="inf99">
<mml:math id="m116">
<mml:mrow>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mi>k</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> of degree <italic>k</italic> is defined recursively by<disp-formula id="equ18">
<mml:math id="m117">
<mml:mrow>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mi>k</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:msqrt>
<mml:mrow>
<mml:mfrac>
<mml:mn>2</mml:mn>
<mml:mi>k</mml:mi>
</mml:mfrac>
</mml:mrow>
</mml:msqrt>
<mml:mi>x</mml:mi>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:msqrt>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mi>k</mml:mi>
</mml:mfrac>
</mml:mrow>
</mml:msqrt>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mi>k</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>2,3</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="eA_1">
<mml:math id="m118">
<mml:mrow>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>0</mml:mn>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:msup>
<mml:mi>&#x3c0;</mml:mi>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>/</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2009;</mml:mtext>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mn>1</mml:mn>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:msqrt>
<mml:mn>2</mml:mn>
</mml:msqrt>
<mml:msup>
<mml:mi>&#x3c0;</mml:mi>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>/</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mi>x</mml:mi>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
<label>(A.1)</label>
</disp-formula>We write<disp-formula id="equ19">
<mml:math id="m119">
<mml:mrow>
<mml:msub>
<mml:mi>&#x3c8;</mml:mi>
<mml:mi>k</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mi>k</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mtext>exp</mml:mtext>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:msup>
<mml:mi>x</mml:mi>
<mml:mn>2</mml:mn>
</mml:msup>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mi>x</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="normal">&#x211d;</mml:mi>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2009;</mml:mtext>
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">&#x2124;</mml:mi>
<mml:mo>&#x2b;</mml:mo>
</mml:msub>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>The functions <inline-formula id="inf100">
<mml:math id="m120">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>&#x3c8;</mml:mi>
<mml:mi>k</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mi>&#x221e;</mml:mi>
</mml:msubsup>
</mml:mrow>
</mml:math>
</inline-formula> are an orthonormal set with respect to the Lebesgue measure:<disp-formula id="equ20">
<mml:math id="m121">
<mml:mrow>
<mml:munder>
<mml:mstyle displaystyle="true">
<mml:mo>&#x222b;</mml:mo>
</mml:mstyle>
<mml:mi mathvariant="normal">&#x211d;</mml:mi>
</mml:munder>
<mml:msub>
<mml:mi>&#x3c8;</mml:mi>
<mml:mi>k</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:msub>
<mml:mi>&#x3c8;</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mi>d</mml:mi>
<mml:mi>x</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>&#xa0;if&#xa0;</mml:mtext>
<mml:mi>k</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>j</mml:mi>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>&#xa0;otherwise</mml:mtext>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:math>
</disp-formula>In the sequel, we fix an infinitely differentiable function <inline-formula id="inf101">
<mml:math id="m122">
<mml:mrow>
<mml:mi>H</mml:mi>
<mml:mo>:</mml:mo>
<mml:mo>[</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mi>&#x221e;</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, such that <inline-formula id="inf102">
<mml:math id="m123">
<mml:mrow>
<mml:mi>H</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> if <inline-formula id="inf103">
<mml:math id="m124">
<mml:mrow>
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>, and <inline-formula id="inf104">
<mml:math id="m125">
<mml:mrow>
<mml:mi>H</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> if <inline-formula id="inf105">
<mml:math id="m126">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>. We define for <inline-formula id="inf106">
<mml:math id="m127">
<mml:mrow>
<mml:mi>x</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="normal">&#x211d;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, <inline-formula id="inf107">
<mml:math id="m128">
<mml:mrow>
<mml:mi>m</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">&#x2124;</mml:mi>
<mml:mo>&#x2b;</mml:mo>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>:<disp-formula id="equ21">
<mml:math id="m129">
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="script">P</mml:mi>
<mml:mrow>
<mml:mi>m</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>q</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:msup>
<mml:mi>&#x3c0;</mml:mi>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>/</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msup>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mi>m</mml:mi>
</mml:msup>
<mml:mfrac>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>m</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>!</mml:mo>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mn>2</mml:mn>
<mml:mi>m</mml:mi>
</mml:msup>
<mml:mi>m</mml:mi>
<mml:mo>!</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:msub>
<mml:mi>&#x3c8;</mml:mi>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>m</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>&#xa0;if&#xa0;</mml:mtext>
<mml:mi>q</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mrow>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mrow>
<mml:msup>
<mml:mi>&#x3c0;</mml:mi>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>q</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>/</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mtext>&#x393;</mml:mtext>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mfrac>
<mml:munderover>
<mml:mstyle displaystyle="true">
<mml:mo>&#x2211;</mml:mo>
</mml:mstyle>
<mml:mrow>
<mml:mi>&#x2113;</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mi>m</mml:mi>
</mml:munderover>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mi>&#x2113;</mml:mi>
</mml:msup>
<mml:mfrac>
<mml:mrow>
<mml:mtext>&#x393;</mml:mtext>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>m</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x2113;</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>m</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x2113;</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>!</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mfrac>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>&#x2113;</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>!</mml:mo>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mn>2</mml:mn>
<mml:mi>&#x2113;</mml:mi>
</mml:msup>
<mml:mi>&#x2113;</mml:mi>
<mml:mo>!</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:msub>
<mml:mi>&#x3c8;</mml:mi>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>&#x2113;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
<mml:mtd>
<mml:mrow>
<mml:mtext>&#xa0;if&#xa0;</mml:mtext>
<mml:mi>q</mml:mi>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:math>
</disp-formula>and the kernel <inline-formula id="inf108">
<mml:math id="m130">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mtext>&#x3a6;</mml:mtext>
<mml:mo>&#x2dc;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>q</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> for <inline-formula id="inf109">
<mml:math id="m131">
<mml:mrow>
<mml:mi>x</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="normal">&#x211d;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, <inline-formula id="inf110">
<mml:math id="m132">
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mi mathvariant="normal">&#x2124;</mml:mi>
<mml:mo>&#x2b;</mml:mo>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> by<disp-formula id="equ22">
<mml:math id="m133">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mtext>&#x3a6;</mml:mtext>
<mml:mo>&#x2dc;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>q</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:munderover>
<mml:mstyle displaystyle="true">
<mml:mo>&#x2211;</mml:mo>
</mml:mstyle>
<mml:mrow>
<mml:mi>m</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mrow>
<mml:mo>&#x230a;</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mi>n</mml:mi>
<mml:mn>2</mml:mn>
</mml:msup>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mo>&#x230b;</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:munderover>
<mml:mi>H</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>m</mml:mi>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
<mml:mi>n</mml:mi>
</mml:mfrac>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:msub>
<mml:mi mathvariant="script">P</mml:mi>
<mml:mrow>
<mml:mi>m</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>q</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>We assume here a noisy data of the form <inline-formula id="inf111">
<mml:math id="m134">
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold">y</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="italic">&#x3f5;</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, with a joint probability distribution &#x3c4; and assume further that the marginal distribution of <inline-formula id="inf112">
<mml:math id="m135">
<mml:mi mathvariant="bold">y</mml:mi>
</mml:math>
</inline-formula> with respect to &#x3c4; has the form <inline-formula id="inf113">
<mml:math id="m136">
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:msup>
<mml:mi>&#x3bd;</mml:mi>
<mml:mtext>&#x2a;</mml:mtext>
</mml:msup>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mn>0</mml:mn>
</mml:msub>
<mml:mi>d</mml:mi>
<mml:msup>
<mml:mi>&#x3bc;</mml:mi>
<mml:mtext>&#x2a;</mml:mtext>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula> for some <inline-formula id="inf114">
<mml:math id="m137">
<mml:mrow>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mn>0</mml:mn>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>. In place of <inline-formula id="inf115">
<mml:math id="m138">
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi mathvariant="bold">y</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, we consider a noisy variant <inline-formula id="inf116">
<mml:math id="m139">
<mml:mrow>
<mml:mi mathvariant="normal">&#x2131;</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold">y</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="italic">&#x3f5;</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, and denote<disp-formula id="eA_2">
<mml:math id="m140">
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi mathvariant="bold">y</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mi mathvariant="double-struck">E</mml:mi>
<mml:mi>&#x3c4;</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="normal">&#x2131;</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold">y</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="italic">&#x2208;</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x7c;</mml:mo>
<mml:mi mathvariant="bold">y</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
<label>(A.2)</label>
</disp-formula>
</p>
</sec>
<sec>
<title>Remark A.1</title>
<p>In practice, the data may not lie on a manifold, but it is reasonable to assume that it lies on a tubular neighborhood of the manifold. Our notation accommodates this - if <inline-formula id="inf117">
<mml:math id="m141">
<mml:mi mathvariant="bold">z</mml:mi>
</mml:math>
</inline-formula> is a point in a neighborhood of <inline-formula id="inf118">
<mml:math id="m142">
<mml:mi mathvariant="double-struck">X</mml:mi>
</mml:math>
</inline-formula>, we may view it as a perturbation of a point <inline-formula id="inf119">
<mml:math id="m143">
<mml:mrow>
<mml:mi mathvariant="bold">y</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="double-struck">X</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, so that the noisy value of the target function is <inline-formula id="inf120">
<mml:math id="m144">
<mml:mrow>
<mml:mi mathvariant="normal">&#x2131;</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold">y</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="italic">&#x3f5;</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, where &#x3f5; encapsulate the noise in both the <inline-formula id="inf121">
<mml:math id="m145">
<mml:mi mathvariant="bold">y</mml:mi>
</mml:math>
</inline-formula> variable and the value of the target function.<inline-formula id="inf122">
<mml:math id="m146">
<mml:mi mathvariant="normal">&#x25a0;</mml:mi>
</mml:math>
</inline-formula>
</p>
<p>
<list list-type="simple">
<list-item>
<p>Our approximation process is simple: given by</p>
</list-item>
</list>
<disp-formula id="eA_3">
<mml:math id="m147">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>F</mml:mi>
<mml:mo>&#x5e;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>Y</mml:mi>
<mml:mo>;</mml:mo>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>:</mml:mo>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mi>n</mml:mi>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mi>M</mml:mi>
</mml:mfrac>
<mml:munderover>
<mml:mstyle displaystyle="true">
<mml:mo>&#x2211;</mml:mo>
</mml:mstyle>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mi>M</mml:mi>
</mml:munderover>
<mml:mi mathvariant="normal">&#x2131;</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="italic">&#x3f5;</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mtext>&#x3a6;</mml:mtext>
<mml:mo>&#x2dc;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>q</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mi>n</mml:mi>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>&#x7c;</mml:mo>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mi mathvariant="bold">y</mml:mi>
<mml:mi>j</mml:mi>
</mml:msub>
<mml:msub>
<mml:mo>&#x7c;</mml:mo>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo>,</mml:mo>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mi mathvariant="normal">&#x211d;</mml:mi>
<mml:mi>d</mml:mi>
</mml:msup>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
<label>(A.3)</label>
</disp-formula>where <inline-formula id="inf123">
<mml:math id="m148">
<mml:mrow>
<mml:mn>0</mml:mn>
<mml:mo>&#x3c;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
<p>The theoretical underpinning of our method is described by Theorem A.1, and in particular, by Corollary A.1, describing the convergence properties of the estimator. In order to state these results, we need a smoothness class <inline-formula id="inf124">
<mml:math id="m149">
<mml:mrow>
<mml:msub>
<mml:mi>W</mml:mi>
<mml:mi>&#x3b3;</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, representing the assumptions necessary to guarantee the rate of convergence of our estimator to the target function. It is beyond the scope of this paper to describe the details of this smoothness class; an interested reader will find them in [<xref ref-type="bibr" rid="B7">7</xref>]. We note that the definition of the estimator in <xref ref-type="disp-formula" rid="eA_3">(A.3)</xref> is <italic>universal</italic>, and does not require any assumptions. The assumptions are needed only to gurantee the right rates of convergence.</p>
</sec>
<sec>
<title>Theorem A.1</title>
<p>
<italic>Let</italic> <inline-formula id="inf125">
<mml:math id="m150">
<mml:mrow>
<mml:mi>&#x3b3;</mml:mi>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
<italic>,</italic> &#x3c4; <italic>be a probability distribution on</italic> <inline-formula id="inf126">
<mml:math id="m151">
<mml:mrow>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>&#xd7;</mml:mo>
<mml:mtext>&#x3a9;</mml:mtext>
</mml:mrow>
</mml:math>
</inline-formula> <italic>for some sample space</italic> <inline-formula id="inf127">
<mml:math id="m152">
<mml:mtext>&#x3a9;</mml:mtext>
</mml:math>
</inline-formula> <italic>such the marginal distribution of</italic> &#x3c4; <italic>restricted to</italic> <inline-formula id="inf128">
<mml:math id="m153">
<mml:mi mathvariant="double-struck">X</mml:mi>
</mml:math>
</inline-formula> <italic>is absolutely continuous with respect to</italic> <inline-formula id="inf129">
<mml:math id="m154">
<mml:mrow>
<mml:msup>
<mml:mi>&#x3bc;</mml:mi>
<mml:mtext>&#x2a;</mml:mtext>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula> <italic>with density</italic> <inline-formula id="inf130">
<mml:math id="m155">
<mml:mrow>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mn>0</mml:mn>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mi>W</mml:mi>
<mml:mi>&#x3b3;</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>
<italic>. We assume that</italic>
</p>
<p>
<disp-formula id="equ23">
<mml:math id="m156">
<mml:mrow>
<mml:munder>
<mml:mrow>
<mml:mtext>sup</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>r</mml:mi>
<mml:mo>&#x3e;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:munder>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mi>&#x3bc;</mml:mi>
<mml:mtext>&#x2a;</mml:mtext>
</mml:msup>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="double-struck">B</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mi>r</mml:mi>
<mml:mi>q</mml:mi>
</mml:msup>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2264;</mml:mo>
<mml:mi>c</mml:mi>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<italic>Let </italic>
<inline-formula id="inf131">
<mml:math id="m157">
<mml:mrow>
<mml:mi mathvariant="normal">&#x2131;</mml:mi>
<mml:mo>:</mml:mo>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>&#xd7;</mml:mo>
<mml:mtext>&#x3a9;</mml:mtext>
<mml:mo>&#x2192;</mml:mo>
<mml:mi mathvariant="normal">&#x211d;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
<italic> be a bounded function, f defined by <xref ref-type="disp-formula" rid="eA_2">(A.2)</xref> be in </italic>
<inline-formula id="inf132">
<mml:math id="m158">
<mml:mrow>
<mml:msub>
<mml:mi>W</mml:mi>
<mml:mi>&#x3b3;</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>
<italic>, the probability density </italic>
<inline-formula id="inf133">
<mml:math id="m159">
<mml:mrow>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mn>0</mml:mn>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mi>W</mml:mi>
<mml:mi>&#x3b3;</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>
<italic>. Let </italic>
<inline-formula id="inf134">
<mml:math id="m160">
<mml:mrow>
<mml:mi>M</mml:mi>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
<italic>, </italic>
<inline-formula id="inf135">
<mml:math id="m161">
<mml:mrow>
<mml:mi>Y</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>{</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi mathvariant="bold">y</mml:mi>
<mml:mn>1</mml:mn>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="italic">&#x3f5;</mml:mi>
<mml:mn>1</mml:mn>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mi>y</mml:mi>
<mml:mi>M</mml:mi>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mi mathvariant="italic">&#x3f5;</mml:mi>
<mml:mi>M</mml:mi>
</mml:msub>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>}</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>
<italic> be a set of random samples chosen i.i.d. from </italic>&#x3c4;.<italic> If</italic>
<disp-formula id="equ24">
<mml:math id="m162">
<mml:mrow>
<mml:mn>0</mml:mn>
<mml:mo>&#x3c;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x3c;</mml:mo>
<mml:mfrac>
<mml:mn>4</mml:mn>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mtext>&#x2003;</mml:mtext>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<italic>then for every </italic>
<inline-formula id="inf136">
<mml:math id="m163">
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
<italic>, </italic>
<inline-formula id="inf137">
<mml:math id="m164">
<mml:mrow>
<mml:mn>0</mml:mn>
<mml:mo>&#x3c;</mml:mo>
<mml:mi>&#x3b4;</mml:mi>
<mml:mo>&#x3c;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
<italic> and </italic>
<inline-formula id="inf138">
<mml:math id="m165">
<mml:mrow>
<mml:mi>M</mml:mi>
<mml:mo>&#x2265;</mml:mo>
<mml:msup>
<mml:mi>n</mml:mi>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>&#x3b1;</mml:mi>
<mml:mi>&#x3b3;</mml:mi>
</mml:mrow>
</mml:msup>
<mml:msqrt>
<mml:mrow>
<mml:mtext>log</mml:mtext>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>/</mml:mo>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
</mml:math>
</inline-formula>
<italic>, we have with </italic>&#x3c4;<italic>-probability </italic>
<inline-formula id="inf139">
<mml:math id="m166">
<mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
<italic>:</italic>
<disp-formula id="equ25">
<mml:math id="m167">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo>&#x2016;</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>F</mml:mi>
<mml:mo>&#x5e;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>Y</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>f</mml:mi>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mn>0</mml:mn>
</mml:msub>
</mml:mrow>
<mml:mo>&#x2016;</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mi mathvariant="double-struck">X</mml:mi>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mi>c</mml:mi>
<mml:mn>1</mml:mn>
</mml:msub>
<mml:mfrac>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mn>0</mml:mn>
</mml:msub>
<mml:mi mathvariant="double-struck">X</mml:mi>
</mml:mrow>
</mml:msqrt>
<mml:msub>
<mml:mi mathvariant="normal">&#x2131;</mml:mi>
<mml:mrow>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>&#xd7;</mml:mo>
<mml:mtext>&#x3a9;</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>f</mml:mi>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mn>0</mml:mn>
</mml:msub>
<mml:mrow>
<mml:msub>
<mml:mi>W</mml:mi>
<mml:mi>&#x3b3;</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mi>n</mml:mi>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mi>&#x3b3;</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfrac>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
</sec>
<sec>
<title>Corollary A.1</title>
<p>
<italic>With the set-up as in Theorem A.1, let <inline-formula id="inf140">
<mml:math id="m168">
<mml:mrow>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mn>0</mml:mn>
</mml:msub>
<mml:mo>&#x2261;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (i.e., the marginal distribution of <inline-formula id="inf141">
<mml:math id="m169">
<mml:mi mathvariant="bold">y</mml:mi>
</mml:math>
</inline-formula> with respect to &#x3c4; is <inline-formula id="inf142">
<mml:math id="m170">
<mml:mrow>
<mml:msup>
<mml:mi>&#x3bc;</mml:mi>
<mml:mtext>&#x2a;</mml:mtext>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>). Then we have with &#x3c4;-probability <inline-formula id="inf143">
<mml:math id="m171">
<mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>:</italic>
</p>
<p>
<disp-formula id="equ26">
<mml:math id="m172">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo>&#x7c;</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>&#x7c;</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mi>F</mml:mi>
<mml:mo>&#x5e;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>Y</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo>&#x7c;</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>&#x7c;</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mi mathvariant="double-struck">X</mml:mi>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mi>c</mml:mi>
<mml:mn>1</mml:mn>
</mml:msub>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo>&#x7c;</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>&#x7c;</mml:mo>
<mml:mi mathvariant="normal">&#x2131;</mml:mi>
<mml:mo>&#x7c;</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>&#x7c;</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>&#xd7;</mml:mo>
<mml:mtext>&#x3a9;</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mrow>
<mml:mo>&#x7c;</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mo>&#x7c;</mml:mo>
<mml:mi>f</mml:mi>
<mml:mo>&#x7c;</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo>&#x7c;</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mi>W</mml:mi>
<mml:mi>&#x3b3;</mml:mi>
</mml:msub>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi mathvariant="double-struck">X</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mi>n</mml:mi>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mi>&#x3b3;</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfrac>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
</sec>
</app>
</app-group>
</back>
</article>