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

  • 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.22.1.tar.gz (2.7 MB view details)

Uploaded Source

Built Distributions

scikit_survival-0.22.1-cp311-cp311-win_amd64.whl (817.1 kB view details)

Uploaded CPython 3.11 Windows x86-64

scikit_survival-0.22.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

scikit_survival-0.22.1-cp311-cp311-macosx_11_0_arm64.whl (830.6 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

scikit_survival-0.22.1-cp311-cp311-macosx_10_13_x86_64.whl (861.5 kB view details)

Uploaded CPython 3.11 macOS 10.13+ x86-64

scikit_survival-0.22.1-cp310-cp310-win_amd64.whl (816.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

scikit_survival-0.22.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

scikit_survival-0.22.1-cp310-cp310-macosx_11_0_arm64.whl (831.4 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

scikit_survival-0.22.1-cp310-cp310-macosx_10_13_x86_64.whl (862.3 kB view details)

Uploaded CPython 3.10 macOS 10.13+ x86-64

scikit_survival-0.22.1-cp39-cp39-win_amd64.whl (818.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

scikit_survival-0.22.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

scikit_survival-0.22.1-cp39-cp39-macosx_11_0_arm64.whl (834.7 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

scikit_survival-0.22.1-cp39-cp39-macosx_10_13_x86_64.whl (865.0 kB view details)

Uploaded CPython 3.9 macOS 10.13+ x86-64

scikit_survival-0.22.1-cp38-cp38-win_amd64.whl (820.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

scikit_survival-0.22.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

scikit_survival-0.22.1-cp38-cp38-macosx_11_0_arm64.whl (834.9 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

scikit_survival-0.22.1-cp38-cp38-macosx_10_13_x86_64.whl (862.9 kB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

File details

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

File metadata

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

File hashes

Hashes for scikit-survival-0.22.1.tar.gz
Algorithm Hash digest
SHA256 16dd07839885f526fd5523ac14c81f02f73836c6a6db5ea4cede57bf68b292ff
MD5 aaef7efa065fe847fab6bc8fe4ddce2b
BLAKE2b-256 4f8ac722cce1925d8b8a02b1825d5aef4dc17667d2d4f97f5fd52937473cdce5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e2a316e0a47549d8cb2b3a0ffc1fad39321234a929e2a9d47b09a5c070088f53
MD5 2c204e0db63e519df944507fa33bbea0
BLAKE2b-256 1d0a3e8a01bae79b16be9796595080c8661451ac00a078ac9a2737e58941e8a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b476bdb4eff2fa16f05560ac1debf23e0141dd28bf178a6c4d3c3454af1a556
MD5 0928f28509bd9049295e73e0436c11a2
BLAKE2b-256 7a384d56ba3bb80dbe53e12bb6b8f7595d93023b248bb0ac4e66db20564a9c84

See more details on using hashes here.

File details

Details for the file scikit_survival-0.22.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bb0886db5d68583da8e05758a360d83e60a12d27bf2a2434a7aaae10a8d9bc99
MD5 fb097513e1620111967b8b31c24062d9
BLAKE2b-256 eae11c68fa33f9d89602c72983857347c3bdba2db4a26c357deb8898b9897b05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b344097b1b5131bd36a07d5533fbaacd1116791aaec882870c6bf5ca1a7ef2a3
MD5 396ab6ea80a881445567891115286dbf
BLAKE2b-256 2171f5c968c1bc0d05f02b4be765bff5ce84078296ce31aa068840e80fd98c9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8da50cabaae1c7329832addc5ded4b743c77666f81d2629430d3ec7bed729ae9
MD5 0fef69966b11169c6019ef2f0814304f
BLAKE2b-256 72578530c43e3497e6b901eeb0b7d995aec53cc9ce3adf42b72adf1f082ee1e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 59da97c47680e0351d1a9b296d1f2ef45afcdb221767eca9dcfb41462130e642
MD5 c9f085dbcd3c5c8c108b5c03293e5eed
BLAKE2b-256 5be81980b8a6ce4233eeadc448d40dbcaa177e885d3f15300ee7d231bdedee7a

See more details on using hashes here.

File details

Details for the file scikit_survival-0.22.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1ba395e4e0ce4d51f339e60eaf7ecfd13e8623bc66eba678f49c7806f57c95a8
MD5 b9a8600ad797665fbea280e4f36a45ca
BLAKE2b-256 053632fdc6dd74a304fd3bc9587e85f26eca2f8aa813a834e1fcfde2911c325f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f520a82ee03b787746ca5e57729d1a497045d8c921ef859480a343a3fd059f9b
MD5 ce90507631306a16c137057d2bdca850
BLAKE2b-256 b9595e2842417e4b3e52a0ee22dca51ff68e8c8b6364ae29b1baa28c7d79e3a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 788db534ea3a2837fd0ddca947c5a1273deed26f9caf1e0255eb8a0c6e52ef97
MD5 67393cf961f07083440ed6820863a51e
BLAKE2b-256 b085057d8fb81ae3f9abdd6088925c9aa1d5a4781f5c053798157f6a3708b620

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 37b4a9ae6a24d408b2c5f136cffbd9d02d4b7101ef7ea3614a22bb93510c459d
MD5 4774ab587142792679c9288507cc673e
BLAKE2b-256 b0a2449328516c9a41cdae7d2e4f986e9cbd0dcb63cf928e6d0665aff24fafc5

See more details on using hashes here.

File details

Details for the file scikit_survival-0.22.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 367e891ba92fd355439468c0e6260c6780ec5c90cf1d4f1427aac563ae3a4bcb
MD5 d0382fcbcd77d0eb687a2abb2b18a4b3
BLAKE2b-256 305da93c9ef2b317e6544d545e50a23539497478f99b109e42ec76378ba3f9fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 18979d396f483f42633ba6077eae0beb1c857b2483cedbbc8c009ae6478a41d7
MD5 61855b33389230ec5ace41bbe3e9489f
BLAKE2b-256 960604aee0e45402b615a5b5635780195d64f996ab4e22b6ecf5c87fb6084a73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 342c8c09d29fe1cc9b0bbecd3c4dff890ec87c9bd339fc5e7f933fbc7912f884
MD5 6181a4883baf252dcc3a92cd7f229880
BLAKE2b-256 35249b29ef09aaa0adc6c029af71ffa42fb986da85fb3ed05d40fd9be53870eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 450ad2da1267b4433c62f88c065ed8a5e98733e0a70e149690cd86343c1ee65a
MD5 d4dbe6a3504f5b313fc1dacdbb388be3
BLAKE2b-256 68a04d94dd9044024e95bfbe38d16c66fb6c9c21f545419e18aa71721210aba7

See more details on using hashes here.

File details

Details for the file scikit_survival-0.22.1-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2aecc96ff9e08f8dc077859065a5dc89f0a634f650f3feac9a6c76eef747f852
MD5 26eec3a5d66d53d551d4a9b494c39b5c
BLAKE2b-256 c6470a872b212abcacde1b49da159b8dc394c64d4b074f7a344ecb445e18754a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.1-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 3a826ee7376b89fbecb25ea31d048506dd373ad92f9c3a41c424925c40129477
MD5 c0ebb026c9a343e20f9f4a121586a74f
BLAKE2b-256 23ac2b74e7238a1ce30fac41ad4b578ecd006389a1ab6c707b60776df8cb2a2d

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