+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 15 of 32

algorithms to analyze BG, carbohydrates, insulin

This is a discussion on algorithms to analyze BG, carbohydrates, insulin within the Diabetes forums, part of the Living with Diabetes category; I've seen a few questions lately about testing, basal rates, insulin ratios, et cetera. I don't know what software is ...

  1. #1
    Eddy is offline Banned
    Join Date
    Jan 2008
    Posts
    1,242

    algorithms to analyze BG, carbohydrates, insulin

    I've seen a few questions lately about testing, basal rates, insulin ratios, et cetera. I don't know what software is "out there", and it would be forever and a day before I could get around to writing anything[1], but I probably could document algorithms and ideas that I use. e.g., Starting to inject insulin before meals and I have questions

    Anyone interested? If so, I'll try to dust off my LaTeX skills (realistically speaking: around September) and write up some stuff.

    However, if good books or tools already exist, I don't want to duplicate prior efforts. Yes, I'm a renegade diabetic (diabetic renegade?) who prefers researching literature and taking a self-managed approach; I consequently am totally naive what resources exist, because I've never had the urge to find out. I guess I could examine oft-cited books, but I've heard that they sometimes resort to "consult an endocrinologist".

    [1] Right now, for-fun and free stuff have to take a back seat. (And, seeing all the challenges people have, I'd feel much better if any such software were free.) Although perhaps if I cut back time spent on DF...

  2. #2
    xMenace's Avatar
    xMenace is offline Senior Member I am a: Type 1
    Join Date
    Jun 2006
    Location
    New Brunswick Canada, eh
    Posts
    9,582
    Blog Entries
    8
    I actually tried calculating my basal adjustment needs in Excel. It's been awhile, and I wasn't exactly successful. I was close though. Maybe a revisit would be worthwhile.

    The biggest issue is that sensitivity has to be estimated. If you knew your sensitivity, you wouldn't need to basal test or go through trial and error.
    From Shakespeare's Romeo and Juliet, 1594.

    Nor arm, nor face, nor any other part
    Belonging to a man. O, be some other name!
    What's in a name? that which we call a rose
    By any other name would smell as sweet;


    Minimed 722 Pump, Novarapid, Ramipril A1C 5.6% Diagnosed Oct 19th, 1975.

  3. #3
    Eddy is offline Banned
    Join Date
    Jan 2008
    Posts
    1,242
    That's the reason for the curve-fitting. Sensitivity and basal error are the variables.

    Of course, you're one of those wacky-basal folks... which makes things more interesting...

  4. #4
    xMenace's Avatar
    xMenace is offline Senior Member I am a: Type 1
    Join Date
    Jun 2006
    Location
    New Brunswick Canada, eh
    Posts
    9,582
    Blog Entries
    8
    Quote Originally Posted by Eddy View Post
    Of course, you're one of those wacky-basal folks... which makes things more interesting...
    Very.

    I kind of compare it to surfing, riding waves. Sometimes you fall off.
    From Shakespeare's Romeo and Juliet, 1594.

    Nor arm, nor face, nor any other part
    Belonging to a man. O, be some other name!
    What's in a name? that which we call a rose
    By any other name would smell as sweet;


    Minimed 722 Pump, Novarapid, Ramipril A1C 5.6% Diagnosed Oct 19th, 1975.

  5. #5
    shiftzor's Avatar
    shiftzor is offline Senior Member I am a: Type 1
    Join Date
    Aug 2007
    Location
    UK
    Posts
    994
    Eddy I am currently writing a carb counting application, basically the idea is to organise recipes with carb quantities and make bolusing easy. Meal times can then be quickly created from ingredients or recipes, storing insulin records and bg after is only a step away. I am also storing things like changes to insulin and allowing you to use different I:C at any time of the day. It’s an ambitious plan but i will get there in the end. The software I currently use is winglucofacts pro which gives me hints on insulin doses and bg patterns with graphs. I would love to combine the two piece of software together however I don't have enough time to do it all. Only downside here is that I am writing it all in C#.NET not LaTeX, I am happy to work with others if they want to add bits and pieces to it, and then release this software to other diabetics under an open source license or something. Turning it into a web application is definitely another possibility. PM if you have any ideas or want to offer some assistance.

    Pumping 20/05/2009 Animas 2020

    Standard Deviation (Target below 2.1mmol/L | 38mg/dL)
    02.06.10-01.07.10: 3.0mmol/L | 54mg/dL
    02.05.09-01.06.10: 2.8mmol/L | 50mg/dL

    HbA1c
    30.12.09: 6.2 (7.9mmol/L | 143mg/dL)
    28.01.09: 6.1 (7.7mmol/L | 140mg/dL)
    21.05.08: 6.2 (7.9mmol/L | 143mg/dL)
    29.11.07: 6.1 (7.7mmol/L | 140mg/dL)
    23.05.07: 8.1 (11.6mmol/L | 211mg/dL)
    Diagnosed 27.08.06: 14.8 (24.7mmol/L or 450mg/dL)

  6. #6
    Eddy is offline Banned
    Join Date
    Jan 2008
    Posts
    1,242
    Quote Originally Posted by xMenace View Post
    Very.

    I kind of compare it to surfing, riding waves. Sometimes you fall off.
    In fact... if you have -- or anyone else has -- basal logs that you'd not mind sharing, I'm curious to try looking for mathematical patterns in actual wacky basals. (I'm pretty much a flat-liner, although my regimen currently is getting a bit more odd.)

    I don't know how many independent variables I'd use initially, so I'm unsure how much data to use. I've worked with overnight-only when someone was testing and correcting frequently... but a week's worth would be handy.

    *shrug*

    It just seems that there's enough hair-tearing and teeth-gnashing that someone should try codifying this a bit more formally. And, if it fails... that's also valuable information.

  7. #7
    shiftzor's Avatar
    shiftzor is offline Senior Member I am a: Type 1
    Join Date
    Aug 2007
    Location
    UK
    Posts
    994
    Quote Originally Posted by Eddy View Post
    In fact... if you have -- or anyone else has -- basal logs that you'd not mind sharing, I'm curious to try looking for mathematical patterns in actual wacky basals. (I'm pretty much a flat-liner, although my regimen currently is getting a bit more odd.)

    I don't know how many independent variables I'd use initially, so I'm unsure how much data to use. I've worked with overnight-only when someone was testing and correcting frequently... but a week's worth would be handy.

    *shrug*

    It just seems that there's enough hair-tearing and teeth-gnashing that someone should try codifying this a bit more formally. And, if it fails... that's also valuable information.
    Yes, it does sound like a problem worth solving, creating a useful tool is not always easy though. The winglucofacts pro as I said in my other post uses standard deviation and "periods" through a day to watch for changes in bg patterns. Might be worth checking out, I could provide you with a sample of my results however they are locked into the proprietary winglucofacts format. I am sure with some effort I could “free” them obviously contacting Assencia and asking for permission first. Nothing illegal here sir.

    Pumping 20/05/2009 Animas 2020

    Standard Deviation (Target below 2.1mmol/L | 38mg/dL)
    02.06.10-01.07.10: 3.0mmol/L | 54mg/dL
    02.05.09-01.06.10: 2.8mmol/L | 50mg/dL

    HbA1c
    30.12.09: 6.2 (7.9mmol/L | 143mg/dL)
    28.01.09: 6.1 (7.7mmol/L | 140mg/dL)
    21.05.08: 6.2 (7.9mmol/L | 143mg/dL)
    29.11.07: 6.1 (7.7mmol/L | 140mg/dL)
    23.05.07: 8.1 (11.6mmol/L | 211mg/dL)
    Diagnosed 27.08.06: 14.8 (24.7mmol/L or 450mg/dL)

  8. #8
    Eddy is offline Banned
    Join Date
    Jan 2008
    Posts
    1,242
    Quote Originally Posted by shiftzor View Post
    creating a useful tool is not always easy though.
    No kidding.

    Quote Originally Posted by shiftzor View Post
    The winglucofacts pro as I said in my other post uses standard deviation
    I've noticed that. I'm not terribly keen on the stddev calculation, as it's highly dependent on testing pattern. It's easily calculated, though, so minimal development effort made for something that might look impressive at first blush.

    Quote Originally Posted by shiftzor View Post
    and "periods" through a day to watch for changes in bg patterns. Might be worth checking out, I could provide you with a sample of my results however they are locked into the proprietary winglucofacts format.
    Interesting. Even screen shots would be cool.

    Quote Originally Posted by shiftzor View Post
    I am sure with some effort I could “free” them obviously contacting Assencia and asking for permission first. Nothing illegal here sir.
    Yes, by all means: If anyone has any restrictions, keep everything above-board.

  9. #9
    Eddy is offline Banned
    Join Date
    Jan 2008
    Posts
    1,242
    I overlooked one of your posts. D'oh!

    Quote Originally Posted by shiftzor View Post
    Eddy I am currently writing a carb counting application, basically the idea is to organise recipes with carb quantities and make bolusing easy.
    Cool.

    Quote Originally Posted by shiftzor View Post
    Meal times can then be quickly created from ingredients or recipes, storing insulin records and bg after is only a step away. I am also storing things like changes to insulin and allowing you to use different I:C at any time of the day.
    Also cool. If you haven't already, you might look into

    SQLite Home Page

    for data storage.

    Quote Originally Posted by shiftzor View Post
    It’s an ambitious plan but i will get there in the end. The software I currently use is winglucofacts pro which gives me hints on insulin doses and bg patterns with graphs. I would love to combine the two piece of software together however I don't have enough time to do it all. Only downside here is that I am writing it all in C#.NET not LaTeX,
    LaTeX is a text layout language. I was referring to documenting my madness, even before bothering whipping up source code.

    For development, I'm most at home using C/C++ on POSIX-ish systems. That said, I've also written stuff for Windows -- once upon a time in the days of Win32S (anyone else remember that?) -- and could brush up.

    Quote Originally Posted by shiftzor View Post
    I am happy to work with others if they want to add bits and pieces to it, and then release this software to other diabetics under an open source license or something.
    Yes. My personal bias is toward BSD license, including restrictive advertising clause. (If someone else wants to take the work, expand on it, and sell it... fine, as long as people know there's a free alternative.)

    Quote Originally Posted by shiftzor View Post
    Turning it into a web application is definitely another possibility.
    *nod*

    I thought of that. And, with plenty of bandwidth and equipment available, I'm more than willing to host it. However, I also think it would be nice to give people untethered, totally-trustable, standalone software, for those who would rather not deal with a third party.

    Quote Originally Posted by shiftzor View Post
    PM if you have any ideas or want to offer some assistance.
    I'll PM you with email address.

  10. #10
    Eddy is offline Banned
    Join Date
    Jan 2008
    Posts
    1,242
    A little cross-pollination is in order:

    Is there software that does all of this...

  11. #11
    millyyates is offline Junior Member
    Join Date
    May 2008
    Posts
    60
    where did you guys get up to? This is sooo needed.

  12. #12
    shiftzor's Avatar
    shiftzor is offline Senior Member I am a: Type 1
    Join Date
    Aug 2007
    Location
    UK
    Posts
    994
    We are still talking about it, although I think eddy has run away hope he is oki. Things have been busy lately I will have to put fingers to keyboard. If there is keen interest in something like this I am willing to invest time in it. Time to get the ball rolling.

    Hopefully we can have some prototypes up and running with some community input would be good to test it and make sure it is useful. Any additional help is appreciated as there are many components to this plan from reading meter data to design of user interfaces.

    Pumping 20/05/2009 Animas 2020

    Standard Deviation (Target below 2.1mmol/L | 38mg/dL)
    02.06.10-01.07.10: 3.0mmol/L | 54mg/dL
    02.05.09-01.06.10: 2.8mmol/L | 50mg/dL

    HbA1c
    30.12.09: 6.2 (7.9mmol/L | 143mg/dL)
    28.01.09: 6.1 (7.7mmol/L | 140mg/dL)
    21.05.08: 6.2 (7.9mmol/L | 143mg/dL)
    29.11.07: 6.1 (7.7mmol/L | 140mg/dL)
    23.05.07: 8.1 (11.6mmol/L | 211mg/dL)
    Diagnosed 27.08.06: 14.8 (24.7mmol/L or 450mg/dL)

  13. #13
    millyyates is offline Junior Member
    Join Date
    May 2008
    Posts
    60
    I have been looking for something like this and don't understand why it hasn't already been done. I am not a software person but go for it. Anything that helps has to be better than what the current position is. Any help I can give I will.

    Milly's Dad

  14. #14
    Eddy is offline Banned
    Join Date
    Jan 2008
    Posts
    1,242
    Quote Originally Posted by shiftzor View Post
    We are still talking about it, although I think eddy has run away hope he is oki. Things have been busy lately I will have to put fingers to keyboard. If there is keen interest in something like this I am willing to invest time in it. Time to get the ball rolling.
    Yeah, I ran off for a bit. Work has been crazy busy... and I became nocturnal, then had a tough time shaking the habit. I think I'm at least getting back to sane-person hours.

    (The good part: Crazy sleep hours made it easier to basal test!)

    Quote Originally Posted by shiftzor View Post
    Hopefully we can have some prototypes up and running with some community input would be good to test it and make sure it is useful. Any additional help is appreciated as there are many components to this plan from reading meter data to design of user interfaces.
    What would people place as the highest priorities?

  15. #15
    millyyates is offline Junior Member
    Join Date
    May 2008
    Posts
    60
    My suggestion would be to have a computer program that for pump or mdi you could put in carbs eaten, phyisical demensions, insulin regime , blood glucose levels and any other attributes considered appropriate and the computer program would calculate basal and bolus profiles. It would learn from current data. So if your profiles changed season to season etc you simple put in or download current data and updated profiles would be produced. I know this may sound like pie in the sky but currently there are so many people out there with little guidance or making no changes at all. I know the outcomes would not be perfect but it would have to be better than the current guess and miss situation. Chat rooms are full of people searching for basal profiles and doctors just don't have the time. You can't tell me that with the right computer programmer, mathematician, web designer that a user friendly "educational" tool could not be developed. The goal would be a computer program that showed based on previous results what basal rates and bolus rates could give a mathematical best fit and show this graphically.


    From a priority point of view I think to start on basal rates is a good place. I have done a lot of research on what is available and what has been done inthe past.

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast

LinkBacks (?)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Content Relevant URLs by vBSEO 3.5.1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34