Coder Social home page Coder Social logo

counterfactual_icu's Introduction

Counterfactual_ICU

ACS MPhil thesis project

  • Version_1 : Standard ODE with variational RNN with pytorch lightning. RNN takes in the whole trajectory, passess to ODE which creates latents, which are then passed to output function to match the trajectory.

  • Version_2 : neural ODE, with variational RNN (silenced by the KL_param), that takes in the non-treatment baseline trajectory, passes to an ODE which is itself modified by the controlled treatment_fun as it creates the latents forward in time, and then pointwise output function to recreate the post-treatment trajectory. Plotly on wandb. Uses pytorch lightning.

  • Version_3: Stochastic Differential equation, with a non-variational RNN, that takes in non-tx baseline traj, passes to SDE w treatment_fun exerting control. Multiple samples of the latents are created which are then brought back to observed by pointwise output_fun MLP. 3 separate plots with plotly, and uses Lightning instead of Pytorch-Lightning. Experiment_3 has it's OWN environment yaml to use.

  • Version_4:

    • Generalising latent to be either expert only, hybrid SDE or SDE only
  • Version_5:

    • Fixing SDE bugs especially RNN encoder... still not quite right but runs much better
    • adjusted expert ODE with sigmoid rescaling - although better should be for truncated gaussian prior with linear rescaling!!
  • Version_6:

    • adjusting hybrid SDE!! so that when there is a control acting on the latents (hidden or not) the SDEs can identify it

      • OPTIONS:
        • Tx: we know the time & dose , YES functional dependence YES the functional form:

        • Tx: we know the time & dose, YES functional dep, NO the functional form:

        • Tx: we know the time & dose, NO the functional dep, YES the functional form:

        • Tx: we know the time & dose, NO the functional dep, NO the functional form:

        • Path: we DON'T konw the time & dose, YES the functional dep, YES the functional form

        • Path: we DON'T konw the time & dose, YES the functional dep, NOT the functional form

        • Path: we DON'T konw the time & dose, NO the functional dep, YES the functional form

        • Path: we DON'T konw the time & dose, NO the functional dep, NO the functional form

    • Adjust CV_data to include external control as pathology... (or can even assume that the treatment is a kind of external control )

    • adjustment of expert ode to have truncated gaussian prior with linear rescaling on all (or maybe match with hybrid?) latents not just some of them

    • control of observed data to be irregular based on hawkes process

    • clarify CV dataset creation to have various clinically relevant trajectories i.e. normal then infection then treatment then another treatment etc

  • Version 6b:

    • considerable improvements on version 6. Version 6 doesn't in fact even have the model or dataset because it's converted to 6b.
  • Version_7

    • continuation of 6b. the decoder HybridSDE takes in all the params as input y rather than the 'fixed' CV params from the dictionary. Therefore can it can either have an encoder that feeds these in, or it is fed in the correct inputs.

Experiment ideas

Currently CV data is being created with no gaps between the datapoints... which is unlikely in real clinical dataset so need to convert to having observations at specific time points and the encoder taking these into account

also we are assuming that data is fixed and then we go about analysing it, when actually data is always coming and we need to rapidly place it in a correct latent space interactively do we need to resubmit the whole trajectory up to that new datapoint every time we get something new? or if instead we learn an amortised latent model as new data comes in we can just apply it so we train on full dataset style and then we apply to data on the fly...

but if we train on full dataset then we should have a mask?

counterfactual_icu's People

Contributors

rickconci 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.