njeffrie commited on
Commit
3cd24ce
·
verified ·
1 Parent(s): 2aef7bb

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -0
README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Model Card for Gluformer Blood Glucose Prediction Model
2
+
3
+ This model uses past continuous glucose monitor (CGM) values to predict values for the next hour.
4
+
5
+ ## Model Details
6
+
7
+ ### Model Description
8
+
9
+ - **Developed by:** Renat Sergazinov, Mohammadreza Armandpour, Irina Gaynanova
10
+ - **Funded by:** Texas A&M University
11
+ - **Shared by:** Nat Jeffries
12
+ - **Model type:** Time series encoder-decoder Transformer
13
+
14
+ ### Model Sources [optional]
15
+
16
+ - **Repository:** [Github](https://github.com/mrsergazinov/gluformer)
17
+ - **Paper:** [Arxiv](https://arxiv.org/pdf/2209.04526)
18
+
19
+ ## How to Get Started with the Model
20
+
21
+ Use the code below to get started with the model.
22
+
23
+ ```
24
+ from transformers import AutoModel, AutoConfig
25
+ from datetime import timedelta, datetime
26
+
27
+ model = AutoModel.from_pretrained('njeffrie/Gluformer', trust_remote_code=True)
28
+ config = AutoConfig.from_pretrained('njeffrie/Gluformer', trust_remote_code=True)
29
+
30
+ # Dummy input and timestamp values.
31
+ input_glucose = [100.0 for _ in range(config.len_seq)]
32
+ timestamps = [datetime(2025, 7, 25, 0, 0) + timedelta(minutes=5 * i) for i in range(len(input_glucose))]
33
+ subject_id = 0
34
+
35
+ pred, log_var = model(subject_id, timestamps, input_glucose)
36
+ ```
37
+
38
+ Predictions will be predicted future glucose values in 5 minute increments. Log var indicates confidence. See the paper for more details.