

ORIGINAL ARTICLE 

Year : 2020  Volume
: 10
 Issue : 3  Page : 174184 

A hybrid dynamic waveletbased modeling method for blood glucose concentration prediction in type 1 diabetes
Mohsen Kharazihai Isfahani^{1}, Maryam Zekri^{1}, Hamid Reza Marateb^{2}, Elham Faghihimani^{3}
^{1} Department of Electrical and Computer Engineering, Isfahan University of Technology, Isfahan, Iran ^{2} Department of Biomedical Engineering, Faculty of Engineering, University of Isfahan, Isfahan, Iran; Department of Automatic Control, Biomedical Engineering Research Center, Polytechnic University of Catalonia, Barcelona Tech, Barcelona, Spain ^{3} Isfahan Endocrine and Metabolism Research Center, Isfahan University of Medical Sciences, Isfahan, Iran
Date of Submission  11Nov2019 
Date of Decision  12Dec2019 
Date of Acceptance  10Jan2020 
Date of Web Publication  03Jul2020 
Correspondence Address: Dr. Maryam Zekri Department of Electrical and Computer Engineering, Isfahan University of Technology, Isfahan Iran
Source of Support: None, Conflict of Interest: None
DOI: 10.4103/jmss.JMSS_62_19
Background: Diabetes mellitus (DM) is a chronic disease that affects public health. The prediction of blood glucose concentration (BGC) is essential to improve the therapy of type 1 DM (T1DM). Methods: Having considered the risk of hyper and hypoglycemia, we provide a new hybrid modeling approach for BGC prediction based on a dynamic wavelet neural network (WNN) model, including a heuristic input selection. The proposed models include a hybrid dynamic WNN (HDWNN) and a hybrid dynamic fuzzy WNN (HDFWNN). These waveletbased networks are designed based on dominant wavelets selected by the genetic algorithmorthogonal least square method. Furthermore, the HDFWNN model structure is improved using fuzzy rule induction, an important innovation in the fuzzy wavelet modeling. The proposed networks are tested on real data from 12 T1DM patients and also simulated data from 33 virtual patients with an UVa/Padova simulator, an approved simulator by the US Food and Drug Administration. Results: A comparison study is performed in terms of new glucosebased assessment metrics, such as gFIT, glucose weighted form of ESOD_{n} (gESOD_{n}), and glucoseweighted R^{2} (gR^{2}). For real patients' data, the values of the mentioned indices are accomplished as gFIT = 0.97 ± 0.01, gESOD_{n} = 1.18 ± 0.38, and gR^{2} = 0.88 ± 0.07. HDFWNN, HDWNN and jump NN method showed the prediction error (root mean square error [RMSE]) of 11.23 ± 2.77 mg/dl, 10.79 ± 3.86 mg/dl and 16.45 ± 4.33 mg/dl, respectively. Conclusion: Furthermore, the generalized estimating equation and post hoc tests show that proposed models perform better compared with other proposed methods.
Keywords: Blood glucose prediction, diabetes mellitus, fuzzy rule induction, fuzzy wavelet neural network, wavelet neural network
How to cite this article: Isfahani MK, Zekri M, Marateb HR, Faghihimani E. A hybrid dynamic waveletbased modeling method for blood glucose concentration prediction in type 1 diabetes. J Med Signals Sens 2020;10:17484 
How to cite this URL: Isfahani MK, Zekri M, Marateb HR, Faghihimani E. A hybrid dynamic waveletbased modeling method for blood glucose concentration prediction in type 1 diabetes. J Med Signals Sens [serial online] 2020 [cited 2020 Sep 22];10:17484. Available from: http://www.jmssjournal.net/text.asp?2020/10/3/174/288900 
Introduction   
Diabetes mellitus
Diabetes mellitus (DM) is a disease known as abnormality in the level of blood glucose. DM is a significant risk factor of cardiovascular diseases, neuropathy, nephropathy, and retinopathy.^{[1]} Worldwide, DM is one of the most fastgrowing diseases. As reported by the International Diabetes Federation, the number of people who have diabetes worldwide was over 425 million by 2017and is estimated to exceed 693 million by 2045.^{[2]} DM is usually classified into type 1 DM (T1DM), type 2 DM (T2DM), and gestational diabetes. In the first case, the patient has high blood glucose concentration (BGC) due to an inadequate betacell or pancreas insulin production, while, in the second case, the disease results from the body's inefficient use of insulin. Gestational diabetes, however, progresses during pregnancy.^{[3]} T1DM symptoms suddenly occur and are not currently curable or are at least challenging to treat.^{[4]} Nonetheless, subcutaneous insulin injections, insulin infusion, diet, and exercise are the commonlyused treatments applied for T1DM.^{[5]} In advanced treatment, insulin infusion is continuously used via an insulin pump known as “artificial pancreas.” In the insulin pump, control strategies such as model predictive control (MPC) is employed to regulate BGC by justifying the amount of infused insulin.^{[6],[7],[8]} MPC is an advanced control method suitable for severe multivariate control problems which need to remove constraints.^{[9],[10]} MPC has been proven to be effective to be applied in BGC control in DM patients.^{[11],[12]} However, BGC control methods, particularly MPC, require the prediction of BGC.^{[13],[14]} Thus, it is essential to develop a model that can predict BGC.^{[15]}
Related works
BGC predictive models often used in the MPC controllers are divided into datadriven and hybrid models.^{[16]} Datadriven models are derived from timeseries analysis using advanced methods, such as artificial and computational intelligence, soft computing, machine learning, data mining, and intelligent data analysis.^{[17]} In BGC modeling, datadriven models are often combined with mathematical equations derived from physiology to develop a hybrid model as an improved solution.^{[18]} For instance, the glucose absorption submodel described by Dalla Man et al.^{[19]} and the insulin absorption submodel proposed by Dalla Man et al.^{[20]} were used as a hybrid structure in the study by Zecchin.^{[21]} One of the most common datadriven models, called neural networks (NNs), has been proposed, either in a hybrid mode with linear models or on its own, to predict BGC. For example, the artificial NNs,^{[22]} the MLP NN,^{[23]} the RBF NN,^{[24]} and the jump NN ^{[25]} have been used to predict BGC. The jump NN is a feed–forward NN whose inputs are linked not only to the nonlinear neurons in the hidden layer but also to the output layer.^{[25]} Among the efforts recently been made to improve the accuracy of BGC prediction, the study by Zecchin et al.^{[25]} has been one of the most thorough and accurate studies in the area of BGC prediction. Nevertheless, it is expected not to choose input derivatives in modeling. Moreover, the NN has some deficiencies, however, in presenting a clear interpretation of the system, providing an analytical procedure of the structure selection, and making assurance of the NN convergence.^{[26]} Wavelet NN (WNN) is introduced,^{[27]} to consider such deficiencies. WNN is a nonlinear input–output mapping, which can approximate any functions to desirable precision.^{[28]} This network was used for BGC prediction in the study by Zainuddin et al.^{[29]}
In this study, a collection of wavelets with random parameters was initially formed, and then, the leastsquares approach was used to calculate WNN coefficients. However, no practical approach was applied to choose dominant wavelets. WNN has additionally been combined with fuzzy logic to formulate the uncertainty of data in the model, resulting in an improvement of function approximation, especially when there are uncertainties.^{[26]} In the study by Zarkogianni et al.,^{[30]} a neurofuzzy network with wavelets, as activation functions, was used to predict BGC, while no solutions, no approaches, and no ways were ordered to select the important wavelets, to organize the structure, and to initialize model parameters properly. According to what was mentioned above, in general, there have been deficiencies in the provided models concerning BGC prediction. The specified defects include insufficient attention to the selection of influential inputs, lack of a proper procedure to form the model structure based on BGC data, and lack of attention to the various risks of prediction errors in BGC modeling in normal BGC, low BGC (hypoglycemia), and excessive BGC (hyperglycemia).
Purpose of this research
In this paper, we propose new waveletbased models for BGC prediction while trying to eliminate the defects of previous models. Initially, the physiological insulin and meal models are applied. Then, the input selection is considered to select the most effective factors in the foreseeable model for each patient. Next, based on the selected inputs, candidate wavelets with various parameters are created, while only dominant wavelets, proper for BGC prediction, are chosen through a crossvalidation genetic algorithmorthogonal least square (GAOLS) method. Then, the selected dominant wavelets form a WNN, the first proposed waveletbased model. Next, to handle uncertainties common in BGC data, chosen wavelets are incorporated with fuzzy inference. Therefore, as a second proposed model, a novel fuzzy WNN (FWNN) is created. In this novel FWNN, to prevent an extreme increase in the parameters, two solutions are considered. First, similar to the first proposed WNN model, only the chosen dominant wavelets are used. Second, fuzzy rule induction is used to prune unnecessary parts. Furthermore, in all steps, various weighting rates, based on expert knowledge of diabetes, are used for estimating the modeling errors of normal, hypoglycemia, and hyperglycemia episodes. While particular attention has been paid to the choice of model inputs, to form the databased structure of each patient, efforts have been made to simplify the structure to have a lot of capabilities.
Paper organization
The case study used in the BGC prediction system, together with the proposed waveletbased models, is introduced in “Subjects and Methods” Section. In “Result” Section, the results of the proposed system, the validation process, and the comparison between the proposed models and the stateoftheart are presented. Finally, the concluding remark is stated in “Conclusion” Section.
Subjects and Methods   
In this Section, after a brief introduction of the case study used in our BGC prediction problem, the process of input selection, the equations of the proposed models, the validation method, and the proposed modeling algorithm are briefly discussed.
Data description
In this work, a real dataset from 12 adolescents with type 1 diabetes provided in the study by Elleri et al.^{[31]} is considered. Data of each patient include both basal insulin delivery and conventional pump therapy for 36 h. Subcutaneous glucose values are taken every 5 min using the Dexcom continuous glucose monitor (CGM). The relative absolute difference of the Dexcom CGM median is obtained to be 14.7% (7.0%–25.3%),^{[31]} the accuracy calibration of which is verified every 12 h. Furthermore, data from meal intake in the carbohydrate unit and the exercise at 0 or 1 level are recorded. More details are provided in the study by Elleri et al.^{[31]} All procedures followed in this study, involving human participants, are following the ethical standards of the Southampton and South West Hampshire Research Ethics Committee, also complying with the principles laid down in the Declaration of Helsinki. Participants <16 years of age provide consent for the study procedures, and the parent or caregiver signed the informed consent. Participants >16 years of age sign their consent letters before participation.^{[31]} Moreover, 33 T1DM in silico patients are simulated using a UVa/Padova simulator conformed to the US Food and Drug Administration in 2013.^{[32]} Data simulated by this simulator have been used as a benchmark in numerous papers.^{[18],[21],[33],[34]} The UVa/Padova simulator model involves several submodels, describing insulin injection, appearance rates of glucose, and meal intake.^{[35]} Equations of the model are presented in detail.^{[32]}
Input selection
Input selection, the first step in system identification, enhances model generalization because numerous input terms lead to overfitting or high model complexity.^{[36]} In particular, for BGC modeling, the prediction accuracy of the model is affected by input variables and their different time lags.^{[29]} The main input variables affecting BGC prediction are meal, insulin, physical activities, and stress.^{[37]} In previous works, prior knowledge, correlation analysis,^{[21]} and principal component analysis ^{[29]} have been used to select the main effective model inputs concerning BGC prediction, while the effect of severity of each input has somehow varied from person to person.^{[24],[38]} Therefore, important regressors should be selected from the input dynamic regressor space. The input dynamic regressor space is a set that includes input variables with varying time lags. This set includes delayed regressors showing meal eaten by a person, different delayed regressors showing physical activities, different delayed regressors showing injected insulin, BGC timedelayed regressors, and any other factors. Orthogonalbased methods are proper options for selecting inputs from a large collection of regressors,^{[39]} which OLS method is a wellknown simple one to provide information about the structure in linearintheparameter models. In this method, the reduction ratio of criterion error (err) is introduced to omit insignificant terms in the model.^{[40]} On the other hand, the OLS mostly faces difficulty in terms of nonlinear system input selection.^{[41]} Thus, the OLS is enhanced using a heuristic method, i.e., a GA. The GPOLS is a hybridization of OLS and genetic programming to introduce input regressors for nonlinear system modeling and is more robust than the OLS.^{[42]} In this work, the GAOLS ^{[43]} is used for choosing the main effective input variables among the candidate regressors. First, through the OLS method, the initial main effective regressors are chosen. After choosing the initial regressors, GA at this initial input selection is then used to search for final main effective regressors from the candidate regressors that result in minimum root mean square error (RMSE) in the validation data. Furthermore, as reporting the data of bolus insulin and meal values is in the discrete format, it is more convenient to consider the subcutaneous insulin model for the bolus insulin data ^{[44]} and the glucose absorption model ^{[45]} for the meal data. Using these physiological submodels contributes to incorporating the term “hybrid” in the title of the proposed models in this article.
Proposed waveletbased models
The structure of the proposed model is nonlinear, autoregressive with exogenous inputs (NARX). For nonlinear system identification, NARX models have widely been used in the literature, such as in the study by Billings.^{[36]} NARX formulation used in this work is described as:
Where the noise e(k) is an independent sequence; is the prediction of BGC; G is the BGC measured by CGM; PH is the prediction horizon; G(k), G(k − 1),…, G(k − n_{g}); u(k), u(k − 1),…, u(k − n_{u}) are the regressors selected as the model input; and F is the term estimated by the proposed waveletbased models.
Hybrid dynamic wavelet neural network model
The structure of the proposed HDWNN model for BGC prediction is presented in [Figure 1]a. The main practical input dynamic regressors are first selected using the GAOLS method. Then, the selected dynamic regressors are entered into the wavelet layer. The wavelet layer includes neurons with activation functions which dominate wavelet functions φ_{i} for 1 ≤ i ≤ n. Dominant wavelets are selected from a lattice of wavelets with scaled and shifted parameters varying in specific intervals.^{[46]} i = 1, 2., r are scaled and shifted versions of the mother wavelet. In this work, the singlescale multidimensional Mexican hat wavelet is used as the mother wavelet:  Figure 1: (a) The proposed hybrid dynamic wavelet neural network modeling structure and (b) the proposed hybrid dynamic fuzzy wavelet neural network modeling structure, in which I(k−D_{I}), M(k−D_{M}), and G(k−D_{g}) are the exogenous insulin rate, carbohydrate, and blood glucose concentration delayed regressors, respectively; u_{1}, u>_{2},…, u_{m}are the useful selected inputs; ϕ(a_{1}, b_{1}), ϕ(a_{2}, b_{2}), …, ϕ(a_{p}, b_{q}) are all wavelet lattice neurons; ϕ_{1}, ϕ_{2}, …, ϕ_{n}are the selected dominant wavelet neurons; W_{1}, W_{2}, …, Wn are the weights attributed to the dynamic wavelet neural network output layer; WNN_{1}, WNN_{2}, …, WNN_{na} are the n_{a}subwavelets made from the n dominant selected wavelets, v_{1}, v_{2}, …, v_{na}are n_{a}weights attributed to the dynamic wavelet neural network output layer; are membership functions of each rule in the dynamic fuzzy wavelet neural network modeling; and PH is the prediction horizon
Click here to view 
Where U is the input regressor vector and m is the dimension of the input vector. Then, the output of the HDWNN model is calculated from the n dominant wavelets as:
in which a_{i} are scaled parameters, B_{i} are the vector for the shifted parameters of the n dominant wavelets, and is given below:
Hybrid dynamic fuzzy wavelet neural network model
The structure of the proposed HDFWNN model for BGC prediction is depicted in [Figure 1]b, composed of different layers relating inputs to the output. In the input layer, the selected inputs u_{i}, i = 1, 2,…, m are entered into the fuzzification layer using GAOLS. The fuzzification layer comprises n_{a} fuzzy rules R_{l}, 1,…, n_{a}complementing each other to make the final output model.
Where each fuzzy rule corresponds to a singlescale parameter of subWNN, n_{a} is the number of unique scale parameters of the selected dominant wavelets (the number of fuzzy rules), N_{l} is the number of selected dominant wavelets with samescale parameter, a_{l}, a_{l} is the lth unique scale parameter of the selected dominant wavelets corresponding to the lth rule, B_{il} (i = 1,…, n_{a}) are the shift parameter vectors of the dominant wavelets corresponding to the lth rule, and w_{(i, l}_{)} are the weight coefficients between hidden and output layers of the lth subWNN. The lth subWNN has m inputs and N_{l} nodes in the hidden layer and one output (η_{l}). The subWNN is constructed of the samescaled wavelets from the selected dominant wavelets. Furthermore, the AND operator is the multiplication, and A^{l}_{j} are Gaussian fuzzy membership functions calculated as follows:
Where mu_{lj} and su_{lj} are the mean and standard deviation (SD) values of Gaussian fuzzy membership functions.
In this work, to improve the proposed HDFWNN model, fuzzy rule induction is applied to upgrade the fuzzy rules using the imperialist competition algorithm (ICA). Here, the fuzzy rule induction includes optimizing the antecedent parts of fuzzy rules and allocating a weight to each rule. The antecedent part of fuzzy rule optimization specifies the role of each input in each rule. This role is represented as 0 or 1 in ICA. Thus, the calculation of the contribution degree of each fuzzy rule should be modified to remove the function of one or more input variables. Therefore, there are different numbers of input variables playing a role in various fuzzy rules. Then, in the study by Das et al.,^{[6]} to determine the contribution degree of the lth fuzzy rule, instead of just multiplying the membership functions of input variables, their geometric mean, participating in each rule antecedent part, is calculated as follows:
Where and (l = 1, 2,…, n_{a}, j = 1, 2,…, m) are the antecedent assignments represented as 0 or 1.
To allocate the weights, a continuous weight v_{i}(i = 1, 2,…, n_{a}) inside within [0, 1] is allocated to each n_{a} fuzzy rule. This weight specifies the significance of the given rule in the proposed HDFWNN model. The fuzzy rules with weights smaller than the threshold are eliminated from the HDFWNN model. Consequently, fuzzy rules with optimized structures are provided using fuzzy rule induction.
After calculating the output of the dynamic wavelet network, the defuzzification step – as an inference process – is implemented, and the final output is computed as:
Where
Model parameters learning
In the final step of BGC prediction, according to the structure of the model constructed for each patient, the unknown parameters of the waveletbased models should be adjusted to match the model output with the personal BGC physiological behavior of a given patient. For the HDWNN model, the model parameters, including the weight coefficients of the output layer, are learned using the LS method. Further, for the HDFWNN model, the parameters of the HDFWNN model, including the mean and SD values of Gaussian fuzzy membership functions, the translation and dilation parameters of the wavelets, and the weights of the output layer should be adjusted. In the HDFWNN structure, the importance of the output layer is learned by the LS method, while other parameters mentioned above are tuned using ICA.
Model validation
For the sake of validation, a threefold crossvalidation procedure is applied. For each patient, the dataset is divided into training, validation, and testing sets, each of which includes onethird of the total data. The training set is used to extract the model architecture and optimize its related parameters, while the validation data are used to end the training algorithm through the crossvalidation process. The outcomes of the models' performance for both training and validation datasets are expressed in train metrics. For the testing dataset, however, they are shown in test metrics.
Performance metrics
The performance of the proposed models is expressed in terms of goodnessoffit. Various goodnessoffit measures have been introduced in the literature. In BGC prediction, RMSE and R ^{2} are used as wellknown metrics for comparing different BGC models.^{[33],[47]} In addition, due to various risk levels of hypo and hyperglycemia in the assessment of prediction errors of BGC,^{[6]} glucosespecific MSE (gMSE), as another metric, is used.^{[48]} The criterion gMSE can be interpreted as a weighted MSE, the weights of which are extracted from the Clark error grid. Based on this view, other metrics, for example, glucoseweighted root mean square error (gRMSE), glucoseweighted ESOD (gESOD), and glucoseweighted R ^{2} (gR ^{2}), can be used to make a better judgment about the potential of the models in predicting BGC. Then, gRMSE between the predicted and the real output y is computed as:
Where was described in the study by Del Favero et al.^{[48]} In this work, gRMSE is represented as gFIT = 1 − gRMSE for judging the results, similar to other metrics introduced here. R ^{2}, another metric for testing the goodnessoffit, is more sensitive to outliers;^{[34]} the glucoseweighted form of R ^{2} is thus calculated as
Normalized ESOD is the predicted output of ESOD normalized by the real output of ESOD. The glucoseweighted form of ESOD_{n} is defined as the following ratio:
The lower amounts of gESOD_{n} denote a decrease in the prediction error in the case of hypoand hyperglycemia. The gFIT, gESOD_{n}, and gR ^{2} between the predicted and the real BGC are analyzed for all patients, reported as mean ± SD.
Statistical analysis
Descriptive statistics are reported as mean ± SD. In this work, the generalized estimating equation (GEE) statistical test is used to find significant factors (i.e., methods) affecting the goodnessoffit of the model. Multiple comparison post hoc tests are later used for the sake of pairwise comparison.
It is worth mentioning that the GEE statistical test is more rigorous than RMANOVA (one of the primary proposed methods for analyzing correlated responses) due to higher power achievement, while the smaller sample size or the lower number of repeated measurements is accessible in both complete and missing data scenarios.^{[49]} This feature can significantly benefit studies in which data are skewed or the distribution of data is difficult to verify due to a small sample size, while RMANOVA requires normallydistributed data.^{[50]} Then, due to the GEE, the level of statistical significance is set to be P = 0.05. The statistical analysis is performed using SPSS version 16 (SPSS for Windows, Released 2007, Chicago, SPSS Inc., USA).
The proposed methods
In the following, we describe the steps taken to develop the proposed waveletbased modeling algorithm. Also the glossary of terms is mentioned in [Table 1].
 Preprocessing step: Data of meal and insulin infusion are entered into their submodels. Then, all the data are scaled to 0 or 1
 Input selection:First, different time lags of various available variables that might influence BGC to form a regressor array. Then, among the shaped regressor arrays, regressors with the most significant impact on BGC prediction are selected as the input vector using the GAOLS
 Wavelet selection: For the inputs chosen in the previous step, the lattice of wavelets is created with different scaled and shifted forms of the mother wavelet. The dominant wavelets are selected through the GAOLS
 Proposed waveletbased models:First, a linear combination of the selected dominant wavelets form the HDWNN model, the coefficients of which are adjusted by the LS method. Second, in the HDFWNN model, each rule corresponds to the subWNN in its consequent part, composed of wavelets that have the same scale parameter among the selected dominant wavelets. Then, the fuzzy rule induction is used to improve the fuzzy rules. It includes rule weight allocation and rule antecedent arrangement. Finally, the HDFWNN model's unknown parameters are learned via a heuristic algorithm, such as ICA and LS methods
 Validation framework: The validation framework contains a threefold crossvalidation procedure, which includes residual assessment metrics, e.g., gFIT, gESOD_{n}, and gR ^{2}.
Results   
The proposed waveletbased models are derived from clinical and simulated data. Along with the suggested methods, the jump NN model, introduced in the study by Zecchin,^{[21]} is simulated to compare the results with the proposed waveletbased models. In the study by Zecchin et al.,^{[25]} the BGC jump NN had four inputs which include currently measured BGC by the CGM sensor, information on the carbohydrate content of ingested meals, information on doses of the injected bolus of insulin, and the glucose rate of appearance and its derivative.
Modeling clinical data
In this work, the available data include meal data per carbohydrate unit, infused insulin boluses data per unit, closedloop insulin infusion rates described in unit/hour, and delayed BGC data in mg/dl. All the data are scaled between 0 and 1. Furthermore, the PH is 30 min and the sample time sets to be 5 min. In terms of assessment metrics, the results are provided in [Table 2]. The RMSE of BGC prediction without weighing the test data is as follows: RMSE = 10.7939 ± 3.8567 mg/dl for the HDWNN, RMSE = 11.2335 ± 2.7677 mg/dl for the HDFWNN, and RMSE = 16.4466 ± 4.3253 mg/dl for the jump NN. Consequently, RMSE of BGC prediction for HDWNN and HDFWNN is significantly less in comparison with jump NN. CGM data, in comparison with various model predictions for one of the participants, are also plotted in [Figure 2].  Table 2: The performance of different models concerning blood glucose concentration prediction (two proposed models in comparison with the jump neural network) on the training and test real datasets (mean±standard deviation and P values of performance indices)
Click here to view 
 Figure 2: Continuous glucose monitor signal (blue line), hybrid dynamic wavelet neural network model prediction (black triangle), hybrid dynamic fuzzy wavelet neural network model prediction (red square), and the reference jump neural network (magenta hexagram) for one of the real patient data. Horizontal red lines denote the hypo and hyperglycemic thresholds
Click here to view 
The GEE analysis reveals that gFIT, gESOD_{n}, and gR ^{2} significantly differ in each method (P < 0.001). The post hoc tests additionally show that the HDFWNN model performs better compared with other methods, according to the gFIT and gR ^{2} metrics (P < 0.01). For the gESOD_{n} metric, the post hoc test shows that the HDFWNN model has a better performance in comparison with the HDWNN (P < 0.04).
Modeling simulated data
After applying the proposed models to the clinical data, a UVa/Padova simulator is used to simulate 33 T1DM virtual participants.^{[32]} For each participant, the simulation scenario consists of about 3 days of monitoring with three meals and one or two snacks per day. Breakfast for 3 days is set at 7:00, 8:00, and 09:00 h and consists of 45, 5, and 75 g of CHO, respectively. Lunch is scheduled at 12:00, 12:00, and 13:00 h and consists of 70, 90, and 30 g of CHO, respectively. The first snack is served at 16:00 h, composed of 20 g of CHO for only the 1^{st} and 2^{nd} day. The second snack is served at 23:00 h, including 20 g of CHO for the 2^{nd} and 3^{rd} day. Finally, the dinner is held at 18:00, 17:00, and 18:00 h, consisting 80, 80, and 100 g of CHO. The diet is assumed to be the same for all patients. A noise sequence embedded in the simulator is added to CGM data, considering to be similar to the real data. The CGM data, the data of insulin infusions, and the data of carbohydrate meals compose the simulated data. The sampling time is chosen to be 5 min. Similar to the procedure followed in the clinical data, the proposed models are applied to the simulated data.
The results are provided in [Table 3], confirming the theoretical and practical potential of the waveletbased models for predicting BGC. In addition, the RMSE of BGC prediction for the test data is as follows:  Table 3: The performance of different models concerning blood glucose concentration prediction (two proposed models in comparison with jump neural network) on the training and test simulated datasets (mean±standard deviation and P values of performance indices)
Click here to view 
RMSE = 12.4186 ± 6.1671 mg/dl for the HDWNN, RMSE = 11.1597 ± 5.4751 mg/dl for the HDFWNN, and RMSE = 20.8360 ± 11.4547 mg/dl for the jump NN.
The GEE analysis presents that gFIT, gESOD_{n}, and gR ^{2} vary in the methods (P < 0.001). Then, the post hoc tests determine that the HDFWNN model has a better performance than other methods, according to gR ^{2} (P < 0.02). However, based on gFIT, gESOD_{n}, and gR ^{2}, the post hoc tests show the HDFWNN model to perform better than the jump NN model (P < 0.001).
Discussion   
The proposed waveletbased models are tested in a threefold crossvalidation procedure on the training, validation, and test data sets. A comparison is performed between the results of the proposed wavelet models applied so far in the literature, and the jump NN model investigated here.^{[19]} To evaluate the predictive accuracy of the proposed model, gFIT, gESOD_{n}, and gR ^{2} metrics are presented. The statistical analyses of such metrics are performed using GEE and post hoc methods, showing that the HDFWNN performs the best in predicting BGC, based on both real and simulated data. The results of modeling the actual data are presented in [Table 2]. Although both waveletbased models perform better than the jump NN model in all mentioned metrics, the best BGC prediction is obtained from the HDFWNN model in terms of the gESOD_{n} parameter. This is due to more detailed features of the HDFWNN model compared with the jump NN and HDWNN. According to the post hoc tests in terms of gESOD_{n}, the HDFWNN model performs better than the HDWNN model, showing the effect of using fuzzy logic to prevent unwanted fluctuations. It can be seen that the oscillations are successfully predicted by the proposed HDFWNN [Figure 2]. For virtual patients, HDFWNN is the best model based on gR ^{2}.
According to the post hoc tests concerning gFIT and gESOD_{n}, the HDFWNN model performs better than the jump NN model. The results of the simulated data and the real data are alike – while the HDFWNN model enjoys more parameters. It can be concluded that the predictive accuracy of the HDWNN model is acceptable, although the number of parameters is considerably higher in other models. Looking from a different angle, i.e., based on the complexity of the model and the name of the selected parameters, we can come to the conclusion that the proposed HDWNN model is a better choice. As presented in [Table 2] and [Table 3], the number of model parameters of the HDWNN is lower than that of the jump NN and HDFWNN models. The accuracy of the HDWNN model outperforms that of the jump NN model, and although it is less than the accuracy of the HDFWNN model, it is acceptable. Hence, it can be a more appropriate choice for applications where the simplicity of the model is essential, such as realtime applications. This is due to its acceptable performance compared to the jump NN model and its lower number of parameters in comparison with the HDFWNN model.
Furthermore, in the proposed models, the derivatives of the existing data are not used in the model inputs in comparison with previous study.^{[42]} Using derivatives can significantly decrease the efficiency of the model due to disturbance or noise. It is inferred from the overall results that the waveletbased models have acceptable predict accuracy, and perform better than the jump NN proposed by Berger and Rodbard ^{[42]} in terms of standard BGC metrics. It is worth noting that when applying the proposed models in realtime data, it is recommended to use realtime optimization. Thus, the gradual changes in the patient's body made over time should be considered in predicting the BGC efficiency of the model due to disturbance or noise.
Conclusions   
This work is focused on novel models based on hybrid dynamic waveletbased NNs to predict BGC in T1DM patients. In this study, two waveletbased models (namely HDWNN and HDFWNN) are proposed to organize the structure of the model based on the data for each patient. Different approaches are considered in normal, hypoglycemia, and hyperglycemia episodes of BGC behaviors. The obtained results demonstrate the potential of the proposed HDWNN model in applications where the number of the model parameters should be less. However, if further parameters are allowed in the model, and subsequently, more information is available concerning the patients, the proposed HDFWNN model is the best choice in terms of glucosebased metrics. The results of this study can be enhanced using online optimization in realtime implementations.
Financial support and sponsorship
None.
Conflicts of interest
There are no conflicts of interest.
Biographies   
Mohsen Kharazihai Isfahani was born in Isfahan, Iran, in 1985. He received the B.S. degree in Electrical Engineering (EE) from Isfahan University of Technology (IUT), Isfahan, in 2007, the M.S. degree in EE from the University of Tehran, Iran in 2010 and the Ph.D. degree in Electrical and Computer Engineering at IUT in 2020. His main research interest includes Modeling, System Identification, Soft Computing and Control.
Email: m.kharazihai@ec.iut.ac.ir
Maryam Zekri received the PhD degree in Electrical Engineering (Control) from Isfahan University of Technology (IUT) in 2008. She is currently an Associate Professor in the Department of Electrical and Computer Engineering at IUT. Her research interests are in the area of Soft Computing, Intelligent Control and Automatic Diagnosis of Disease.
Email: mzekri@cc.iut.ac.ir
Hamid Reza Marateb received the B.S. and M.S. degrees from Shahid Beheshti University of Medical Science and Amirkabir University of Technology, Tehran, Iran, in 2000 and 2003, respectively. He received his Ph.D. in neural systems and biomechanics and postdoctoral fellowship from the Laboratory of Engineering of Neuromuscular Systems, Politecnico di Torino, Turin, Italy in 2011 and 2012, respectively. He was a visiting researcher at Stanford University in 2009 and at Aalborg University in 2010. He was a visiting professor in UPC, Barcelona, in 2012 and 2017. His research line is Cognitive Informatics in Health and Biomedicine mainly focusing Clinical neurophysiology, Computational Neurosciences and Medical Data mining. Dr. Marateb is a reviewer in more than 30 international ISI journals and received four European Union and US grants. He is currently with the biomedical engineering department, faculty of engineering, the university of Isfahan, Iran and also Department of Automatic Control, Biomedical Engineering Research Center, Universitat Politècnica de Catalunya, BarcelonaTech (UPC), Barcelona, Spain.
Email: h.marateb@eng.ui.ac.ir
Elham Faghihimani received the MD, Specialty in Internal medicine, and Subspecialty in Adult Endocrinology from Isfahan University of Medical Sciences. She is currently an endocrinologist and assistant professor in Medicine, in Endocrine & Metabolism Research Center, Isfahan, Iran. She is the member of Endocrine society of USA. Her research interests include diabetes mellitus, metabolic syndrome, thyroid disorders and Women's health.
Email: efimani@yahoo.com
References   
1.  Hall JE. Guyton and Hall Textbook of Medical Physiology. 13 ^{rd} ed. Philadelphia, PA: Elsevier; 2016. p. 19, 1145. 
2.  Cho NH, Shaw JE, Karuranga S, Huang Y, da Rocha Fernandes JD, Ohlrogge AW, et al. IDF Diabetes Atlas: Global estimates of diabetes prevalence for 2017 and projections for 2045. Diabetes Res Clin Pract 2018;138:27181. 
3.  Schlienger JL. Complications du diabète de type 2. La Presse Médicale 2013;42:83948. 
4.  Fattah H, Vallon V. The potential role of SGLT2 inhibitors in the treatment of type 1 diabetes mellitus. Drugs 2018;78:71726. 
5.  Smith B, Sarver JG, Fournier RL. A comparison of islet transplantation and subcutaneous insulin injections for the treatment of diabetes mellitus. Comput Biol Med 1991;21:41727. 
6.  Wong XW. ModelBased Therapeutics for Type 1 Diabetes Mellitus. 2008. 
7.  Das S, Nath A, Dey R, Chaudhury S, editors. Glucose regulation in diabetes patients via insulin pump: A feedback linearisation approach. In: Innovations in Infrastructure. Singapore: Springer; 2019. 
8.  Copp DA, Gondhalekar R, Hespanha JP. Simultaneous model predictive control and moving horizon estimation for blood glucose regulation in Type 1 diabetes. Optim Contr Appl Met 2018;39:90418. 
9.  Zhang R, Xue A, Gao F. Model predictive control under constraints. In: Model Predictive Control: Approaches Based on the Extended State Space Model and Extended Nonminimal State Space Model. Singapore: Springer Singapore; 2019. p. 5963. 
10.  Zhang S. Wavelet Adaptive and Predictive Control with Applications to Chemical Looping System [Dissertation]. Mechanical Engineering: University of Illinois at UrbanaChampaign; 2014. 
11.  Shi D, Dassau E, Doyle FJ. Adaptive Zone Model Predictive Control of Artificial Pancreas Based on Glucose and VelocityDependent Control Penalties. IEEE Trans Biomed Eng 2019;66:104554. 
12.  Srinivasan C, Meenatchisundaram S, George VJJoARiD, Systems C. Design and Realization of MPC Controller for Type 1 Diabetes System. J Dyn Control Syst 2018;10:18. 
13.  Laguna Sanz AJ, Doyle FJ 3 ^{rd}, Dassau E. An Enhanced Model Predictive Control for the Artificial Pancreas Using a Confidence Index Based on Residual Analysis of Past Predictions. J Diabetes Sci Technol 2017;11:53744. 
14.  Nimri R, Audon P, Pinsker JE, Dassau E. Closing the Loop. Diabetes Technol Ther 2018;20:S4154. 
15.  Ståhl F, Johansson R. Diabetes mellitus modeling and shortterm prediction based on blood glucose measurements. Math Biosci 2009;217:10117. 
16.  Oviedo S, Vehí J, Calm R, Armengol J. A review of personalized blood glucose prediction strategies for T1DM patients. Int J Numer Method Biomed Eng 2017;33:e2833. 
17.  Solomatine D, See LM, Abrahart RJ. DataDriven Modelling: Concepts, Approaches and Experiences. In: Abrahart RJ, See LM, Solomatine DP, editors. Practical Hydroinformatics: Computational Intelligence and Technological Developments in Water Applications. Berlin, Heidelberg: Springer Berlin Heidelberg; 2008. p. 1730. 
18.  Contreras I, Oviedo S, Vettoretti M, Visentin R, Vehí J. Personalized blood glucose prediction: A hybrid approach using grammatical evolution and physiological models. PLoS One 2017;12:e0187754. 
19.  Dalla Man C, Camilleri M, Cobelli C. A system model of oral glucose absorption: Validation on gold standard data. IEEE Trans Biomed Eng 2006;53:24728. 
20.  Dalla Man C, Raimondo DM, Rizza RA, Cobelli C. GIM, simulation software of meal glucoseinsulin model. J Diabetes Sci Technol 2007;1:32330. 
21.  Zecchin C. Online Glucose Prediction in Type1 Diabetes by Neural Network Models; 2014. 
22.  Ben Ali J, Hamdi T, Fnaiech N, Di Costanzo V, Fnaiech F, Ginoux JM. Continuous blood glucose level prediction of type 1 diabetes based on artificial neural network. Biocybern Biomed Eng 2018;38:82840. 
23.  Quchani SA, Tahami E, editors. Comparison of MLP and Elman Neural Network for Blood Glucose Level Prediction in Type 1 Diabetics. Berlin, Heidelberg: Springer Berlin Heidelberg; 2007. 
24.  Baghdadi G, Nasrabadi AM. Controlling blood glucose levels in diabetics by neural network predictor. Conf Proc IEEE Eng Med Biol Soc 2007;2007:32169. 
25.  Zecchin C, Facchinetti A, Sparacino G, Cobelli C. Jump neural network for online shorttime prediction of blood glucose from continuous monitoring sensors and meal information. Comput Methods Programs Biomed 2014;113:14452. 
26.  Zekri M, Sadri S, Sheikholeslam F. Adaptive fuzzy wavelet network control design for nonlinear systems. Fuzzy Sets Syst. 2008;159:266895. 
27.  Zhang Q, Benveniste A. Wavelet networks. IEEE Trans Neural Netw 1992;3:88998. 
28.  Billings SA, Wei HL. A new class of wavelet networks for nonlinear system identification. IEEE Trans Neural Netw 2005;16:86274. 
29.  Zainuddin Z, Pauline O, Ardil CJ. A neural network approach in predicting the blood glucose level for diabetic patients. Int J Comput Intell 2009;5:729. 
30.  Zarkogianni K, Mitsis K, Litsa E, Arredondo MT, Ficο G, Fioravanti A, et al. Comparative assessment of glucose prediction models for patients with type 1 diabetes mellitus applying sensors for glucose and physical activity monitoring. Med Biol Eng Comput 2015;53:133343. 
31.  Elleri D, Allen JM, Kumareswaran K, Leelarathna L, Nodale M, Caldwell K, et al. Closedloop basal insulin delivery over 36 hours in adolescents with type 1 diabetes: Randomized clinical trial. Diabetes Care 2013;36:83844. 
32.  Man CD, Micheletto F, Lv D, Breton M, Kovatchev B, Cobelli C. The UVA/PADOVA Type 1 Diabetes Simulator: New Features. J Diabetes Sci Technol 2014;8:2634. 
33.  Zecchin C, Facchinetti A, Sparacino G, De Nicolao G, Cobelli C. Neural network incorporating meal information improves accuracy of shorttime prediction of glucose concentration. IEEE Trans Biomed Eng 2012;59:155060. 
34.  Bock A, François G, Gillet D. A therapy parameterbased model for predicting blood glucose concentrations in patients with type 1 diabetes. Comput Methods Programs Biomed 2015;118:10723. 
35.  Dalla Man C, Rizza RA, Cobelli C. Meal simulation model of the glucoseinsulin system. IEEE Trans Biomed Eng 2007;54:17409. 
36.  Billings SA. Nonlinear system identification: NARMAX Methods in the Time, Frequency, and SpatioTemporal Domains: Chichester, UK: John Wiley & Sons; 2013. 
37.  Georga EI, Protopappas VC, Polyzos D, Fotiadis DI. Evaluation of shortterm predictors of glucose concentration in type 1 diabetes combining feature ranking with regression models. Med Biol Eng Comput 2015;53:130518. 
38.  GarcíaGarcía F, Hovorka R, Wilinska ME, Elleri D, Hernando ME. Modelling the effect of insulin on the disposal of mealattributable glucose in type 1 diabetes. Med Biol Eng Comput 2017;55:27182. 
39.  Dankers A, Hof PM, Bombois X, Heuberger PS. Identification of dynamic models in complex networks with prediction error methods: Predictor input selection. IEEE Trans Automat Contr 2016;61:93752. 
40.  Korenberg M, Billings SA, Liu YP, McIlroy PJ. Orthogonal parameter estimation algorithm for nonlinear stochastic systems. Int J Contr 1988;48:193210. 
41.  Mao KZ, Billings SA. Algorithms for minimal model structure detection in nonlinear dynamic system identification. Int J Contr 1997;68:31130. 
42.  Madár J, Abonyi J, Szeifert F. Genetic programming for the identification of nonlinear input – Output models. Ind Eng Chem Res 2005;44:317886. 
43.  Kharazihai Isfahani M, Zekri M, Marateb HR, Mañanas MA. Fuzzy jump wavelet neural network based on rule induction for dynamic nonlinear system identification with real data applications. PLoS One 2019;14:e0224075. 
44.  Berger M, Rodbard D. Computer simulation of plasma insulin and glucose dynamics after subcutaneous insulin injection. Diabetes Care 1989;12:72536. 
45.  Lehmann ED, Deutsch T. A physiological model of glucoseinsulin interaction in type 1 diabetes mellitus. J Biomed Eng 1992;14:23542. 
46.  Sadri AR, Zekri M, Sadri S, Gheissari N, Mokhtari M, Kolahdouzan F. Segmentation of Dermoscopy Images Using Wavelet Networks. IEEE Trans BioMed Eng 2013;60:113441. 
47.  Sparacino G, Zanderigo F, Corazza S, Maran A, Facchinetti A, Cobelli C. Glucose concentration can be predicted ahead in time from continuous glucose monitoring sensor timeseries. IEEE Trans Biomed Eng 2007;54:9317. 
48.  Del Favero S, Facchinetti A, Cobelli C. A glucosespecific metric to assess predictors and identify models. IEEE Trans Biomed Eng 2012;59:128190. 
49.  Ma Y, Mazumdar M, Memtsoudis SG. Beyond repeatedmeasures analysis of variance: Advanced statistical methods for the analysis of longitudinal data in anesthesia research. Reg Anesth Pain Med 2012;37:99105. 
50.  Vermeulen KM, Post WJ, Span MM, van der Bij W, Koëter GH, Ten Vergert EM. Incomplete quality of life data in lung transplant research: Comparing cross sectional, repeated measures ANOVA, and multilevel analysis. Respir Res 2005;6:101. 
[Figure 1], [Figure 2]
[Table 1], [Table 2], [Table 3]
