Recent Improvements on Complexity Measures for Time SeriesView this Special Issue
Influence of Duodenal–Jejunal Implantation on Glucose Dynamics: A Pilot Study Using Different Nonlinear Methods
Diabetes is a disease of great and rising prevalence, with the obesity epidemic being a significant contributing risk factor. Duodenal–jejunal bypass liner (DJBL) is a reversible implant that mimics the effects of more aggressive surgical procedures, such as gastric bypass, to induce weight loss. We hypothesized that DJBL also influences the glucose dynamics in type II diabetes, based on the induced changes already demonstrated in other physiological characteristics and parameters. In order to assess the validity of this assumption, we conducted a quantitative analysis based on several nonlinear algorithms (Lempel–Ziv Complexity, Sample Entropy, Permutation Entropy, and modified Permutation Entropy), well suited to the characterization of biomedical time series. We applied them to glucose records drawn from two extreme cases available of DJBL implantation: before and after 10 months. The results confirmed the hypothesis and an accuracy of 86.4% was achieved with modified Permutation Entropy. Other metrics also yielded significant classification accuracy results, all above 70%, provided a suitable parameter configuration was chosen. With the Leave–One–Out method, the results were very similar, between 72% and 82% classification accuracy. There was also a decrease in entropy of glycaemia records during the time interval studied. These findings provide a solid foundation to assess how glucose metabolism may be influenced by DJBL implantation and opens a new line of research in this field.
Diabetes mellitus is a chronic serious disorder that affects nearly a half billion people in the world, and its prevalence is expected to grow significantly in the coming years . It is also one of the greatest risk factors for cardiovascular diseases. In addition, the economical impact of the associated healthcare expenditure is enormous .
The global obesity epidemic is a relevant risk factor for diabetes, among many other diseases. As a result, weight reduction methods have become a field of great medical and scientific interest. Successful long-term weight loss maintenance by strategies such as changing dietary habits, or increasing physical activity, is difficult . Other more aggressive approaches are necessary, especially when a significant weight reduction percentage is required, or more serious health consequences are involved.
One of these approaches is the utilization of pharmacotherapy, which in the context of diabetes can be focused on weight loss, or on glucose control, resulting in weight loss as a side effect . However, the long-term outcome is very limited . On the contrary, the most successful strategies are based on surgical therapies. The gastric bypass achieves permanent significant long-term weight reduction in most of the patients that underwent this surgery .
Nevertheless, the gastric bypass is a very invasive procedure, with pre-, peri-, and postoperative risks and possible sequelae . An intermediate solution is the so-called Duodenal-jejunal Bypass Liner (DJBL). The DJBL is a reversible implantable device used to mimic the effects of gastric by-pass by preventing the contact of chymus with duodenum and proximal jejunum and delivering it in a less digested form to more distal parts of the intestine. Obesity is a central physiopathological mechanism in type 2 diabetes mellitus (T2DM), and thus DJBL has been used to improve metabolic control in obese patients with T2DM .
The effects of DJBL implantation are broad and disparate. Many studies have assessed the impact of DJBL on a number of physiological parameters [9–12]. We hypothesized that DJBL must have an influence on the glucose dynamics, as some studies about glucose variability and DJBL have pinpointed . These dynamics of the glucose time series offer new insights into glucose metabolism, and there seems to be a direct correlation between (the loss of) variability in the glucose time series and the degree of deterioration in glucose metabolism [14–17].
The glucoregulatory system is effectively a complex system, with several acting variables (caloric intake, exercise), a number of active hormones (insulin, glucagon, catecholamines, growth hormone, and incretins), and some well–established feedback and feedforward loops [18, 19]. The analysis of such a complex physiological system can be addressed using system dynamics characterization methods. Several methods well suited to time series of limited duration were used in this pilot study to characterize the effects of DJBL. Sample Entropy (SampEn) is a robust measure of regularity in sequences , whilst Lempel–Ziv complexity (LZC) is an easy to compute nonlinear algorithm to estimate the complexity in time series . Permutation Entropy (PE) is another complexity measure introduced by Bandt and Pompe in 2002  as a robust method to deal with real-world time series. In spite of the proficiency of PE in time series analyses, it neglects equalities within signals. Modified PE (mPE) was proposed to address this shortcoming in the original PE algorithm .
2. Materials and Methods
2.1. Lempel–Ziv Complexity
In order to compute LZC from a time series, the signal must first be converted into a sequence of symbols. In this study, the signal was parsed into a binary sequence using the median as the threshold (). For an input time series of length , the symbols in the binary sequence are created by
The binary sequence is then scanned from left to right to identify the different subsequences held within it and a complexity counter is increased by one every time a new subsequence is found (a detailed description of the algorithm can be found in ). This complexity counter needs to be normalized to obtain a measure of complexity independent of the length of the time series :
LZC captures the dynamics of the time series by reflecting the rate of new subsequences present within it.
2.2. Permutation Entropy
PE is a method measuring the entropy within a time series based on the probability of occurrence of all possible permutations of a certain length within it . With the exception of LZC, all other methods used in this study require the selection of values for different input parameters. In the case of PE, the computation relies on the selection of the embedding dimension and the time delay . The choice of embedding dimension is determined by the number of samples available, as the number of permutations must be less than the length of the time series (i.e., ) .
In order to compute PE as follows , embedding vectors need to be created from the original time series as follows:
For each embedding vector, the lowest data point in the embedding vector is assigned a 0, the second lowest 1, and on until all data points in the embedding vector have been replaced with their ranking order. Once all possible embedding vectors in the time series have been created and ranked, PE can be calculated by applying Shannon’s Entropy to quantify the proportion of possible permutations within the time series:where is the number of different subsequence ranked vectors in the original time series and PA is the fraction of the subsequence ranked vectors. A less regular signal will have a greater range of embedding vectors and, therefore, a higher PE.
2.2.1. Modified Permutation Entropy
One limitation of the original PE algorithm is that it ignores any repeated values in the embedding vector, assigning the first repeated value in the vector a lower integer in the ranking than subsequent repeats. This was addressed with the introduction of Modified Permutation Entropy (mPE) , in which repeated values are given the same ranking value. Then, entropy is evaluated applying Shannon’s entropy as is done in PE .
2.2.2. Input Parameter Selection
The outcome of PE will be influenced by the choice of embedding dimension and delay . A greater value of will give a greater possible range of ranking vectors and, therefore, a greater resolution. It has been recommended to use a range of values from to 7 but the total number of permutations (given by ) must be less than the length of the original time series . However, small embedding dimensions might be too small to accurately track the dynamical changes in a signal . Hence, PE and mPE were computed with to 6. In terms of the time delay, a value of 1 was chosen as this would retain the original relationships between data-points .
SampEn was first defined in . SampEn starts by creating a set of embedded vectors of length :where . The distance between subsequences is then defined as , with , . According to a predefined threshold , two subsequences are considered similar if . This similarity is quantized for two consecutive subsequence lengths ( and ), with number of such that , and number of such that . These two values and enable the computation of the statistics associated with SampEn:from which the final value for SampEn can be obtained:
The length is usually given by the acquisition stage, but the parameters and must be carefully chosen to ensure an optimal performance of SampEn relative to class separability. This selection will be detailed in Section 2.3.1.
2.3.1. Input Parameter Selection
The optimal selection of regularity estimators parameters and is still an open question. Frequent recommendations suggest adopting a parameter configuration in the vicinity of and . Nevertheless, this selection is lacking in terms of genericity, as many works have already demonstrated [27–31].
Although computationally more expensive, we varied SampEn parameters from 1 to 3 for and from 0.01 to 0.30 for , in 0.01 steps ( was not multiplied by the standard deviation of the sequences since they were normalised in advance, zero mean, and unitary standard deviation). This enabled us to avoid the possible bias in the results due to the selection of a specific method for SampEn parameter optimization, despite still looking at regions usually recommended for and [20, 26, 32].
2.4. Experimental Dataset
The database containing the experimental data of glucose time series was drawn from a database used to assess the endocrine effects of DJBL . There were 91 records from 30 participants with type II diabetes (20 men and 10 women, aged between 33 and 65). This database contained records taken before implantation (baseline, BL-, and 27 records), 1 month after implantation (01M+, 24 records), 10 months after implantation (10M+, 24 records), and 3 months after device removal (03M-, 16 records). Sampling frequency was 5 minutes. An example of records from each class in this database is shown in Figure 1. A very detailed description of the subjects can be found in the original paper .
As can be seen in Figure 1, the original records were noisy, with missing samples, and missing epochs completely at random. In order to avoid the influence of these artifacts on the results, missing single samples were linearly interpolated (mean substitution ). Records with less than 1440 samples (5 days) were excluded from the experiments, since the nonlinear methods used in the analysis are also very sensitive to number of samples . Record was then set to the central 1440 samples, if longer, to also avoid border effects  (tissue equilibrium, measuring device configuration, calibration, and stabilization). As a result of all this preprocessing, 60 records out of 91 were finally available. An example of resulting signals is shown in Figure 2.
Nevertheless, these records have not been analysed yet from a system dynamics standpoint, and our hypothesis was focused first on the two, in principle, most different scenarios: before DJBL implantation (BL-), and just before device removal (10M+). The rationale for this specific selection is that one month after implantation it will arguably be more difficult to find changes in glucose dynamics, due to the time passed. After DJBL removal, the glucose metabolism tends to return to that of the baseline period [11, 13]. Furthermore, quantitative endocrine effects seem to confirm that main differences are between these two stages, as shown in Table 1. Thus, in this table, 4 out of the 5 physiological features provide significant differences between 10M+ and BL-, giving quantitative support to the study selection. This support is in terms of a significance analysis of these differences obtained using Student’s t–test (, sample size of 30, and normality not required ). As shown in the column, only the differences in hip circumference could not be considered significant. The final experimental set was composed of 11 BL- records (positives P in the classification analysis) of 1440 samples and 11 10M+ records (negatives N) of the same length. These 22 records included the same 11 patients in both classes to ensure a paired test (7 males, 4 females), and the others in these classes were discarded. The dataset is relatively small, but the implantation of DJBL and glucose monitoring for several days is very difficult and costly, in terms of workload, time, and resources.
This table also includes a variability analysis result, the High Blood Glucose Index (HBGI). This index attempts to improve the assessment of glycaemic alterations through data transformation and is a well-established tool to estimate the risk of hyperglycaemia in diabetic patients. Average long-term blood glucose values are not a very reliable tool for glycemic control, but the analysis of short-term peaks and valleys has proven to have a much more clinical relevance . HBGI provides an estimation of the hyperglycaemia probability for the patients, and its differences have been found to be statistically significant for BL- and 10M+ in this case.
2.5. Class Separability Analysis
The separability of classes BL- and 10M+ was assessed by means of the Area under Curve (AUC) of the associated Receiver Operating Curve (ROC), AUC–ROC. Statistical analyses based on paired Student’s t–test or the Wilcoxon signed rank test, depending on the distribution of the data, were performed to assess the significance of the results. The acceptance threshold was set at .
Additionally, the classification capability of the results was quantified using the separability, specificity and accuracy classification performance indicators. They were obtained using the closest point to (0,1) in the ROC as the classification threshold. In this FRAMEWORK, positives (P) were assigned to the BL- class, negatives (N) to the 10M+ class, being sensitivity = TP / (TP+FN), specificity = TN / (TN+FP), and accuracy = (TN + TP) / (TN + TP + FN + FP ).
All four methods showed a decrease of complexity between BL- and 10M+ (i.e. decrease of LZC, SampEn, PE, and mPE values). However, for LZC differences between the 2 classes were not significant (see Table 5). On the other hand, different combination of input parameters in SampEn, PE, and mPE resulted in significant differences between classes.
The results are expressed in terms of AUC, statistical significance, classification sensitivity, specificity, and accuracy. The threshold for classification was taken as the ROC point closest to point (0,1). These calculations were carried out for all the values in input parameters for which the AUC was at least 0.70.
Specifically for SampEn, all the AUC results are depicted as a heatmap in Figure 3. Most of the AUC values fall in the region, with more promising results at low values (, optimal region), and in the zone (suboptimal region).
Tables 5, 6, 7, and 8 summarize the numerical results for the two classes, including mean and standard deviation. These values were computed using the parameter configuration scheme stated above. It is important to note that some configuration parameters did not yield significant results, such as for PE (Table 6) and mPE (Table 7). As in previous similar studies [37–39], it seems the greater the embedded dimension , the better classification performance using PE–based measures.
In order to better illustrate the differences between the classes studied, a Leave–One–Out (LOO) test  was applied using the data in Table 8. The classification threshold was set at the optimal SampEn value at which the classification accuracy was maximal. For both classes, there were 3 misclassified instances. Therefore, the overall classification accuracy using the LOO cross validation was 72.7%. As expected, the performance was lower than using all the records, but still very significant. This method was also applied to the Modified Permutation Entropy results in Table 7, when . In this case, there were 2 misclassified instances, achieving a classification accuracy of 82%.
Our results show that it is possible to identify the effects of DJBL in the dynamics of glycaemia records with non-linear analysis methods. A significant decrease in entropy (estimated with SampEn, PE, and mPE) of glycaemia records from BL- to 10M+ was observed. Complexity, quantified with LZC, also decreased in 10M+, but differences were not significant.
There is no gold standard for the unsupervised selection of parameters and for SampEn calculations, despite the numerous efforts in this regard [32, 40, 41]. In order to leave no stone unturned, we adopted a maximalist strategy where a wide range of values were tested. As a result, this parameter analysis for SampEn provided an optimal combination with and . In this case, the AUC was maximal, AUC, with significant (reject hypothesis) classification capabilities between BL- and M10+ (sensitivity=72.7%, specificity=90.9%, and accuracy=81.8%). However, there were other values for , with in the vicinity of , that also yielded good significant accuracy. In fact, the results seem to be almost independent of .
The optimal value of (), falls practically within the usually recommended interval, . There is another region of acceptable results for . These specific values seem to be related to the resolution of the measurements, which was 0.1 mmol/L and the dissimilarity measure (, and ). As for the parameter, significant performance was achieved in all the cases tested.
As is also the case with SampEn, there is no consensus on the choice of input parameter values for the calculation of PE and mPE. However, some guidelines exist and were followed in this pilot study. Firstly, the delay was equal to 1 to guarantee that no downsampling of the original time series would occur. Secondly, the embedding dimension determining the size of the permutation vectors was selected taking into account its upper limit  and the reported results showing that small embedding dimensions could fail to identify changes in the dynamics of a signal . Therefore, a range of values from to 6 was tested, with results showing that greater values of lead to better discrimination between both classes. The highest accuracy was observed with for both PE (77.27%) and mPE (86.36%), with the latter outperforming SampEn. It is worth noting that the entropy of glucose time series estimated with PE and mPE decreases from class BL- to 10M+ for all subjects but two, but the subjects where this decrease is not observed are different for both methods. Furthermore, our results suggest that mPE is a more accurate method to characterize subtle differences in glucose time series than PE.
Despite the analysis limitations due to small database size, records length, and artifacts, the results confirmed there are differences between BL- and 10M+ records that can be associated with changes in the underlying glucose dynamics after DJBL implantation. With a high degree of accuracy (86.4%), it was possible to correctly distinguish between the two classes. As far as we know, this is the first evidence in this classification context beyond variability and it opens a new perspective for the research of the DJBL implantation effects.
The results are consistent. For most of the cases where AUC was relatively high (AUC), the hypothesis was rejected and the classification accuracy was higher than . The opposite also holds true when no significant difference was apparent. Namely, there is a good correlation among all the features used to assess the classification capabilities; there were no antagonistic results (AUC with ).
This paper explored the possible influence on the glucose dynamics of DJBL implantation. The study used several nonlinear methods. The best results were obtained with mPE calculated with an embedding dimension of 6 and with SampEn with input parameter values and , although many other parameter configurations yielded suboptimal but relevant results. A similar approach was followed in other previous works related to blood glucose  or body temperature time series .
The performance of the method proposed could arguably be enhanced using other methods of theoretically better consistency . For instance, other modifications of PE can be considered, like fine-grained PE, based on incorporating the size of the differences between data–points into permutations and not just ranking them from smallest to largest , or the weighted PE, based on weighting permutation patterns depending on the amplitudes of their constituent data–points  Other effects should be studied, such as the influence of the artifacts, the characterization of the time–of–day variations (chronobiology), and the possible differences between other stages of the DJBL implantation. The availability of a validated set of methods for glucose dynamics assessment will arguably become a powerful tool for the study of disease onset and progression.
In summary, the DJBL implantation does alter the glucose metabolism of the subjects, and these changes can be detected by an analysis as the one proposed in this paper. This analysis may increase the clinical uses of the new information gathered. Additionally, there is room for improvement in terms of more accuracy and/or more classes.
Data are not available at this point due to data protection regulations.
All procedures performed in studies involving human participants were in accordance with the ethical standards of the institutional and/or national research committee and with the 1964 Helsinki declaration and its later amendments or comparable ethical standards.
Informed consent was obtained from all individual participants included in the study.
Conflicts of Interest
The authors declare that there are no conflicts of interest.
The Czech clinical partners were supported by DRO IKEM 000023001 and RVO VFN 64165. The Czech technical partners were supported by Research Centre for Informatics grant numbers CZ and SGS16/231/OHK3/3T/13—Support of interactive approaches to biomedical data acquisition and processing. No funding was received to support this research work by the Spanish and British partners.
S. N. Kothari, A. J. Borgert, K. J. Kallies, M. T. Baker, and B. T. Grover, “Long-term (>10-year) outcomes after laparoscopic roux-en-y gastric bypass,” Surgery for Obesity and Related Diseases, vol. 6, no. 13, pp. 972–978, 2016.View at: Google Scholar
P. Jirapinyo, A. V. Haas, and C. C. Thompson, “549 effect of the duodenal-jejunal bypass liner on glycemic control in type-2 diabetic patients with obesity: a meta-analysis with secondary analysis on weight loss and hormonal changes,” Gastrointestinal Endoscopy, vol. 85, no. 5, pp. AB82–AB83, 2017.View at: Publisher Site | Google Scholar
J. Gagliardino, “Physiological endocrine control of energy homeostasis and postprandial blood glucose levels,” European Review for Medical and Pharmacological Sciences, vol. 9, no. 2, pp. 75–92, 2005.View at: Google Scholar
C. Liu, C. Liu, P. Shao et al., “Comparison of different threshold values r for approximate entropy: Application to investigate the heart rate variability between heart failure and healthy control groups,” Physiological Measurement, vol. 32, no. 2, pp. 167–180, 2011.View at: Publisher Site | Google Scholar
C. K. Karmakar, A. H. Khandoker, R. K. Begg, M. Palaniswami, and S. Taylor, “Understanding ageing effects by approximate entropy analysis of gait variability,” in Proceedings of the 2007 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, pp. 1965–1968, Lyon, France, August 2007.View at: Publisher Site | Google Scholar
S. Kim, D. J. Kim, and J. Jeong, The Effect of Alcohol on Cortical Complexity in Healthy Subjects Measured by Approximate Entropy, Springer Berlin Heidelberg, Berlin, Heidelberg, Germany, 2007.
K. L. Masconi, T. E. Matsha, R. T. Erasmus, and A. P. Kengne, “Effects of different missing data imputation techniques on the performance of undiagnosed diabetes risk prediction models in a mixed-ancestry population of South Africa,” PLoS ONE, vol. 10, no. 9, pp. 1–12, 2015.View at: Google Scholar
R. L. Weinstein, S. L. Schwartz, R. L. Brazg, J. R. Bugler, T. A. Peyser, and G. V. McGarraugh, “Accuracy of the 5-day freestyle navigator continuous glucose monitoring system: Comparison with frequent laboratory reference measurements,” Diabetes Care, vol. 30, no. 5, pp. 1125–1130, 2007.View at: Publisher Site | Google Scholar
J. de Winter, “Using the student’s t–test with extremely small sample sizes,” Practical assessment, research and evaluation, vol. 18, no. 10, pp. 1–12, 2013.View at: Google Scholar
D. Cuesta-Frau, P. Miró-Martínez, S. Oltra-Crespo, J. Jordán-Núñez, B. Vargas, and L. Vigil, “Classification of glucose records from patients at diabetes risk using a combined permutation entropy algorithm,” Computer Methods and Programs in Biomedicine, vol. 165, pp. 197–204, 2018.View at: Publisher Site | Google Scholar
L. Crenier, M. Lytrivi, A. Van Dalem, B. Keymeulen, and B. Corvilain, “Glucose complexity estimates insulin resistance in either nondiabetic individuals or in type 1 diabetes,” The Journal of Clinical Endocrinology & Metabolism, vol. 101, no. 4, p. 1490, 2016.View at: Publisher Site | Google Scholar
B. Fadlallah, B. Chen, A. Keil, and J. Príncipe, “Weighted-permutation entropy: a complexity measure for time series incorporating amplitude information,” Physical Review E: Statistical, Nonlinear, and Soft Matter Physics, vol. 87, no. 2, Article ID 022911, 2013.View at: Publisher Site | Google Scholar