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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5432ae095733bda075a57a47d2a56a3c9127fa7ae24a178e22bc89dc702e217f
|
|
| MD5 |
74da4e1a7889d20cd55f2b1b036691a7
|
|
| BLAKE2b-256 |
0f3c97b8531297496441e9e454669babad2a3902080cd1e4d2646346887b0689
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b7fd71cff131fe63d31927eded20ae10abfca3de39b8eaa41f7a26dc3f1d064
|
|
| MD5 |
6a872e6b832b2e15b825214724a1cdee
|
|
| BLAKE2b-256 |
484be1216863a5f3709ba23fb8634e9e48128f58e9c7819401d0688bc883ab65
|