njeffrie commited on
Commit
2f564ec
·
verified ·
1 Parent(s): c9b2304

Create README.md

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