Giter Site home page Giter Site logo

sepsis_plos's Introduction

Plos_Sepsis

The goal of this project is to provide implementation of our Plos Digital Health paper

Identifying and Analyzing Sepsis States: A Retrospective Study on Patients with Sepsis in ICUs, Plos Digital Health, 2022

Prerequisite

  1. Our source code for data extraction builds on AI Clinician where the dataset were extracted from MIMIC III database Identifying and Analyzing Sepsis States: A Retrospective Study on Patients with Sepsis in ICUs, Plos Digital Health, 2022. To access to the dataset, researchers need to follow the instructions from the website and then follow the instructions from here to install the MiMIC III.
  2. Once the MIMIC III databased is installed, run elixhauser_quan.sql to build public table Elixhauser_Quan Table to derive the comorbidity concept.
  3. We use the matlab implementation of PCHA software to compute archetypes. The source code can be donwloaded from here.

Data Extraction

  1. Run AI_Clinician_Data_Extraction.ipynb for Data Extraction from MIMIC-III database.
  2. Run AI_Clinician_Sepsis3_Definition.m for identifying Sepsis patients.
  3. Run AI_Clinician_mimic3_Dataset_premobid.m for obtaining the dataset used in our Plos Digital Health paper.

Compute Archetype

  1. run ./features/prepare_data.py to preprocess the data format used for computing archetypes
  2. run run_AA.m to compute the archetypes for each k (the number of archetypes).
  3. Note: the derived archetype label in our analysis is saved in "dist_max_labels.mat".

Compute Z-score and p-value for comorbidity profiles

  1. run Premorbid_heatmap_z_score.m for z-score table
  2. run Premorbid_heatmap_z_score_p_value.m for p-value table

Compute First-Order Treatment Transition Graph

  1. Generate Patient Trajectories data using "combine_archetype_label_gradient_sepsis.m"
  2. Compute First Order Treatment Transitions using calculate_markov_chain.py.
  3. Generate First Order Treatment Transition Graph using markov_chain_plot_first_order_treatment_combine.m

Compute Second-Order Transition Graph

  1. Generate Patient Trajectories data using "combine_archetype_label_gradient_sepsis.m"
  2. Compute Second Order Transitions using calculate_markov_chain_second_order.py
  3. Generate First Order Treatment Transition Graph using markov_chain_plot_second_order_combine.m

Compute Third-Order Transition Graph

  1. Generate Patient Trajectories data using "combine_archetype_label_gradient_sepsis.m"
  2. Compute Second Order Transitions using calculate_markov_chain_third_orde.py
  3. Generate First Order Treatment Transition Graph using markov_chain_plot_third_order.m

Compute Gradient Archetype

  1. run get_gradient_data.m to derive transition data.
  2. run run_AA_gradient.m to compute the gradient archetypes for each k (the number of archetypes).
  3. Note: the derived gradient archetype label in our analysis is saved in "gradient_dist_max_labels.mat".
  4. Run transition_gradient_histo.m to compute gradient histogram for each gradient archetype.
  5. Run gradient_heatmap_z_score.m to compute z-score for each gradient archetype.
  6. Run gradient_heatmap_z_score_p_value.m to compute its corresponding p-value for each gradient archetype.

sepsis_plos's People

Contributors

fang150 avatar

Stargazers

 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.