Skip to main content

Survival analysis built on top of scikit-learn

Project description

License readthedocs.org Digital Object Identifier (DOI)

Linux Build Status macOS Build 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.1

  • 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.19.0.post1.tar.gz (2.5 MB view details)

Uploaded Source

Built Distributions

scikit_survival-0.19.0.post1-cp310-cp310-win_amd64.whl (709.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

scikit_survival-0.19.0.post1-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.19.0.post1-cp310-cp310-macosx_10_13_x86_64.whl (759.2 kB view details)

Uploaded CPython 3.10 macOS 10.13+ x86-64

scikit_survival-0.19.0.post1-cp39-cp39-win_amd64.whl (714.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

scikit_survival-0.19.0.post1-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.19.0.post1-cp39-cp39-macosx_10_13_x86_64.whl (760.1 kB view details)

Uploaded CPython 3.9 macOS 10.13+ x86-64

scikit_survival-0.19.0.post1-cp38-cp38-win_amd64.whl (715.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

scikit_survival-0.19.0.post1-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.19.0.post1-cp38-cp38-macosx_10_13_x86_64.whl (752.5 kB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

File details

Details for the file scikit-survival-0.19.0.post1.tar.gz.

File metadata

File hashes

Hashes for scikit-survival-0.19.0.post1.tar.gz
Algorithm Hash digest
SHA256 5018540a9457c9de602f169fdfcc01511a360c8a1480c9913a88061776f05899
MD5 9b5353c1d742e4cb78a9efb6f6475faf
BLAKE2b-256 fe8a8c684e6f82ba6e44a025cb8032596b5a1d4edbfcbb3df9ca9f44e664ff9f

See more details on using hashes here.

File details

Details for the file scikit_survival-0.19.0.post1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.19.0.post1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f1a4c4cc84ea66def141ee59be0c37e233e9c3e261c586c6b1f59f1be457a65b
MD5 783cbfb93997cf30c5e299ac5b177ed5
BLAKE2b-256 d3d514bcbbdea87f4931fbbac2d84a8dc6f0929d3cd5be5b10cee0921a3c6438

See more details on using hashes here.

File details

Details for the file scikit_survival-0.19.0.post1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.19.0.post1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 64c3d9093211bac9313f907a2bb6a4979e5bdcfb87822921d6a5736f09f65ed6
MD5 e95f26b889ff1c890f68539d049da348
BLAKE2b-256 a29655ae2923c6467f2846e8436c634a2ce32e520545fe4d10064e96843be191

See more details on using hashes here.

File details

Details for the file scikit_survival-0.19.0.post1-cp310-cp310-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.19.0.post1-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 cd68faa95c8c3a28d9ec48a70c5dc63215078ebd6797df15d36b712edb621735
MD5 ddc748fca3a82299031abff2c92759ff
BLAKE2b-256 5857a0f6dfe3603bc385ff517769087655b08f57f14e6d5f30ea970224c9074b

See more details on using hashes here.

File details

Details for the file scikit_survival-0.19.0.post1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.19.0.post1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a2cae19607b6e0dfde15a7ddf3720c80d5b9f3648cbedbf92071e697924cd89c
MD5 5339e03d0b6d0936e2a1e4b34a78a9db
BLAKE2b-256 14e38d02e42b1f4f06d3bd2b86157ab357cad25c6402a5cc4f8be356e3bfaf81

See more details on using hashes here.

File details

Details for the file scikit_survival-0.19.0.post1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.19.0.post1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 39335daecc71df19adc0ae2dfbbf2d18733fff485243558cd5e415a5574811bf
MD5 40e29178edac2d8bb58a4cada03ac50f
BLAKE2b-256 d6cf91d7b9c3a0ee4aa461e6e7648f6c1768d06cdff95f9692be90384ef1a26d

See more details on using hashes here.

File details

Details for the file scikit_survival-0.19.0.post1-cp39-cp39-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.19.0.post1-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 700598a8ed7d8bd4faec616eefcb6645a6642afe131dd0f10b48331cf2c81712
MD5 928cc4f9386ab2d6641f400d64facc1b
BLAKE2b-256 2f34349d097d48f1951f3104e2b7e953cb8fee6a9d12e15f91e94da631e5d472

See more details on using hashes here.

File details

Details for the file scikit_survival-0.19.0.post1-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.19.0.post1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 24a468d8bb1e853f8fa5f5a8d427134bf1e862c3b0a31eb9f9ed1e16ba3285f9
MD5 0310395d7a850470c788de2a696be814
BLAKE2b-256 4b22a077d4e6fc1ade5605daae0e64b480466a6d86d2407d3753cd83c64507cc

See more details on using hashes here.

File details

Details for the file scikit_survival-0.19.0.post1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.19.0.post1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5c95650abcd8ecb1cb588554ae8316898192d36d3451989d106d4c47bf5697d7
MD5 cf0cae907c349bb2e17ad9b46ebd378d
BLAKE2b-256 2309a878f6cb33b8e4b897764d0d41c58ecbbe72a22930695922a123d4bc268b

See more details on using hashes here.

File details

Details for the file scikit_survival-0.19.0.post1-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.19.0.post1-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 8c1ad73495e8bf0948f6e14258ae20cea8312dbfe3cef286f41ebd8489503ad8
MD5 5e7ef54985e22279dc2c868eb9636d4d
BLAKE2b-256 5e0f8e1bfa38c65bb1f4350d0f06ba172eadde2e6366b3b94a9efd546aaded45

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