Skip to main content

Survival analysis built on top of scikit-learn

Project description

License readthedocs.org Digital Object Identifier (DOI)

GitHub Actions Tests Status Windows Build Status on AppVeyor codecov Codacy Badge

scikit-survival

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 time-to-event or reliability analysis) 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.8 or later

  • ecos

  • joblib

  • numexpr

  • numpy 1.17.3 or later

  • osqp

  • pandas 1.0.5 or later

  • scikit-learn 1.2

  • scipy 1.3.2 or later

  • C/C++ compiler

Installation

The easiest way to install scikit-survival is to use Anaconda by running:

conda install -c sebp scikit-survival

Alternatively, you can install scikit-survival from source following this guide.

Examples

The user guide provides in-depth information on the key concepts of scikit-survival, an overview of available survival models, and hands-on examples in the form of Jupyter notebooks.

Help and Support

Documentation

Bug reports

  • If you encountered a problem, please submit a bug report.

Questions

  • If you have a question on how to use scikit-survival, please use GitHub Discussions.

  • For general theoretical or methodological questions on survival analysis, please use Cross Validated.

Contributing

New contributors are always welcome. Please have a look at the contributing guidelines on how to get started and to make sure your code complies with our guidelines.

References

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

S. Pölsterl, “scikit-survival: A Library for Time-to-Event Analysis Built on Top of scikit-learn,” Journal of Machine Learning Research, vol. 21, no. 212, pp. 1–6, 2020.

@article{sksurv,
  author  = {Sebastian P{\"o}lsterl},
  title   = {scikit-survival: A Library for Time-to-Event Analysis Built on Top of scikit-learn},
  journal = {Journal of Machine Learning Research},
  year    = {2020},
  volume  = {21},
  number  = {212},
  pages   = {1-6},
  url     = {http://jmlr.org/papers/v21/20-729.html}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scikit-survival-0.20.0.tar.gz (2.5 MB view details)

Uploaded Source

Built Distributions

scikit_survival-0.20.0-cp310-cp310-win_amd64.whl (713.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

scikit_survival-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

scikit_survival-0.20.0-cp310-cp310-macosx_10_13_x86_64.whl (762.6 kB view details)

Uploaded CPython 3.10 macOS 10.13+ x86-64

scikit_survival-0.20.0-cp39-cp39-win_amd64.whl (718.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

scikit_survival-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

scikit_survival-0.20.0-cp39-cp39-macosx_10_13_x86_64.whl (763.5 kB view details)

Uploaded CPython 3.9 macOS 10.13+ x86-64

scikit_survival-0.20.0-cp38-cp38-win_amd64.whl (719.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

scikit_survival-0.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

scikit_survival-0.20.0-cp38-cp38-macosx_10_13_x86_64.whl (755.9 kB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

File details

Details for the file scikit-survival-0.20.0.tar.gz.

File metadata

  • Download URL: scikit-survival-0.20.0.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for scikit-survival-0.20.0.tar.gz
Algorithm Hash digest
SHA256 db8fbc4a8722ababb72a7a0649d57939de6dfce4f5b8f92fd7d8b7a797b32e3c
MD5 2f359adea00065e4d52677e67ac3d3e6
BLAKE2b-256 eb144ec19e7e5dcf41694fec85d8f9a0d937df4af8dd04ab2a9c1c91a4e53557

See more details on using hashes here.

File details

Details for the file scikit_survival-0.20.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.20.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ac6eb98e81bd434ed72428a54a9c218d45381979164384687873bf9c70db7880
MD5 f6c3de74b21d0a7248376ea1cabbf4cf
BLAKE2b-256 9cc653c95307b5361e71ef4ceb8cd30b5563ce43798b12278ecf3ca98a7d8025

See more details on using hashes here.

File details

Details for the file scikit_survival-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e98ddacde1b9ace21b5e1d8e97cc051210af4416424dd54df7fcf0e25ca2f7c8
MD5 499886b706406d0a94213ebb32d77bae
BLAKE2b-256 9863eea2953f7ebd73080db8a14ec0134c7e67e024404ea1f1be68c6065eb8d1

See more details on using hashes here.

File details

Details for the file scikit_survival-0.20.0-cp310-cp310-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.20.0-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 65ac1d61a4921fa66040274e2c85f074637893c965df3f9376b93a8bad6390ec
MD5 8d8223219909c713a231b759f5755c0d
BLAKE2b-256 10d710b3e62eb2d61dd6205e1f4ed23df7f0040a9922c75ed2b3e5441baa4521

See more details on using hashes here.

File details

Details for the file scikit_survival-0.20.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.20.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6ffb130c5c2d886ecc37d2788fb42417298ccec9c5105d66a584655abaed5d1f
MD5 f91597bd579ee1a9b3fa91910b088150
BLAKE2b-256 2526492f66de558d688e0bda51b12bf929778e08a717b600fe5f9f06a66fa92e

See more details on using hashes here.

File details

Details for the file scikit_survival-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e9f753a06717d9e0f4d6ebe676ef35de85ec2f9f2fc8d2f9c66df9f3557a6a11
MD5 d15a5ff5c9011f33a0a516c31b2b4ddc
BLAKE2b-256 145db9a2d744f162db878b1ccb126a15ed176c4b7a2ab91b9749a808568d3ff7

See more details on using hashes here.

File details

Details for the file scikit_survival-0.20.0-cp39-cp39-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.20.0-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1233197f45f2d7fd93ccc9e886afab56a8b1b4c986b8339e56704c24bbfa0f1e
MD5 decd0cfcfd8a27b8624f251a24363c14
BLAKE2b-256 f4360d31f1f43d057c770adedd142580d065b89b7d52c3ab7bb71587f7ab00a8

See more details on using hashes here.

File details

Details for the file scikit_survival-0.20.0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.20.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b562777ec9a495af034c2cb7853de880c274e6d2a2b88f5a13937df16e2a9c19
MD5 0e3b37ce2c6ba915ac06a1fd99ebb9b1
BLAKE2b-256 88e9cde44f0e7778dc6a2adcde2ed3edfff9d615ec318192763af6533981effa

See more details on using hashes here.

File details

Details for the file scikit_survival-0.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bebff7c38c4070542a4176af251b901e323c70821c38390545bc9eeaa12dfe88
MD5 d34126845bdeed51d5281e3df4746a87
BLAKE2b-256 460d07efb0b3539cb1fa7e477a693b4c37d1891ac61f9ca21ed19d5b945442f2

See more details on using hashes here.

File details

Details for the file scikit_survival-0.20.0-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.20.0-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2b7b7dba33e022909cd77da67030116ad0a968f0f369f943b5b235a3142429f3
MD5 8790b53e9b63960a66d838a8df466a58
BLAKE2b-256 d6dac602b620089b99ff9d34175719c9840e786c65cf5010d2dce7476cded9ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page