tiagosegato / mas4gc

A multiagent system for glycemic control in ICU
6 stars 2 forks source link

Improvements to control for MAS4GC #4

Open ijustlovemath opened 2 years ago

ijustlovemath commented 2 years ago

Hi all,

I'm the author of a few of the studies [cited as 5-7] you cited in your recently published paper (congrats, by the way!). If you're open to it, I'd like to make some suggestions which may improve your clinical results, at the expense of potentially adding some complexity to your agents.

Let me know if this is something you're interested in and I can post my thoughts in this thread.

Jeremy

tiagosegato commented 2 years ago

Hi Jeremy!

Are you DeJournett!?

How amazing, your works are great, an honor to have my article read by you and be able to talk to you. Without a doubt, I accept your suggestions, it will be a pleasure.

Best Regards, Tiago

ijustlovemath commented 2 years ago

Yes, I'm one of the DeJournetts! Thank you, you're too kind. As you know, it's always a pleasure when someone actually reads your research!

So, correct me if I'm wrong here, but my understanding of MAS4GC is:

A note before I go into the changes: I'm going to recommend you adopt aspects of some of the better performing open source open-loop algorithms out there that are design for use by clinicians, rather than the more performant closed-loop algorithms, as implementation of the frequent sampling and changes may be outside your design goals. I don't know for certain the licensing issues in adopting these algorithms, so you may need to get in contact with the authors of these papers to see how to proceed.

bgrules.py

From my own research of open source clinical protocols, you would probably do best by combining different aspects of different controllers. Table 4 of our comparative study is a great place to start for looking at the performance of each controller across different metrics:

image

As you can see, with the exception of our proprietary controller, the best performing hyopglycemic controller is the Yale paper protocol, which achieved an impressive median 0.81% mild hypoglycemia incidence, and only 0.25% severe hypoglycemia incidence. The protocol is seen as a figure here, or also available from the bibliography of the Comparative study paper.

For Normoglycemia and Hyperglycemia, the best results outside of our controller were achieved by the NICE-SUGAR protocol, whose specification can be found here. Note that the algorithm clearly states it's not meant to be used outside the NICE-SUGAR study, so that may be a licensing issue. After NICE-SUGAR, the original Glucommander protocol works quite well in the normoglycemic and hyperglycemic range. The link to the algorithm can be found in our references.

I would suggest a weighted linear combination of the output of these two controllers, favoring Yale on the lower end, and NICE-SUGAR or Glucommander on the higher end. If could even be simpler than that, using a Yale agent for all hypo values, and the other agent for all values >70mg/dL.

cmrules.py

This appears to be the rules which govern the sampling frequency. A few notes here:

Additionally, I saw that your propagation model appears to be a linear regression, which works well for short time spans (1-5min), but becomes fairly inaccurate the longer you go. Because you're sampling anywhere from every 1h to up to 8h, I would highly highly recommend replacing this with a more comprehensive model, eg the UVA-Padova model, which can be found in Python here: simglucose, or in Chase's ICING model, in C++ here: chase-icing.

These will give much more accurate results over the longer propagation times you want to use for prediction.


Overall, I'm glad your team is working on improving inpatient glucose control in Brazil, and wish you all the best in further studies. Let me know if you have any questions!

ijustlovemath commented 2 years ago

One other thing I forgot to mention:

If you're looking to move beyond a rule base system and into more of a deep learning/NN based agent for decision making, look into using the scoring metric proposed in the comparative simluation paper. Details of the individual components of the metric are found in Table 1:

image

I think as discussed it's made to be a step function, but there's nothing stopping you from removing any floor()/ceil() to make it more differentiable/ReLU-like.

That's it for now!

tiagosegato commented 2 years ago

It's a pleasure to meet you DeJournett!

Wow, I'm impressed with the amount of contributions and coming from you (based on your articles and research) will definitely add a lot to the work.

Sorry for the delay in responding, but I will thoroughly analyze each of your recommendations and will definitely follow the ones within our reach.

I can already say that you are correct in relation to the 4 points regarding the functioning of the MAS4GC. And as I said, I will soon analyze each of the points and give you feedback here.

Thank you one more time!

ijustlovemath commented 2 years ago

Not a problem Dr. Segato, we all get busy, especially so around this time of year! I think the most actionable and important change you can make is the one re:cmrules.py, as it's just a couple of numbers you need to change and will greatly enhance the safety of patients using your service.

If you plan to write a paper on it, would be happy to collaborate if that's something you're interested in; you can find my email on any of our publications or through ResearchGate.

Happy holidays!