Skip to main content

CGM missing glucose imputation with MICE, ARIMA, XGBoost, and optional GAIN-based methods

Project description

imputeCGM

imputeCGM is a Python package for imputing missing glucose values in continuous glucose monitoring (CGM) data.

The package supports:

  • Automatic method selection: MICE+ARIMA when missingness is low and MICE+XGBoost when missingness is higher
  • Forced MICE+ARIMA
  • Forced MICE+XGBoost
  • GAIN-only imputation
  • GAIN+ARIMA
  • GAIN+XGBoost

Installation

For MICE, ARIMA, and XGBoost methods:

python -m pip install -e .

For GAIN-based methods, install the optional TensorFlow dependency:

python -m pip install -e .[gain]

Python usage

from imputeCGM import impute_cgm

out = impute_cgm(
    df,
    timestamp_col="timestamp",
    subjectid_col="subjectid",
    glucose_col="glucose_value",
    interval_minutes=5,
    time_gap_tolerance_minutes=3,
    model_method="auto",
)

Valid model_method values are:

auto
mice_arima
mice_xgboost
gain
gain_arima
gain_xgboost

CLI usage

imputeCGM --input ExampleData.csv --output ExampleData_imputed.csv --model-method auto

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imputecgm-0.1.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imputecgm-0.1.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file imputecgm-0.1.0.tar.gz.

File metadata

  • Download URL: imputecgm-0.1.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for imputecgm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5432ae095733bda075a57a47d2a56a3c9127fa7ae24a178e22bc89dc702e217f
MD5 74da4e1a7889d20cd55f2b1b036691a7
BLAKE2b-256 0f3c97b8531297496441e9e454669babad2a3902080cd1e4d2646346887b0689

See more details on using hashes here.

File details

Details for the file imputecgm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: imputecgm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for imputecgm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b7fd71cff131fe63d31927eded20ae10abfca3de39b8eaa41f7a26dc3f1d064
MD5 6a872e6b832b2e15b825214724a1cdee
BLAKE2b-256 484be1216863a5f3709ba23fb8634e9e48128f58e9c7819401d0688bc883ab65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page