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

Uploaded Source

Built Distributions

scikit_survival-0.21.0-cp311-cp311-win_amd64.whl (731.1 kB view details)

Uploaded CPython 3.11 Windows x86-64

scikit_survival-0.21.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

scikit_survival-0.21.0-cp311-cp311-macosx_10_13_x86_64.whl (780.0 kB view details)

Uploaded CPython 3.11 macOS 10.13+ x86-64

scikit_survival-0.21.0-cp310-cp310-win_amd64.whl (736.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

scikit_survival-0.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

scikit_survival-0.21.0-cp310-cp310-macosx_10_13_x86_64.whl (788.3 kB view details)

Uploaded CPython 3.10 macOS 10.13+ x86-64

scikit_survival-0.21.0-cp39-cp39-win_amd64.whl (742.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

scikit_survival-0.21.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

scikit_survival-0.21.0-cp39-cp39-macosx_10_13_x86_64.whl (789.4 kB view details)

Uploaded CPython 3.9 macOS 10.13+ x86-64

scikit_survival-0.21.0-cp38-cp38-win_amd64.whl (742.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

scikit_survival-0.21.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

scikit_survival-0.21.0-cp38-cp38-macosx_10_13_x86_64.whl (783.3 kB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: scikit-survival-0.21.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.21.0.tar.gz
Algorithm Hash digest
SHA256 adc744b65983dced8142ec31465389fc738405d589051251e5447aad9a1e02bc
MD5 24c6cdecb9d88492dfb36e803f97b61d
BLAKE2b-256 b6a98d85daae67467a96ba90af5566499c94bbfdac322578974a7fe7ac9e442a

See more details on using hashes here.

File details

Details for the file scikit_survival-0.21.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 53075fc48c5e362c12f24b29f92f02918d4fecd87d6fb8e90d6ac04b19fdd35e
MD5 fec2385954d3e88a978d1c01ccd898df
BLAKE2b-256 c83b5119769d1332251000483dcd6d18fff142ecdaa16edac2c707787d6ffafb

See more details on using hashes here.

File details

Details for the file scikit_survival-0.21.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 488864f5fe16a6cc9515388c545270c9e93aba7542722813a2712295023f7dd5
MD5 894c6bfd7b6c33c7d1f38b114a04e17c
BLAKE2b-256 e1318dd5fca478b534c31eb5474002b8635d67b31972949af4899d04bb3178f9

See more details on using hashes here.

File details

Details for the file scikit_survival-0.21.0-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d5d0d7cf4ea708fcf12b5cc40082f13de172bc553582ecba0222f21f1ac09f60
MD5 890a03e2cae80f2878d3b1ddcaf56137
BLAKE2b-256 6e5dbe6f4492f298bb4586d826cabba467012175d8b1990f6786a240eac19aa1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e5981adf11e061833e8b53388e82cd6ca7d84fe6708f3bd58175315628fc7f9e
MD5 3d6d16ffc0525ddcb86dcc0658d9b807
BLAKE2b-256 0314d5f0269a12a2d6934c06ed1643719dd1d7f079ef864ee3c11072e18e39ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8f3c9dc061f203fcabcde3d65f42ee8f635a27694f89431be412b05264b47816
MD5 3ba3a290fa3504ba66fc95693802b5ee
BLAKE2b-256 0846db69f0de908e6cd6db742bb333dd22b2958f7e73fecafb7bac5569d0282f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 737a65e1502d54206c9c16da075ed0489568fff0460b27915ab959b51b39df77
MD5 daabeee494d5186919794b94113a737e
BLAKE2b-256 11bf1bbf38e036185cac25e0aa78531b705c0043429df0a816c8246fa5c1f03c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 79fad012ade4dabe016664e0bb43e010f0ceb5ea9f46e43da62b9fe8e53605b6
MD5 8f42fd61adee54b106b80791d5e78211
BLAKE2b-256 d8d36fdc9094cb5ce3b1ba653723a23f8b74f9829f8732ea78100bf2eba37f97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5d3ef58fba312b5ac8a0e2d01c22193397282348cebd9029c187a646940b4ae7
MD5 d61ca6d935f1b4d4f6ddc835244e094e
BLAKE2b-256 9f552ee7e28468ca4158e705b0e407093b1a3f3a153302347fa280a438333a00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 94a6115a7be3b0b5c8dc1e629e180d60892d20a7890c36604087e91b7c6d072d
MD5 6a252d46dc140a6132cec1a391bb6630
BLAKE2b-256 b79ccb7b53cbde76a7818598c00ed4e47a4d4f299ec9460adec1d20dfdd6e056

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7d444227537633dd203ef92d55c332d2a1bf8bfd6f898e51019077a610b5688f
MD5 6f3be77be119652b084c24fe3da67adf
BLAKE2b-256 20be7a1fbd881d5ff58b47d7d418c35fbb8140fca66ec2594e0ed38f8bd21351

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6e3642e4fe3a6ce92f8da6ee4a44791080dd41072e6121d09031c50ab89dcb54
MD5 fd418940b9aed3b0eb84509da53934e9
BLAKE2b-256 df8313b4c2ce73c065f77882cfda4a000b362f7ab92a19e9fc5b7cfd5ffc2d18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.21.0-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7ded69b12cc885ee285cc59ed562d3a706da93740cb35d859a12d8bc9cffb283
MD5 116b23e31fd2e6b0e58fe367ba5e7dee
BLAKE2b-256 6633a2ff5284f55e12ab18a315dfaba0a412004db81c294a64d0446806a1e134

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