CoolFace
Datasetpublic

THULab/gluco_tsfm_benchmark

GlucoFM Benchmark - Aggregated CGM (TsFile) Apache TsFile version of byluuu/gluco-tsfm-benchmark. Overview Blood-glucose forecasting benchmark aggregating open-access continuous glucose monitoring (CGM) cohorts (11 datasets: BIG_IDEA_LAB, D1NAMO, HUPAD, etc. - links in the source card). train and test each contain 529 subject series; every source row is one subject's full CGM series with epoch-second timestamps and glucose values in mg/dL (series lengths 26 ..… See the full description on the dataset page: https://huggingface.co/datasets/THULab/gluco_tsfm_benchmark.

sourceHugging Facecc-by-nc-sa-4.0updated 18d agoView on Hugging Face
0likes50downloads
Dataset Card

GlucoFM Benchmark - Aggregated CGM (TsFile)

Apache TsFile version of `byluuu/gluco-tsfm-benchmark`.

Overview

Blood-glucose forecasting benchmark aggregating open-access continuous glucose monitoring (CGM) cohorts (11 datasets: BIGIDEALAB, D1NAMO, HUPAD, etc. - links in the source card). train and test each contain 529 subject series; every source row is one subject's full CGM series with epoch-second timestamps and glucose values in mg/dL (series lengths 26 .. 132k points, typical 5-minute cadence). Both splits are converted to their own TsFile and expanded to one point per glucose reading (~2.30M train + 0.57M test points).

Schema (TsFile structure)

  • —Time (INT64, milliseconds) — round(timestamp seconds * 1000).
  • —dataset, subject_id (TAG, STRING) — one device per subject series.
  • —BGvalue (FIELD, DOUBLE) — glucose value in mg/dL.

Usage

Install the Apache TsFile Python SDK (pip install tsfile) and read a converted file:

python
from pathlib import Path
from tsfile import TsFileReader

path = Path("gluco_tsfm_benchmark_test.tsfile")
with TsFileReader(str(path)) as reader:
    schemas = reader.get_all_table_schemas()
    print("tables:", list(schemas))
    table_name = next(iter(schemas))
    table = schemas[table_name]
    columns = [column.get_column_name() for column in table.get_columns()]
    print("columns:", columns)
    field_names = [
        column.get_column_name()
        for column in table.get_columns()
        if column.get_column_name() not in {"Time", "time"}
    ]
    if field_names:
        with reader.query_table(table_name, field_names[:3], batch_size=1024) as result:
            batch = result.read_arrow_batch()
            if batch is not None:
                print(batch.to_pandas().head())

Source & license

  • —Original dataset: <https://huggingface.co/datasets/byluuu/gluco-tsfm-benchmark>
  • —License: CC-BY-NC-SA-4.0 (non-commercial; please defer to the original)