| --- |
| 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:** Anonymous |
| - **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. |