Giter Club home page Giter Club logo

rnn_predict's Introduction

Heart Failure Prediction using RNN

This is a simple RNN (implemented with Gated Recurrent Units) for predicting a HF diagnosis given patient records. There are four different versions.

  1. gru_onehot.py: This uses one-hot encoding for the medical code embedding
  2. gru_onehot_time.py: This uses one-hot encoding for the medical code embedding. This uses time information in addition to the code sequences
  3. gru_emb.py: This uses pre-trained medical code embeddings.
  4. gru_emb_time.py: This uses pre-trained medical code embeddings. This suses time information in addition to the code sequences.

The data are synthetic and make no sense at all. It is intended only for testing the codes.

  1. sequences.pkl: This is a pickled list of list of integers. Each integer is assumed to be some medical code.
  2. times.pkl: This is a pickled list of list of integers. Each integer is assumed to the time at which the medical code occurred.
  3. labels.pkl: This is a pickled list of 0 and 1s.
  4. emb.pkl: This is a randomly generated code embedding of size 100 X 100

Requirement

Python and Theano are required to run the scripts

How to Execute

  1. python gru_onehot.py sequences.pkl labels.pkl
  2. python gru_onehot_time.py sequences.pkl times.pkl labels.pkl
  3. python gru_emb.py sequences.pkl labels.pkl emb.pkl
  4. python gru_emb_time.py sequences.pkl times.pkl labels.pkl emb.pkl

All scripts will divide the data into training set, validation set, and test set. They will run for a fixed number of epochs. At each epoch, "Validation AUC" will be calculated using the validation set, and if it is the best "Validation AUC" so far, the test set will be used to calculate "Test AUC". The model with the best "Test AUC" will be saved at the end of the training.

rnn_predict's People

Contributors

mp2893 avatar

Watchers

Shubham Pachori 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.