GithubHelp home page GithubHelp logo

weiliao97 / learning_time_series_ehr Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 53.79 MB

A comprehesive investigation on how time-series EHR can encode static information

License: MIT License

Python 95.42% Jupyter Notebook 4.58%

learning_time_series_ehr's Introduction

Learning_Time_Series_EHR

(The repo to extract the data is in METRE and the repo to seperate sensitive latents and non-sensitive latents is in STEER)

(to be finished)

1. Extract data from MIMIC-IV an eICU using METRE

To extract data from MIMIV-IV and eICU databases, please follow the instructions in the METRE repository. To obtain the General cohort, please run:

python main.py --database MIMIC --project_id xxx

and

 python main.py --database eICU --project_id xxx

MIMIC extraction has to be run before eICU due to eICU data normalization uses extracted MIMIC-IV data statistics.

To obtain the Sepsis_3 cohort, please run:

python main.py --database MIMIC --project_id xxx --patient_group Sepsis_3

And

python main.py --database eICU --project_id xxx --patient_group Sepsis_3

2. Run preprocessing notebook

3. Run prediction models

3.1 48h in-hospital mortality task

In IHM folder, run

python main.py --model_name TCN --num_channels 256 256 256 256 --checkpoint test 

3.2 SOFA score prediction

In SOFA folder:

No fusion Transformer model

python main.py  --model_name Transformer --checkpoint test

or

python main.py --model_name TCN --num_channels 256 256 256 256 --checkpoint test 

Fusion at I, V and VI

python main.py  --static_fusion all --num_channels 256 256 256 256 --s_param 256 256 256 0.2 --c_param 256 256 0.2 --sc_param 256 256 256 0.2 --checkpoint test

With regularization l1 or l2

python main.py --static_fusion inside --num_channels 256 256 256 256 --s_param 256 256 256 0.2 --c_param 256 256 0.2 --sc_param 256 256 256 0.2 --regularization l1 --checkpoint test 

4. Run static info prediction models

In infer_static folder, have the model pt file ready for feature extraction.

TCN model with channels [256, 256, 256, 256], sepsis_3 cohort, SOFA prediction and infer race (index: 2):

python main.py --model_path xxx --model_name TCN --num_channel 256 256 256 256 --task_name sofa --read_channels 128 --infer_ind 2

learning_time_series_ehr's People

Contributors

weiliao97 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.