The approach we choosed for the predictive model is fuzzy logic. There are mainly two reasons for that:
If the diabetic wrote down an history of glycaemia tests, insulin injections and circumstances, a supervised learning permits to initialize the fuzzy rules. If not, generic rules based on physicians experience are established.
The predictive system is divided into two Takagy-Sugeno FIS: before meal and after meal. Indeed, the "nature of the meal" and "physical exercise" inputs are not significant simultaneously. Reducing the number of inputs in the premises generates less rules and so facilitates the interpretability.
![]() |
![]() |
FIS used in the predictions |
---|
Among all entries, the value of the current glycaemia is the more accurate entry. A device takes a drop of blood in order to test it. Should the device be a sensor or a lancet, it is designed to have a small error rate.
Both inputs are the ones that can be the less accurate beacause they are based on
the user's a prori estimations.
The latter may misjudge. Indeed, valuate precisely the glucid strenght of a meal
requires dietetics skills and all diabetics do not.
This requires not only the knowledge of the glucid value of each distinct food,
but also the ability to appreciate the consequences of foodstuffs associations.
For example, glucids contained in a potato won't be assimilated in the same way
whether it is eaten with bred or not.
On the other hand, even if the user is experienced, some unexpecteds may happen
and thwart one's plans.
For example, we can imagine somebody's intents to practise an outdoor sport
discouraged by a sudden rainfall.
The graphs shown in the
"insulin treatment" section have a pretty rough internal approximation.
Indeed, a more subtle modelisation would be unprofitable, having regard to
dubiousness due to uncertain other inputs (nature of the meal and intended exercise).
Moreover, the effects of the insulin injections vary depending on organisms.
Individually, the curve of the hypoglycemic power of a type of insulin is approximated by an
affine function described like this:
The parameters involved in the modelisation of this graph initially have default values but are adjustable as described in the user manual (french only).
We just saw the way an individual insulin injection is modelised. But the hypoglycemic power of the active insulin in the organism at a given moment is the result of several insulin injections, maybe of different types. Indeed, as we have seen in the insulin treatment section, both regular and lente insulin are used together. To express the resultant hypoglicemic power at a given moment, the additive character of the hypoglycemic power of regular and lente insulin. Moreover, the effects of an injection of insulin may last after the next injection of the same type of insulin. The figure below represents the overlap of insulin actions during a day when a diabetic would make an injection of lente insulin in the morning and in the evenning and an injection of regular insulin before each meal as well.
![]() |
Additive character of the hypoglycemic power of several insulin injections |
---|
The fuzzy subsets that constitute the partitions of inputs and conclusion are
shown below.
The measurement of the current glycaemia is, as we said, an accurate input,
we divided this entry into four fuzzy subsets. A normal fasten glycaemia is
about 1g/l, and a little bit more after the meal.
![]() |
Fuzzy partition of the "Glycaemia" variable |
---|
The "nature of the meal" and "exercise" are inaccurate, they are divided into
two fuzzy subsets.
There is no unit for these inputs so the user indicates his estimation thanks
to a graphic bar.
Their internal values range from 0 up to 1. 0 represents a minimal suggar value
or an absence of exercise and 1 a maximum value.
![]() |
![]() |
Fuzzy partition of the "Nature of the meal" variable | Fuzzy partition of the "Physical exercise" variable |
---|
We reprensent the resultant hypoglycemic power of the different active injections of insulin by a variable which name is insulin power. It is divided into two fuzzy subsets. See the calculation details for a given injection.
![]() |
Fuzzy partition of the "Insulin power" variable |
---|
At last, the "glycaemia varaition" has been divided into nine subsets. It will enable a fine choice when setting a qualitative conclusion for each rule.
![]() |
Fuzzy partition of the conclusion "Glycaemia variations" |
---|
Current glycaemia | Insulin | Nature of the meal | Glycaemia variation |
---|---|---|---|
hypoglycaemia | low | not sugared | |
hypoglycaemia | low | sugared | |
hypoglycaemia | high | not sugared | |
hypoglycaemia | high | sugared | |
normal | low | not sugared | |
normal | low | sugared | |
normal | high | not sugared | |
normal | high | sugared | |
high | low | not sugared | |
high | low | sugared | |
high | high | not sugared | |
high | high | sugared | |
hyperglycaemia | low | not sugared | |
hyperglycaemia | low | sugared | |
hyperglycaemia | high | not sugared | |
hyperglycaemia | high | sugared |
Current glycaemia | Insulin | Physical exercise | Glycaemia variation |
---|---|---|---|
hypoglycaemia | low | quiet | |
hypoglycaemia | low | intense | |
hypoglycaemia | high | quiet | |
hypoglycaemia | high | intense | |
normal | low | quiet | |
normal | low | intense | |
normal | high | quiet | |
normal | high | intense | |
high | low | quiet | |
high | low | intense | |
high | high | quiet | |
high | high | intense | |
hyperglycaemia | low | quiet | |
hyperglycaemia | low | intense | |
hyperglycaemia | high | quiet | |
hyperglycaemia | high | intense |