MICE + Random Forest + KNN to handle missing values of CGM device
Project description
CGMMissingData
This package runs a missing-data benchmark using:
- MICE (IterativeImputer)
- Random Forest
- KNN
Defaults:
- Target: LBORRES (glucose level)
- Features: TimeSeries, TimeDifferenceMinutes, USUBJID
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
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 cgmmissingdata-0.1.0.tar.gz.
File metadata
- Download URL: cgmmissingdata-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41a21eb99b1bfd35d996deb7592c0683df7d28d84f7b7c16e9aab4425cd1e5a2
|
|
| MD5 |
3d96038d1cd4dfb5ef6d7d5604a864e0
|
|
| BLAKE2b-256 |
7e5487d3305985ce7e3fbb76c47df509fcb508809d186e2579c6e5d8c784c47c
|
File details
Details for the file cgmmissingdata-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cgmmissingdata-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 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 |
24100f33b874bb2b75a5bb8046685d0cf5733238b979f82f22ab031bbfa00cdb
|
|
| MD5 |
14313f1fda2e0c173b205549334f5df5
|
|
| BLAKE2b-256 |
a9573d79c933545e4b74fbc5b73ff0c0e2fc804873710e9c38c85ad5f1e87948
|