Inspiration
My girlfriend is a Type 1 diabetic and I want to be able to predict when she will have low events before they happen so she will expect them and not let her sugar levels drop dangerously low.
What it does
This code uses pandas to process glucose readings over ~1 year. The data is then fed into an LSTM using a couple of stats like min, max, average, and range over a timeframe such as 1 hour or 1 day. The result is an image showing the predictions compared to the actual result. Typically I was trying to predict the minimum glucose in the next timeframe because low glucose events can be very dangerous. This proved to be minorly effective. The LSTM was good at fitting to the overall trend of the data according to the results on the test dataset, but it is difficult to predict lows before they happen. The accuracy overall of predicting whether the next reading will be above or below the low threshold was over 90%, but that is because they are sparse. The accuracy of predicting a low glucose event given that one is about to occur is about 40-45%.
Challenges I ran into
The amount of information in the glucose reading data doesn't seem to be enough to fully predict severe lows. This makes sense, because stress, exercise, or an overdose of insulin can drop blood sugar despite any previous trend.
Accomplishments that we're proud of
The LSTM shows a proof of concept that the trend of the data can be learned and predicted.
What's next for Glucose Prediction
I want to add more sources of data like exercise and stress levels to see if I can increase the accuracy of my predictions.
Log in or sign up for Devpost to join the conversation.