Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

Preprocessed CGMacros Dataset for Postprandial Glucose Prediction

Dataset Description

This dataset contains preprocessed and normalized multimodal data from the CGMacros study for postprandial glucose prediction at multiple time horizons (30, 60, and 120 minutes after meals).

Dataset Summary

  • Source: CGMacros dataset from PhysioNet
  • Task: Postprandial glucose level prediction (regression)
  • Modalities: CGM sequences, physiological activity signals, static contextual features
  • Temporal Resolution: Two versions available
    • Raw: 60 timesteps (1-minute resolution)
    • Binned: 12 timesteps (5-minute bins, recommended)
  • Prediction Horizons: 30, 60, 120 minutes post-meal
  • Participants: 39 individuals (12 healthy, 16 pre-diabetes, 11 type 2 diabetes)
  • Total Samples: 913 meals (Dexcom), 933 meals (Libre)
  • CGM Devices: Dexcom G6 (5-min sampling), Abbott FreeStyle Libre (15-min sampling)

Supported Tasks

Primary task:

  • Postprandial glucose prediction: Predicting glucose levels at specific time points (30, 60, 120 minutes) after meal intake

Secondary methodological tasks:

  • Multimodal fusion architecture research (combining CGM, activity, and contextual features)
  • Modality ablation studies (comparing contributions of different data sources)
  • Cross-validation strategies for personalized health prediction

Note: This dataset is specifically preprocessed for postprandial prediction with 60-minute pre-meal windows. For general continuous glucose forecasting or other CGM-based tasks, use the original CGMacros dataset which provides complete continuous monitoring data.

Dataset Structure

Data Files

  • dexcom_raw_prediction.npz: Raw 1-minute resolution (913 samples, 60 timesteps)
  • dexcom_binned_prediction.npz: 5-minute binned resolution (913 samples, 12 timesteps)
  • libre_raw_prediction.npz: Raw 1-minute resolution (933 samples, 60 timesteps)
  • libre_binned_prediction.npz: 5-minute binned resolution (933 samples, 12 timesteps)

Dexcom files (913 samples): 252 healthy, 343 pre-diabetes, 318 type 2 diabetes meals Libre files (933 samples): 255 healthy, 351 pre-diabetes, 327 type 2 diabetes meals

Note: Raw and binned versions contain the same meals; only temporal resolution differs. Use binned versions for most applications (lower computational cost, used in the accompanying paper). Use raw versions only if 1-minute resolution is specifically needed.

Data Fields

Each .npz file contains:

  • X: Temporal features (shape depends on version)

    • Raw version: (n_samples, 60, 4) - 60 timesteps at 1-minute resolution
    • Binned version: (n_samples, 12, 4) - 12 timesteps at 5-minute resolution
    • Column 0: CGM glucose (mg/dL, z-score normalized per subject)
    • Column 1: Heart rate (bpm, z-score normalized per subject)
    • Column 2: METs (metabolic equivalents, min-max normalized per subject)
    • Column 3: Calories (kcal, min-max normalized per subject)
  • static: Shape (n_samples, 17) - Static contextual features per meal

    • Demographics: Age, Gender (0/1), BMI, HbA1c
    • Macronutrients: Calories, Carbs, Protein, Fat, Fiber (log-transformed, z-score normalized globally)
    • Time features: hour_sin, hour_cos, is_morning, is_evening, is_weekend, is_breakfast, is_lunch, is_dinner
  • y: Shape (n_samples, 3) - Target glucose levels (mg/dL)

    • Column 0: Glucose at 30 minutes post-meal
    • Column 1: Glucose at 60 minutes post-meal
    • Column 2: Glucose at 120 minutes post-meal
  • participant_id: Shape (n_samples,) - Participant identifiers (e.g., "CGMacros-001")

  • diagnosis: Shape (n_samples,) - Health status

    • 0: Healthy
    • 1: Pre-diabetes
    • 2: Type 2 Diabetes

Data Preprocessing

The preprocessing pipeline applied to the original CGMacros dataset includes:

  1. Temporal Binning: Raw 1-minute or 5-minute CGM data aggregated into 5-minute bins using mean
  2. Window Extraction: 60-minute pre-meal windows (12 timesteps) and post-meal glucose targets
  3. Normalization:
    • CGM and heart rate: Per-subject z-score normalization
    • Activity metrics (METs, calories): Per-subject min-max normalization
    • Macronutrients: Global z-score normalization after log transformation
  4. Static Features: Time-of-meal encoded as cyclical features (sin/cos) and binary indicators

Preprocessing code used: available in the folder

Source Data

Original Dataset

Gutierrez-Osuna, R., Kerr, D., Mortazavi, B., & Das, A. (2025). CGMacros: a scientific dataset for personalized nutrition and diet monitoring (version 1.0.0). PhysioNet. https://doi.org/10.13026/3z8q-x658

Das, A., Kerr, D., Glantz, N., Bevier, W., Santiago, R., Gutierrez-Osuna, R., & Mortazavi, B. J. (2025). CGMacros: a pilot scientific dataset for personalized nutrition and diet monitoring. Scientific Data, 12(1), 1557. https://doi.org/10.1038/s41597-025-05851-7

Data Collection

  • (After preprocessing) 39 participants (12 healthy, 16 pre-diabetes, 11 type 2 diabetes)
  • Up to 10-day monitoring period per participant
  • Continuous glucose monitoring: Dexcom G6, Abbott FreeStyle Libre
  • Activity tracking: Fitbit device
  • Controlled breakfast compositions with varying macronutrients
  • Free-living setting with free-choice dinners

Usage Example

import numpy as np

# Load preprocessed data (use binned version for most applications)
data = np.load('dexcom_binned_prediction.npz', allow_pickle=True)

# Or load raw version if 1-minute resolution is needed
# data = np.load('dexcom_raw_prediction.npz', allow_pickle=True)

X_temporal = data['X']        # (913, 12, 4) for binned; (913, 60, 4) for raw
X_static = data['static']      # (913, 17) - static features
y = data['y']                  # (913, 3) - glucose targets
participant_ids = data['participant_id']
diagnosis = data['diagnosis']

# Extract modalities
X_cgm = X_temporal[:, :, 0:1]     # CGM only
X_dynamic = X_temporal[:, :, 1:]  # HR, METs, calories
X_static = X_static                # Demographics + macronutrients + time

# Example: Split by participant for cross-validation
from sklearn.model_selection import GroupKFold

gkf = GroupKFold(n_splits=5)
for train_idx, test_idx in gkf.split(X_temporal, y, groups=participant_ids):
    X_train, X_test = X_temporal[train_idx], X_temporal[test_idx]
    y_train, y_test = y[train_idx], y[test_idx]
    # Train your model...

Citation

If you use this preprocessed dataset, please cite both:

Original CGMacros dataset:

@article{das2025cgmacros,
  title={CGMacros: a pilot scientific dataset for personalized nutrition and diet monitoring},
  author={Das, Anurag and Kerr, David and Glantz, Namino and Bevier, Wendy and Santiago, Rony and Gutierrez-Osuna, Ricardo and Mortazavi, Bobak J},
  journal={Scientific Data},
  volume={12},
  number={1},
  pages={1557},
  year={2025},
  publisher={Nature Publishing Group}
}

License

This preprocessed dataset inherits the license from the original CGMacros dataset. Please refer to the PhysioNet CGMacros page for license details.

Contact

F Indriani - f.indriani@ulm.ac.id Lambung Mangkurat University

For questions about the original data collection, please contact the CGMacros authors via PhysioNet.

Downloads last month
10