Units in the Meal Absoption Model
See original GitHub issueHi,
I just looked through the meal absoption model in detail and I noticed the following in the script t1dpatient.py:
When you calculate the variable Dbar
in line 130, which is in turn used to calculate the nonlinear gastric emptying rate kgut
, you add the variables last_Qsto
and last_foodtaken
. However, the variable last_Qsto
is in mg as all the digestion states, whereas the variable last_foodtaken
is in g (line 100).
Shouldn’t these variables both be in mg, as Dbar
is in mg?
Cheers, Manuel
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
A New Meal Absorption Model for Artificial Pancreas Systems
Absorption has units of µmol/kg (FFM)/min. FFM: fat free mass. Among all models, Model 1, which assumes a single shape, is the least...
Read more >After-meal blood glucose level prediction using an absorption ...
A new training method is proposed for a neural network in which an absorption model is applied that uses the nutrient contents of...
Read more >Increased Rates of Meal Absorption Do Not Explain Elevated ...
Animal models of type 2 diabetes exhibit enhanced activity and abundance of intestinal sodium-dependent glucose cotransporter 1 (SGLT-1) and solute carrier ...
Read more >Enhancing Blood Glucose Prediction with Meal Absorption ...
Here, we present a novel glucose prediction algorithm which, in addition to standard inputs, accounts for meal absorption and physical exercise information to ......
Read more >Sensors | Free Full-Text | Using Absorption Models for Insulin and ...
Experimenting with various absorption curve shapes for all patients and for all meals is a slight methodological error (no wonder it did not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I hava made some further investigations into this and found the following:
I have extracted the parameters for a normal subject from the article “Meal Simulation Model of the Glucose-Insulin System”, Dalla Man, IEEE TBME, 2007. I had to assume a BW of 78 kg as it is not provided. The paper gives the following time course of the rate of glucose appearance (Ra) from three meals:
I then adapted the code to give me Ra using it as a second observation:
Ra = self.state[2] * self._params.f * self._params.kabs / self._params.BW
The fact that the model of the toolbox describes a T1DM subject is irrelevant as the meal absoption model is identical. Using the current code, i.e. NOT multiplying by 1000, I get the following result which does not match with the shape given in the paper
However, if I multiply by 1000, as I suggested before, I get a result that matches much better regarding shape. The amplitude is dependent on the BW which I had to assume, so it cannot be compared
For me this makes it quite clear that my suggestion is correct and the current version (without multiplying 1000) is a bug. Here is the csv file with the parameters I extracted from the paper. The subject is called “normal”: vpatient_params.csv
Wow that was really detailed investigation. You are right. I checked the equation. Dbar should be in mg. Let me submit a fix for this. Thank you so much for your bug report. Please do submit issues to this repo when you find any other bugs in the future. Thank you so much!