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

Uploaded Source

Built Distributions

scikit_survival-0.22.0-cp311-cp311-win_amd64.whl (818.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

scikit_survival-0.22.0-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.0-cp311-cp311-macosx_11_0_arm64.whl (832.7 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

scikit_survival-0.22.0-cp311-cp311-macosx_10_13_x86_64.whl (863.2 kB view details)

Uploaded CPython 3.11 macOS 10.13+ x86-64

scikit_survival-0.22.0-cp310-cp310-win_amd64.whl (817.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

scikit_survival-0.22.0-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.0-cp310-cp310-macosx_11_0_arm64.whl (831.9 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

scikit_survival-0.22.0-cp310-cp310-macosx_10_13_x86_64.whl (862.8 kB view details)

Uploaded CPython 3.10 macOS 10.13+ x86-64

scikit_survival-0.22.0-cp39-cp39-win_amd64.whl (819.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

scikit_survival-0.22.0-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.0-cp39-cp39-macosx_11_0_arm64.whl (835.4 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

scikit_survival-0.22.0-cp39-cp39-macosx_10_13_x86_64.whl (865.5 kB view details)

Uploaded CPython 3.9 macOS 10.13+ x86-64

scikit_survival-0.22.0-cp38-cp38-win_amd64.whl (820.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

scikit_survival-0.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

scikit_survival-0.22.0-cp38-cp38-macosx_11_0_arm64.whl (836.9 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

scikit_survival-0.22.0-cp38-cp38-macosx_10_13_x86_64.whl (865.0 kB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: scikit-survival-0.22.0.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.0.tar.gz
Algorithm Hash digest
SHA256 ffcead3e45d5562e88dad0f854fbec465983a26962319fec8324da86ab31ecd3
MD5 30a53c36a0286b20ca25afb532fba9d6
BLAKE2b-256 0d8151461f39032cc38d4c4f680eece798b8cf510363eef127523e7e6b89b92c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4446568e9fc669bd8d9ef3250e403b37cdc646af29ebdc2853b60d4af82603f3
MD5 41f8d508f17ee44cd1ff556f426643b8
BLAKE2b-256 007ae261c65c403c8fa4fefa0634d8c05d093312c47dde9831ccf58a24fe92b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cedf7df80b802af7d250622733801d93c3b85cca31d8156bd894ea07a5166b94
MD5 2897b68a4a0079489812890b78d517a9
BLAKE2b-256 e2812670c7e9118cce16ea1e13debfaae6b4db1e3aa4034c75eb73b4ec36fc0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ccec0fb18b00e9822fc62d2344dd5d44f1c494e7d0fe900a8e0477165f194d5d
MD5 b9a5ed6f06cf5fe5b2df56062e9839f2
BLAKE2b-256 ea7780a70adebbb196f04b1e41ab72615cf3703ef09a126481bae0452a3f7795

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 aac8f44fa88a741871117c1eb58b7bb53687c36f90368d473cb5f76cb020bbfb
MD5 68578a8b60a9acb7d686b3e7b42a1814
BLAKE2b-256 17b4683faac40db5d4b092bd540a5ba2382ede94d9178cbf51acd096707425be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c5a1041fb4139f0abdedc4b445261132591d8d1475525492db7030ce37750747
MD5 b7908cda82e60a3d6d6ae666d653f881
BLAKE2b-256 58f80a6086ad004972cab44e86fb7627849d6074c9bdd33f688bcda094745f7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 75e6297fb2d08079c4ea6dd4addeb43f52c7927b687a20b69435439a556eb5a6
MD5 57a41f03e847b9a5580e6be35666f94d
BLAKE2b-256 073a9ff62606df699205976080058cf935d129afbf53c77c786e43f25e68381f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 704eaa846468a03f701a818a9f96d8c8ca673858947df9f3408f12b31a122c59
MD5 f9c236b400fd9aa9c88238d567a71df8
BLAKE2b-256 de50385258f7ae74dbcb3034e33c676c64717f076a38e804b4dd7278b8098b79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f08780501e4026e96e368c1865a53b31eb391b176426b6a42d3da726ddedb7b9
MD5 5ccb272bd0e48140284e2ad9bdc8b57c
BLAKE2b-256 ae87873957f471ab90daf57ce7c3452b787a055a70b6896a6e8abc9eb3da3bb3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 eecd7176aa2a5d827857a14adffdb2116263a69b498db90e850f551076129b84
MD5 b119da558b4b244d213f0b7526520e4d
BLAKE2b-256 fee0553ca478b559144f953ac2cb802b489493227231cc500057a88fbdc8ea9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b74f70faa0f0d23ab34e83c5e59f636f68b8dd27544638466c97b10656a20e46
MD5 f7d593ac639882912c8714d3a3758d19
BLAKE2b-256 f3aed7f4b1e8ff3453f23b7737141fd757f9f48f605b998fb24621772f89722c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a24ac27152afdcb5d4d44fafabd5f150a130c65275b7a621bd8df8558d8696c8
MD5 d4d1dae1dc04f9b68ebad528196c8e27
BLAKE2b-256 bb454abf1552664be9329d4e2a28a3d39837ff68c237356c33c3503ee576d707

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 c40c31f92e25c1cff900f7910c26456387f89e38c089877a71d6a6ba7f2ca0f2
MD5 4ee6702ea8ba54a5d665b89867f5d331
BLAKE2b-256 23c041cc1e951a8c72f479060dbc1ffb503516781e8f827ff40cef9e1b29b2d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 beb3067a4512dfd48795512e602adf52199e0aa20b62f20664d9ac71123e45ff
MD5 2d3fa87db084614bccad4d5a6a700407
BLAKE2b-256 80bdc84298160b5c25e2501811097328321c4ba9f6330622fa865b54804044bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8dbb475b1a08efeeabda0676e17e1c91a5918ce9774eaabbb3f4f270ead7f7e7
MD5 73596a07bd34a9bf71d126f80808e4c1
BLAKE2b-256 e83c50f414587e1054a407df3bd691c37670acc8a0c7ac8e30134d54ae86c76d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 74015e741979e842b4d16af9b8fb2b929f219569f36865b1c6f027f9dbd07161
MD5 0ac48e6ef1118b63502fedd39d3a2de5
BLAKE2b-256 b3105768c250204b036d0273eeec9cbf507c673fba4585ad40343cf550b64bee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.22.0-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7e66c238cf6a719ef1d5816b3b5b15e0ee606e337e6f25d437bf40c2cdab29af
MD5 70c223481c503ef67a3da187a3646765
BLAKE2b-256 add4e9733e18f16603929db7da7c585bd123999bf89b3ec35c5d22f7cf588154

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