Skip to main content

MICE + Random Forest + KNN to handle missing values of CGM device

Project description

CGMissingData

CGMissingData is a simple missing-data benchmarking package that runs:

MICE imputation (IterativeImputer)

Random Forest regression

KNN regression

It helps you test model performance under different missing-value rates.

Your CSV must include at least these columns:

LBORRES — glucose value (target)

TimeSeries — time series data

TimeDifferenceMinutes — time difference in minutes

USUBJID — subject ID

How to Run?

  • Install python on your device. I am showing all the steps

  • Go to your project folder. e.g., cd C:\XYZ\Downloads\CGMissingData_project

  • Create venv (if not already created): py -m venv .venv

  • Activate venv: ..venv\Scripts\activate.bat

  • Install and Verify python -m pip install --upgrade pip pip install -e . python -c "import CGMissingData; print(CGMissingData.file)"

  • Go to Powershell and paste the following. Make sure you have replaced the location. Set-Location "C:\XYZ\CGMissingData_project\CGMissingData_project" Get-ChildItem

  • Paste it: ..venv\Scripts\python.exe -c "from CGMissingData import run_missingness_benchmark; r=run_missingness_benchmark('CGMExampleData.csv', mask_rates=[0.05,0.10,0.20,0.30,0.40]); print(r); r.to_csv('results.csv', index=False)"

Instead of 'CGMExampleData.csv, you can replace with your csv name.

  • Done!

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

cgmissingdata-0.1.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

cgmissingdata-0.1.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file cgmissingdata-0.1.2.tar.gz.

File metadata

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

File hashes

Hashes for cgmissingdata-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6edd95f0bc6fbb60d37754ae0fc6e813dd1f201a8e7a17ba81dfeddfc6f6d2e4
MD5 e1ab67ecea9b760c6954365e6c2f6784
BLAKE2b-256 6885ce8664c59f63684de9127f79f323b47de52a8cdde00cb5eeae7e4f6c9397

See more details on using hashes here.

File details

Details for the file cgmissingdata-0.1.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for cgmissingdata-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b3406f21b72fef9ccf4cc1965b01bfffd4089884e1f15009246faec67e16ccae
MD5 234afeca74a5e3880a79d1799a6020fc
BLAKE2b-256 953078ed8f7a03c55452949065ee7da435dacff49225074ca21d05a3c9f58be7

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