Skip to main content

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

Project description

CGMmissingData

CGMmissingData 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\CGMmissingData_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 CGMmissingData; print(CGMmissingData.file)"

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

  • Paste it: ..venv\Scripts\python.exe -c "from CGMmissingData 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

cgmmissingdata-0.1.1.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.

cgmmissingdata-0.1.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file cgmmissingdata-0.1.1.tar.gz.

File metadata

  • Download URL: cgmmissingdata-0.1.1.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 cgmmissingdata-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1234f1ba2870160766a264f2b6fd3bc2e375b9bbb6dd7eb40d38dc57210db7e2
MD5 cb83a39284d04839f0a3a26d86a5bac7
BLAKE2b-256 fb19bdbbbaebd2a4e40ca6e8913a8a5d5f584cd4886c8ab6bdc0972120a24696

See more details on using hashes here.

File details

Details for the file cgmmissingdata-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cgmmissingdata-0.1.1-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 cgmmissingdata-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07ae41e666ae5c0bc4fc2c70e4b464ad7b58052294fc258e93ef5994c3f51405
MD5 9eff589ea869bf730f58b652dae63dc4
BLAKE2b-256 960848cb5c72418128936d3303abd660eba7d06fc6a6e0173555fb9f8fc3e693

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