Giter VIP home page Giter VIP logo

flash's Introduction

flash

flash is a generalized joint model for high-dimensional multivariate longitudinal data and censored durations

Quick description

flash is a Python 3 package to deal with the problem of joint modeling of longitudinal data and censored durations, where a large number of both longitudinal and and time-independent features are available. Features extracted from the longitudinal processes are included as potential risk factor in the survival model, which is a group-specific Cox model with high-dimensional shared associations.

To allow flexibility in modeling the dependency between the longitudinal features and the event time, we use appropriate penalties : elastic net for feature selection in the latent class membership, and sparse group lasso in the survival model, as well as for the fixed effect (allowing flexible representations of time).

Inference is achieved using an extension of Expectation Maximization algorithm.

Use cases

flash can be used for many statistical learning applications where one wants to predict the risk for an event of interest to occur quickly, taking into account simultaneously a huge number of longitudinal signals in a high-dimensional context. It provides powerful interpretability by automatically pinpointing significant time-dependent and time-independent features. Hence, it can be used for real-time decision support, for instance:

  • In a medical context, where the event of interest could be survival time, re-hospitalization, relapse or disease progression, and the longitudinal data represents biomarkers or vital parameters measurements.

  • In a customer's satisfaction monitoring context, where the event of interest could be the time when a client stops using a company's product or service (churn), and the longitudinal data represents the client's activity recorded from account opening throughout the duration of the business relationship.

Installation

Clone the repository, then inside the folder, use a virtualenv to install the requirements

git clone [email protected]:Califrais/flash.git
cd lights

# If your default interpreter is Python3:
virtualenv .env
# If your default interpreter is Python2, you can explicitly target Python3 with:
virtualenv -p python3 .env

source .env/bin/activate

Then, to download all required modules and initialize the project run the following commands:

pip install -r requirements.txt
pip install -e .

The second command installs the project as a package, making the main module importable from anywhere.

Unittest

The library can be tested simply by running

python -m unittest discover -v ./flash/tests "test_*.py"

in terminal. This shall check that everything is working and in order.

To use the package outside the build directory, the build path should be added to the PYTHONPATH environment variable, as such (replace $PWD with the full path to the build directory if necessary):

export PYTHONPATH=$PYTHONPATH:$PWD

For a permanent installation, this should be put in your shell setup script. To do so, you can run this from the lights directory:

echo 'export PYTHONPATH=$PYTHONPATH:'$PWD >> ~/.bashrc

Replace .bashrc with the variant for your shell (e.g. .tcshrc, .zshrc, .cshrc etc.).

Other files

The Jupyter notebook "FLASH tutorial" gives useful example of how to use the model based on simulated data. It will be very simple then to adapt it to your own data.

flash's People

Contributors

nvtacsi avatar simonbussy avatar simonmab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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