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