Skip to content

Regarding the maxCOBPredBG calculation logic in the DetermineBasalSMB algorithm #1474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
doudou-ux opened this issue Apr 11, 2025 · 2 comments

Comments

@doudou-ux
Copy link

As highlighted in the red box:The code is comparing with maxIOBPredBG rather than maxCOBPredBG when recording the maximum COB prediction.

My questions are:
1、Is this an intentional design choice to only record COB predictions that exceed the maximum IOB prediction? Or should it have been comparing COBpredBG > maxCOBPredBG to simply track the absolute maximum of COB predictions?
2、2、If this is intentional, what is the purpose of this design? Is it to highlight the additional blood glucose rise caused by carbohydrates?

I appreciate your insights on this matter.

Image

@scottleibrand
Copy link
Contributor

It looks like that variable was updated as part of 7c8556f, which has a commit comment of "fix minPredBG logic for high-temping based on minIOBPredBG". Previous to that it was introduced in 44e54fb with the comment
"output predBGs as an object with three different predictive arrays"

Beyond that, I don't remember why I changed that particular variable (back in April 2017).

@scottleibrand
Copy link
Contributor

o3, which just came out last week, also does a good job of contextualizing that safety check and explaining how it helps make SMB safe/possible: https://chatgpt.com/share/680577e9-3d04-8007-83b1-36d104cb809d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants