Coder Social home page Coder Social logo

scikit-survival's Introduction

scikit-survival

License Travis CI Build Status AppVeyor Build Status codecov Codacy Badge readthedocs.org

scikit-survival is a Python module for survival analysis built on top of scikit-learn. It allows doing survival analysis while utilizing the power of scikit-learn, e.g., for pre-processing or doing cross-validation.

About Survival Analysis

The objective in survival analysis (also referred to as reliability analysis in engineering) is to establish a connection between covariates and the time of an event. What makes survival analysis differ from traditional machine learning is the fact that parts of the training data can only be partially observed – they are censored.

For instance, in a clinical study, patients are often monitored for a particular time period, and events occurring in this particular period are recorded. If a patient experiences an event, the exact time of the event can be recorded – the patient’s record is uncensored. In contrast, right censored records refer to patients that remained event-free during the study period and it is unknown whether an event has or has not occurred after the study ended. Consequently, survival analysis demands for models that take this unique characteristic of such a dataset into account.

Requirements

  • Python 3.5 or later
  • cvxpy
  • cvxopt
  • numexpr
  • numpy 1.10 or later
  • pandas 0.19 or later
  • scikit-learn 0.19
  • scipy 0.17 or later
  • C/C++ compiler

Installation

The easiest way to get started is to install Anaconda and setup an environment:

conda install -c sebp scikit-survival

Installing from source

First, create a new environment, named sksurv:

conda create -n sksurv -c sebp python=3 --file requirements.txt

To work in this environment, activate it as follows:

source activate sksurv

If you are on Windows, run the above command without the source in the beginning.

Once you setup your build environment, you have to compile the C/C++ extensions and install the package by running:

python setup.py install

Alternatively, if you want to use the package without installing it, you can compile the extensions in place by running:

python setup.py build_ext --inplace

To check everything is setup correctly run the test suite by executing:

nosetests

Examples

An Introduction to Survival Analysis with scikit-survival is available as Jupyter notebook.

Documentation

The source code is thoroughly documented and a HTML version of the API documentation is available at https://scikit-survival.readthedocs.io/en/latest/.

You can generate the documentation yourself using Sphinx 1.4 or later:

cd doc
make html
xdg-open _build/html/index.html

References

Please cite the following papers if you are using scikit-survival.

1. Pölsterl, S., Navab, N., and Katouzian, A., Fast Training of Support Vector Machines for Survival Analysis. Machine Learning and Knowledge Discovery in Databases: European Conference, ECML PKDD 2015, Porto, Portugal, Lecture Notes in Computer Science, vol. 9285, pp. 243-259 (2015)

2. Pölsterl, S., Navab, N., and Katouzian, A., An Efficient Training Algorithm for Kernel Survival Support Vector Machines. 4th Workshop on Machine Learning in Life Sciences, 23 September 2016, Riva del Garda, Italy

3. Pölsterl, S., Gupta, P., Wang, L., Conjeti, S., Katouzian, A., and Navab, N., Heterogeneous ensembles for predicting survival of metastatic, castrate-resistant prostate cancer patients. F1000Research, vol. 5, no. 2676 (2016).

scikit-survival's People

Contributors

sebp avatar

Watchers

James Cloos avatar vinodhkumar 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.