Metadata-Version: 2.4
Name: imputeCGM
Version: 0.1.2
Summary: CGM missing glucose imputation with MICE, ARIMA, XGBoost, and optional GAIN-based methods
Author: Hasin Shad, Shubh Saraswat, Dr. Xiaohua Douglas Zhang
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: scikit-learn
Requires-Dist: statsmodels
Requires-Dist: xgboost
Requires-Dist: rpy2
Provides-Extra: gain
Requires-Dist: tensorflow; extra == "gain"

imputeCGM
imputeCGM is a simple missing-data benchmarking package that runs: MICE imputation (IterativeImputer) combined with ARIMA and XGBoost

Your CSV must include at least these columns:

glucose_col = Glucose value (target) 

TimeSeries = time series data

Timestamp_col = Timestamp data

subject ID

How to Run?

Envirionment Setup- cd "C:\Path\To\Your\Project"
Create a virtual environment python -m venv .venv

Activate the environment- ..venv\Scripts\activate

Install python python -m pip install --upgrade pip pip install -e .

..venv\Scripts\python.exe -c "from imputeCGM import run_missingness_benchmark; r=run_missingness_benchmark('MyData.csv', mask_rates=[0.05, 0.10, 0.20, 0.30, 0.40]); print(r); r.to_csv('results.csv', index=False)" #Ensure your dataset (e.g., MyData.csv) is located in the project file. Execute the benchmark directly from the CLI to generate a results.csv file:

Using Google Colab?

!pip -q install imputeCGM==0.1.2 (change the version number depending our new release. You can also try with !pip -q install imputeCGM)

from imputeCGM import run_missingness_benchmark

df = "/content/drive/MyDrive/CGMExampleData.csv" # your dataset path

results = run_missingness_benchmark( "CGMExampleData.csv", # or df mask_rates=[0.05, 0.10, 0.20, 0.30, 0.40] )

print(results)

results.to_csv("results.csv", index=False)

imputeCGM
CGM missing value imputation pipeline:

Convert timestamp to a numeric equal-interval TimeSeries using CGManalyzer::equalInterval.fn via rpy2
Add lag features per subjectid: lag1, lag2, lag3, rollmean
Compute missing rate on glucose_value
If missing rate <= 5%: MICE + ARIMA (segmentwise over missing blocks) Else: MICE + XGBoost
Output original dataset plus imputed_glucose_value
