Last papers of the Group about Artificial Pancreas Research

Data Based Prediction of Blood Glucose Concentrations Using Evolutionary Methods . Journal of Medical Systems, September 2017, 41:142. — Predicting glucose values on the basis of insulin and food intakes is a difficult task that people with diabetes need to do daily. This is necessary as it is important to maintain glucose levels at appropriate values to avoid not only short-term, but also long-term complications of the illness. Artificial intelligence in general and machine learning techniques in particular have already lead to promising results in modeling and predicting glucose concentrations. In this work, several machine learning techniques are used for the modeling and prediction of glucose concentrations using as inputs the values measured by a continuous monitoring glucose system as well as also previous and estimated future carbohydrate intakes and insulin injections. In particular, we use the following four techniques: genetic programming, random forests, k-nearest neighbors, and grammatical evolution. We propose two new enhanced modeling algorithms for glucose prediction, namely (i) a variant of grammatical evolution which uses an optimized grammar, and (ii) a variant of tree-based genetic programming which uses a three-compartment model for carbohydrate and insulin dynamics. The predictors were trained and tested using data of ten patients from a public hospital in Spain. We analyze our experimental results using the Clarke error grid metric and see that 90% of the forecasts are correct (i.e., Clarke error categories A and B), but still even the best methods produce 5 to 10% of serious errors (category D) and approximately 0.5% of very serious errors (category E). We also propose an enhanced genetic programming algorithm that incorporates a three-compartment model into symbolic regression models to create smoothed time series of the original carbohydrate and insulin time series.

Recovery of Particle Detector Degeneration Based on the Pulse Height Spectrum of an Adaptive Trapezoidal Pulse Shaper . IEEE Transactions on Nuclear Science, Volume: 64, Issue: 4, April 2017. — The design of a trapezoidal pulse shaper requires the definition of four parameters (k, l, m1, and m2) whose values are defined based on the characteristics of the input signal (timing, noise, etc.). A radiation detector and the data acquisition electronics provide this signal. The detector degenerates after high doses of radiation and its output no longer meets the original requirements. This behavior may lead to erroneous measurements of particle characteristics (energy, mass, charge, etc.). We present a method to adapt the shaper's parameters to the degenerated behavior of the system based on the pulse height spectrum. It calculates, in real time, the new parameter values that recover the original detection specification under the new detector characteristics. We introduce the implementation of the system on a field programmable gate array as well. The implementation allows the autonomous recovery of the shaper in real time. Finally, we present the experimental results after testing the performance of this proposal using real data from the Castilla-La Mancha neutron monitor.

Forecasting glucose levels in patients with diabetes mellitus using semantic grammatical evolution and symbolic aggregate approximation. Proceedings of the 2017 conference companion on Genetic and evolutionary computation companion, July 2017, Pages 1387-1394. — Type 1 Diabetes Mellitus can only be treated injecting insulin and glucagon into the blood stream. This research is motivated by the challenge to accurately predict future blood glucose levels of a diabetic patient so that an automatic system could decide when is necessary the injection of a bolus of insulin to keep blood sugar in the healthy range. In this paper, we have studied different evolutionary strategies based on geometric semantic genetic programming and grammatical evolution. The main contribution of this paper is the use of the symbolic aggregate approximation representation of the glucose time series that allow us to define easily semantic operators. We have developed a new strategy that combines grammatical evolution with the geometric semantic approach and that, thanks to the use of the symbolic representation, improves the previous models of glucose time series. We also present a variation of this technique that employs a univariate marginal distribution algorithm to tune the parameters of the symbolic representation. The experimental results are compared against classical grammatical evolution and geometric semantic hill climbing genetic programming. The baseline is provided by the conventional ARIMA model. Our experimental results show that the symbolic representation improves the performance of the geometric semantic strategy and reduces the number of mistakes that, if in an automatic system, would put patient's health at risk.

Data augmentation and evolutionary algorithms to improve the prediction of blood glucose levels in scarcity of training data . Proceedings of the 2017 conference companion on Genetic and evolutionary computation companion, June 2017 IEEE. — Diabetes Mellitus Type 1 patients are waiting for the arrival of the Artificial Pancreas. Artificial Pancreas systems will control the blood glucose of patients, improving their quality of life and reducing the risks they face daily. At the core of the Artificial Pancreas, an algorithm will forecast future glucose levels and estimate insulin bolus sizes. Grammatical Evolution has been proved as a suitable algorithm for predicting glucose levels. Nevertheless, one of the main obstacles that researches have found for training the Grammatical Evolution models is the lack of significant amounts of data. As in many other fields in medicine, the collection of data from real patients is very complex along with the fact that the patient's response can vary in a high degree due to a lot of personal factors which can be seen as different scenarios. In this paper, we propose both a classification system for scenario selection and a data augmentation algorithm that generates synthetic glucose time series from real data. Our experimental results show that, in a scarce data context, Grammatical Evolution models can get more accurate and robust predictions using scenario selection and data augmentation.

https://link.springer.com/journal/13748 A genetic algorithm approach to customizing a glucose model based on usual therapeutic parameter. Progress in Artificial Intelligence. September 2017, Volume 6, Issue 3, pp 255–261


Type 1 diabetes mellitus is a chronic disease characterized by the increase of glucose in the blood due to a defect in the action or in the production of insulin. For completely autonomous glycemic regulation, a model would be required which permits the future evolution of blood glucose to be estimated. One of the main problems in identifying models is the high variability of glucose profiles both from one patient to another, and in the same patient under not very different conditions. In this paper, we propose a method using an evolutionary algorithm to define the values of the parameters of a minimal model based on standard clinical therapy for a several-day horizon. The algorithm is able to show the trend of blood glucose in a 5-day profile by adjusting the glucose model.

Enhancing Grammatical Evolution Through Data Augmentation: Application to Blood Glucose Forecasting.European Conference on the Applications of Evolutionary Computation. EvoApplications 2017: Applications of Evolutionary Computation pp 142-157. LNCS — Currently, Diabetes Mellitus Type 1 patients are waiting hopefully for the arrival of the Artificial Pancreas (AP) in a near future. AP systems will control the blood glucose of people that suffer the disease, improving their lives and reducing the risks they face everyday. At the core of the AP, an algorithm will forecast future glucose levels and estimate insulin bolus sizes. Grammatical Evolution (GE) has been proved as a suitable algorithm for predicting glucose levels. Nevertheless, one the main obstacles that researches have found for training the GE models is the lack of significant amounts of data. As in many other fields in medicine, the collection of data from real patients is very complex. In this paper, we propose a data augmentation algorithm that generates synthetic glucose time series from real data. The synthetic time series can be used to train a unique GE model or to produce several GE models that work together in a combining system. Our experimental results show that, in a scarce data context, Grammatical Evolution models can get more accurate and robust predictions using data augmentation.

Predicting Glycemia in Diabetic Patients By Evolutionary Computation and Continuous Glucose Monitoring. Proceedings of the 2016 conference companion on Genetic and evolutionary computation companion, July 2016, Pages 1393-1400.


Diabetes mellitus is a disease that affects more than three hundreds million people worldwide. Maintaining a good control of the disease is critical to avoid not only severe long-term complications but also dangerous short-term situations. Diabetics need to decide the appropriate insulin injection, thus they need to be able to estimate the level of glucose they are going to have after a meal. In this paper we use machine learning techniques for predicting glycemia in diabetic patients. The algorithms utilize data collected from real patients by a continuous glucose monitoring system, the estimated number of carbohydrates, and insulin administration for each meal. We compare (1) non-linear regression with fixed model structure, (2) identification of prognosis models by symbolic regression using genetic programming, (3) prognosis by k-nearest-neighbor time series search, and (4) identification of prediction models by grammatical evolution. We consider predictions horizons of 30, 60, 90 and 120 minutes.

Compilable Phenotypes: Speeding-Up the Evaluation of Glucose Models in Grammatical Evolution. Proceedings of the 2015 conference companion on Genetic and evolutionary computation companion, July 2015, Pages 118-133.


This paper presents a method for accelerating the evaluation of individuals in Grammatical Evolution. The method is applied for identification and modeling problems, where, in order to obtain the fitness value of one individual, we need to compute a mathematical expression for different time events. We propose to evaluate all necessary values of each individual using only one mathematical Java code. For this purpose we take profit of the flexibility of grammars, which allows us to generate Java compilable expressions. We test the methodology with a real problem: modeling glucose level on diabetic patients. Experiments confirms that our approach (compilable phenotypes) can get up to 300x reductions in execution time.

Data-Based Identification of Prediction Models for Glucose.. Proceedings of the 2015 conference companion on Genetic and evolutionary computation companion, July 2015, Pages 1327-1334.


Diabetes mellitus is a disease that affects to hundreds of million of people worldwide. Maintaining a good control of the disease is critical to avoid severe long-term complications. One of the main problems that arise in the (semi) automatic control of diabetes, is to get a model explaining how glucose levels in blood vary with insulin, food intakes and other factors, fitting the characteristics of each individual or patient. In this paper we compare genetic programming techniques with a set of classical identification techniques: classical simple exponential smoothing, Holt's smoothing (linear, exponential and damped), classical Holt and Winters methods and auto regressive integrated moving average modeling. We consider predictions horizons of 30, 60, 90 and 120 minutes. Experimental results shows the difficulty of predicting glucose values for more than 60 minutes and the necessity of adapt GP techniques for those dynamic environments.

Real time evolvable hardware for optimal reconfiguration of cusp-like pulse shapers. Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment. Volume 763, 1 November 2014, Pages 124–131.


The design of a cusp-like digital pulse shaper for particle energy measurements requires the definition of four parameters whose values are defined based on the nature of the shaper input signal (timing, noise, …) provided by a sensor. However, after high doses of radiation, sensors degenerate and their output signals do not meet the original characteristics, which may lead to erroneous measurements of the particle energies. We present in this paper an evolvable cusp-like digital shaper, which is able to auto-recalibrate the original hardware implementation into a new design that match the original specifications under the new sensor features.

Modeling glycemia in humans by means of Grammatical Evolution. Applied Soft Computing. Volume 20, July 2014, Pages 40–53


Diabetes mellitus is a disease that affects to hundreds of millions of people worldwide. Maintaining a good control of the disease is critical to avoid severe long-term complications. In recent years, several artificial pancreas systems have been proposed and developed, which are increasingly advanced. However there is still a lot of research to do. One of the main problems that arises in the (semi) automatic control of diabetes, is to get a model explaining how glycemia (glucose levels in blood) varies with insulin, food intakes and other factors, fitting the characteristics of each individual or patient. This paper proposes the application of evolutionary computation techniques to obtain customized models of patients, unlike most of previous approaches which obtain averaged models. The proposal is based on a kind of genetic programming based on grammars known as Grammatical Evolution (GE). The proposal has been tested with in silico patient data and results are clearly positive. We present also a study of four different grammars and five objective functions. In the test phase the models characterized the glucose with a mean percentage average error of 13.69%, modeling well also both hyper and hypoglycemic situations.

Clarke and parkes error grid analysis of diabetic glucose models obtained with evolutionary computation.. Proceedings of the 2014 conference companion on Genetic and evolutionary computation companion, July 2014, Pages 1305-1312.


Diabetes mellitus is a disease that affects to hundreds of millions of people worldwide. Maintaining a good control of the disease is critical to avoid severe long-term complications. In recent years, a lot of research has been made to improve the quality of life of the diabetic patient, especially in the automation of glucose level control. One of the main problems that arises in the (semi) automatic control of diabetes, is to obtain a model that explains the behavior of blood glucose levels with insulin, food intakes and other external factors, fitting the characteristics of each individual or patient. Recently, Grammatical Evolution (GE), has been proposed to solve this lack of models. A proposal based on GE was able to obtain customized models of five in-silico patient data with a mean percentage average error of 13.69%, modeling well also both hyper and hypoglycemic situations. In this paper we have extended the study of Error Grid Analysis (EGA) to prediction models in up to 8 in-silico patients. EGA is commonly used in Endocrinology to test the clinical significance of differences between measurements and real value of blood glucose, but has not been used before as a metric in obtention of glycemia models.

glUCModel: A monitoring and modeling system for chronic diseases applied to diabetes.Journal of Biomedical Informatics. Volume 48, April 2014, Pages 183–192.


Chronic patients must carry out a rigorous control of diverse factors in their lives. Diet, sport activity, medical analysis or blood glucose levels are some of them. This is a hard task, because some of these controls are performed very often, for instance some diabetics measure their glucose levels several times every day, or patients with chronic renal disease, a progressive loss in renal function, should strictly control their blood pressure and diet. In order to facilitate this task to both the patient and the physician, we have developed a web application for chronic diseases control which we have particularized to diabetes. This system, called glUCModel, improves the communication and interaction between patients and doctors, and eventually the quality of life of the former. Through a web application, patients can upload their personal and medical data, which are stored in a centralized database. In this way, doctors can consult this information and have a better control over patient records. glUCModel also presents three novelties in the disease management: a recommender system, an e-learning course and a module for automatic generation of glucose levels model. The recommender system uses Case Based Reasoning. It provides automatic recommendations to the patient, based on the recorded data and physician preferences, to improve their habits and knowledge about the disease. The e-learning course provides patients a space to consult information about the illness, and also to assess their own knowledge about the disease. Blood glucose levels are modeled by means of evolutionary computation, allowing to predict glucose levels using particular features of each patient. glUCModel was developed as a system where a web layer allows the access of the users from any device connected to the Internet, like desktop computers, tablets or mobile phones.

Real-time evolvable pulse shaper for radiation measurements. Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment. Volume 727, 1 November 2013, Pages 73–83


In the last two decades, recursive algorithms for real-time digital pulse shaping in pulse height measurements have been developed and published in number of articles and textbooks. All these algorithms try to synthesize in real time optimum or near optimum shapes in the presence of noise. Even though some of these shapers can be considered effective designs, some side effects like aging cannot be ignored. We may observe that after sensors degradation, the signal obtained is not valid. In this regard, we present in this paper a novel technique that, based on evolvable hardware concepts, is able to evolve the degenerated shaper into a new design with better performance than the original one under the new sensor features.

Back to top
artificial_pancreas_papers.txt · Last modified: 2017/09/02 11:01 by J. Ignacio Hidalgo