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.10 or later

  • ecos

  • joblib

  • numexpr

  • numpy

  • osqp

  • pandas 1.4.0 or later

  • scikit-learn 1.6

  • scipy

  • C/C++ compiler

Installation

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

conda install -c conda-forge 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.24.1.tar.gz (2.8 MB view details)

Uploaded Source

Built Distributions

scikit_survival-0.24.1-cp313-cp313-win_amd64.whl (830.7 kB view details)

Uploaded CPython 3.13Windows x86-64

scikit_survival-0.24.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

scikit_survival-0.24.1-cp313-cp313-macosx_11_0_arm64.whl (841.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

scikit_survival-0.24.1-cp313-cp313-macosx_10_13_x86_64.whl (869.9 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

scikit_survival-0.24.1-cp312-cp312-win_amd64.whl (832.6 kB view details)

Uploaded CPython 3.12Windows x86-64

scikit_survival-0.24.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

scikit_survival-0.24.1-cp312-cp312-macosx_11_0_arm64.whl (847.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

scikit_survival-0.24.1-cp312-cp312-macosx_10_13_x86_64.whl (876.2 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

scikit_survival-0.24.1-cp311-cp311-win_amd64.whl (826.7 kB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

scikit_survival-0.24.1-cp311-cp311-macosx_11_0_arm64.whl (842.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

scikit_survival-0.24.1-cp311-cp311-macosx_10_13_x86_64.whl (868.9 kB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

scikit_survival-0.24.1-cp310-cp310-win_amd64.whl (826.8 kB view details)

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

scikit_survival-0.24.1-cp310-cp310-macosx_11_0_arm64.whl (842.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

scikit_survival-0.24.1-cp310-cp310-macosx_10_13_x86_64.whl (869.1 kB view details)

Uploaded CPython 3.10macOS 10.13+ x86-64

File details

Details for the file scikit_survival-0.24.1.tar.gz.

File metadata

  • Download URL: scikit_survival-0.24.1.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for scikit_survival-0.24.1.tar.gz
Algorithm Hash digest
SHA256 059ca5911f980e44f69951baf08efc8d7a7cf1adba7a5422580ef65330cfd88e
MD5 6315df796dbd92b7547106663ff00c18
BLAKE2b-256 c7cb0d3aa99c3997f22b0561900c06726c97a1f0799d17ed64fff98c7b1c2f58

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1.tar.gz:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scikit_survival-0.24.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4fa5fdb77c7902b90a353e04655245bd3b81dc980743b7f83ad68cb74ed63d83
MD5 9ab9f69ee371056306f3f857c405ab46
BLAKE2b-256 b976ce24305c24ae89ceff0e8ed7305cf5542016cded3bbb57fc599a2d459028

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp313-cp313-win_amd64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scikit_survival-0.24.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e978b79bc542e259cf75024b1b6381f2636122ebe440a64fd7aed7f8a9f1afc0
MD5 d3d78ca6f107e95e71200b81823ca05b
BLAKE2b-256 303fd6fa1a1f64cb5d09d33d476779809fed05d2971c5ffd07de4a471ad3f1a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scikit_survival-0.24.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1332d310d9bfed12932989c869e6e5757e4a20ab01a89f25b64eb83049d1098d
MD5 01ea24065f63810fc543a4f3b47a77cd
BLAKE2b-256 abd7554c7fe38e52f1895f0bdfd2de96e4c17da55f23f7264cc1fab34c731a4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scikit_survival-0.24.1-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1a0126081f84b45804359fc0a68ad4c3a2dbee88656baa0b78fa304b52a03b23
MD5 2e369a3866aad2fcae5062d907032f8a
BLAKE2b-256 eb03a8fe9119ac7dbac03b7554ddeaf632680f7a7d005670a9f1f363ce847bf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp313-cp313-macosx_10_13_x86_64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scikit_survival-0.24.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 62d8d37904d38a7140b8918557d55cc8d3bfe832fd39de63e723b0aad8b9bb21
MD5 4906896f273280d341f63503dddd0e38
BLAKE2b-256 01346d6b2554c1d3c27371fa4ed8719f2d659802d11f333a26d0e7ee854e9197

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp312-cp312-win_amd64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scikit_survival-0.24.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e06abac35705b471d950fa491bbb0f7473fe9005f753b2996819b231dc0380ec
MD5 b35bd63eadc95e881e6f27b70b3440e8
BLAKE2b-256 67d28e3a115ff6adc5ace14b5cf32a2d8d77b32041ebeb2bad84fb82038dacbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scikit_survival-0.24.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9e0c690394ad58ff8d20f0525eb5eae93966ed9531f0956a105b66a7503e4ac4
MD5 536c3dcaef0ba29db9ae9b8f62898c71
BLAKE2b-256 c1e45090bf732722b6190b79d8cf39a12bee40b1873a2d4f1d4427342ac0e377

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scikit_survival-0.24.1-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4f44b6fd3147fa41771977317be990ff44c471513f0e42191db2b88248f7bd72
MD5 10e3db1a7d19b58c4d902e0d4d810291
BLAKE2b-256 3d7ea4f0f223246e52a91d2ca6f0a1283a4578160febbec2065ab128d4e3303d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bc77a649fe960f0f00aa09b6c13b125f5d893451775fe1cfd14f49697d7b885a
MD5 9359c80bd03ec8b5055f1b3670f5228e
BLAKE2b-256 cfe48fbba4d983c619aff7235618600e9c32395b007d29db14973066a7e952ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp311-cp311-win_amd64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d686d0c94c9ad919c32bd02ccacd89d6d7a296b9deab1f9b797bb670350856e6
MD5 7fe9800a11f8c9a2ce3823d306a74cfd
BLAKE2b-256 73f4b474631b68a5a7fe799cc63dc30d9db5432d16e24ac760e6560aeb84aff9

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 51a624760bf88df0a469d363737394c1d45aedd9eaaeb0fedb76d09af8fa8b90
MD5 e515cf500d73d98e6bfd613c5c0e97d0
BLAKE2b-256 7e184d29805f94e793799512f469a8e0cc97a3d4d73057c4052e62c0781d819a

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 eb2902f6da4eb65751a0fe5efb539c0468e012e980c198f4bc956e7339c22996
MD5 34c221994af9890391bdf49682f303d6
BLAKE2b-256 f74219b84de0eb6af19cf6005d2a192d680eadc31aa15bbaf3435663fed6ebc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp311-cp311-macosx_10_13_x86_64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1d77799523feeeada3061172d7cf9ecb881d2d38a60cb27e94233cddfbb60b9c
MD5 15a58c98dfd55b3f25bd5a402ae4cfe4
BLAKE2b-256 ae1b99b66278a492eabe8ca1178f33f1e60549f3d496a3e525c36a0e14f77268

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp310-cp310-win_amd64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ee83ec8ffee5d68a7ae3c5885e867b0851d2b53b0489f1003e00f0b05930b470
MD5 903955bb4ab1195bc776296a8776d1c1
BLAKE2b-256 43010af5654926fc700fdef273ff77305e71d1c4c1daef4c3349d68ee905a301

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d85182fd4d7392ee1c05020d8740958976cce417275b5542d6ddfb2f7fe117f4
MD5 da72fe717665da09476d47993826833b
BLAKE2b-256 89f6a18b00cf95669cb2cfc2555ec4a4d2e24c0ddb7ae9d4b7ca4fb5f8029daf

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for scikit_survival-0.24.1-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 87864f9be302bd10d7874f200e85fefc21e1272656fb960ed622913e3c99c796
MD5 2d090b5cee37abd655a7bd0df1bab212
BLAKE2b-256 8adde1d3c3dc0d410f3115e0c7fc8ea8773b9eeae895d5a3b90d355426c5ec01

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.24.1-cp310-cp310-macosx_10_13_x86_64.whl:

Publisher: wheels-workflow.yaml on sebp/scikit-survival

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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