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

  • ecos

  • joblib

  • numexpr

  • numpy 2.0.0 or later

  • osqp

  • pandas 2.2.0 or later

  • scikit-learn 1.8

  • scipy

  • C/C++ compiler

Installation

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

conda install -c conda-forge scikit-survival

Alternatively, you can install scikit-survival from PyPI or from source.

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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

scikit_survival-0.27.0-cp314-cp314-win_amd64.whl (822.0 kB view details)

Uploaded CPython 3.14Windows x86-64

scikit_survival-0.27.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

scikit_survival-0.27.0-cp314-cp314-macosx_11_0_arm64.whl (850.9 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

scikit_survival-0.27.0-cp314-cp314-macosx_10_15_x86_64.whl (856.0 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

scikit_survival-0.27.0-cp313-cp313-win_amd64.whl (806.4 kB view details)

Uploaded CPython 3.13Windows x86-64

scikit_survival-0.27.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

scikit_survival-0.27.0-cp313-cp313-macosx_11_0_arm64.whl (846.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

scikit_survival-0.27.0-cp313-cp313-macosx_10_13_x86_64.whl (854.2 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

scikit_survival-0.27.0-cp312-cp312-win_amd64.whl (808.3 kB view details)

Uploaded CPython 3.12Windows x86-64

scikit_survival-0.27.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

scikit_survival-0.27.0-cp312-cp312-macosx_11_0_arm64.whl (850.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

scikit_survival-0.27.0-cp312-cp312-macosx_10_13_x86_64.whl (858.7 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

scikit_survival-0.27.0-cp311-cp311-win_amd64.whl (802.0 kB view details)

Uploaded CPython 3.11Windows x86-64

scikit_survival-0.27.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

scikit_survival-0.27.0-cp311-cp311-macosx_11_0_arm64.whl (848.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

scikit_survival-0.27.0-cp311-cp311-macosx_10_13_x86_64.whl (853.2 kB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

File details

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

File metadata

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

File hashes

Hashes for scikit_survival-0.27.0.tar.gz
Algorithm Hash digest
SHA256 5ee6677688f358107209a705c2cdf6f0ac5f711a3784b8c60376383b9e0f2bc3
MD5 54734e24f17c60f29bdb90ea624c4f3f
BLAKE2b-256 992c835bac49869a08e47a302433e0a1e3b4780576fd6d5ce975c19f59a3b535

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0.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.27.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 36a6b11a77d957632ff48c5bc6f1d380af3bc940e28b124a64c64f9487fd00ad
MD5 ab82b11f1c2607f1799dd54c1889f578
BLAKE2b-256 28b9fc7c40751f982d76f15a0aa8d2538b1c5f557642aba23714d037edfdf3a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-cp314-cp314-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.27.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 12bb0a6f51df87963282b99353920af8843d0b86f189090f81ccf520077b137d
MD5 f1c9f156f57332b9ac32291882b7eee7
BLAKE2b-256 6138072a31674528ad8f8d25bf372f29b38d5f1b00b574497fdaadcc5ca5eace

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_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.27.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dc4a42f43276deb46411cc4467ed2c3c84ff649a74aa0b8cff1e9f895f75d8f5
MD5 05e3e6057d60946e613511b5ab781d80
BLAKE2b-256 df1c996b9da04111096d6ad25d37bf327ff3d0afad266d9d4bdfc2a1be68ea1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-cp314-cp314-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.27.0-cp314-cp314-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 846907bae9c4c64f4fb784dfe3161cb0e21e32e3bc8040c630aaf18c2ba4af7c
MD5 7c44658bf28136ef15b8c7921930d5f8
BLAKE2b-256 93d53dbb6494e44789134e93cfbc9f229d463d023fa400b6dd73a91faa13b967

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-cp314-cp314-macosx_10_15_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.27.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3ff8628f824fa64ba771bb6fac89c78e1e576528d065788e47d46b6aa8af825a
MD5 aa5edf14603fde921737067a5c23d418
BLAKE2b-256 cbeef46729b981da7c47b190a4f2c51a2cff4a67307d300420635feddd5cc33c

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-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.27.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fc0e5ab5da937769104078b57496e88e3e5d9ddee51ec7723231fbe89fac8591
MD5 684b7cebb596f4be86164352d1fa873a
BLAKE2b-256 a21c862293a1104b639ac0c21fc58052b966246ed7182c2bd8a243fa8132ecaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_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.27.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5cc96bed3b2fab54d7d4ae204d47fb569daf073d0c2d847ecd76f3701aa96bb9
MD5 0c855f8172a6e9404f1efc25c5567258
BLAKE2b-256 a68906009a4f68ee1357d44cc9ab37fe18a32807698295addefef6a152d96b55

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-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.27.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2f01f0f51ca8d342b9637c6beddae7b25e0ec70aeff6e1a78723f45f7b76603e
MD5 292c485695566dfc5afcffad49fce052
BLAKE2b-256 cf1532c9400a31a3471ed07feee6a918df4fce334d6baf57fcfb5a8f39f5f502

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-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.27.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d15a8eef5c09e78e07827ddb88f14fd62f11d7b9c138cba730f7c61e7b6fec1e
MD5 520b6b2f1c3f77fd082cb5055296b727
BLAKE2b-256 8476cf9dcc2ce16d2a4c10fdf44793e861de4ed462e5d92a8c16aa868a1ccd66

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-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.27.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5041fdfdb4c7f0d76622ba8fccac7819e5639c8831376801a497b3639c9dcccf
MD5 779dc7a3bbf3beb8182dc70a92dfbb80
BLAKE2b-256 68d5b92a5770a0029bd824cc8de92411388d09bbdc5c48cc2df3820fe2b3a223

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_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.27.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0801533e67b896955a62b4872950156f8b0568257774a019d8d6053a4bb25870
MD5 46a638aaf4603f2aec061d16502724a0
BLAKE2b-256 89b9e88f68bb214d9c690e7f29fbe5885bc1e12f5a5406eb12af9ad9b438d884

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-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.27.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 68e49eb4819040e751b3f5111a963985618e88fbb59cb5296e1d0eeb1b963813
MD5 71dadf38ed7a43bf3cd8568864a939a7
BLAKE2b-256 25b1d2aa453ce74777f09591d82e9e93ed2dc02d7464f807f3715c8d4abfdd64

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-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.27.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ecebb6adfab662147106a172799ab09a98869e7ae752f8575bd7e2fc61ead717
MD5 fb12248c79b1e70540cdf04785fa1728
BLAKE2b-256 8f76d96d28f172097ecb67bd208f072de77bab903a4a7f0033c82cb422a17364

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-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.27.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f7aad05389567dd6faed373151c405147661cffa9cb7f0d0e6f3569da41c5500
MD5 595b4cc1c34145d89befe16c407dc761
BLAKE2b-256 3b86138c475d900fe563929ddd76e1ad4e8c6119707ffb2b65bb5c2826a9220a

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_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.27.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 35622cdf2f79bb329e5d375181ca794c26f0e63b9a9f5393ff8cadcb1a18b1be
MD5 3dd7d8083d756d9bf14a00a69d9a5072
BLAKE2b-256 9de3ab6b6b1badf82dd342d2b489b8b123185f1a4173f70ece97851ddbbe434d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-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.27.0-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.27.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b285c69620ddbceb81bf1f1a0c6e8204d6be940e4c89d743efed4c98db7347fc
MD5 1a188e74fed18ba68fa912b2fa27c13f
BLAKE2b-256 4245a992fe1028c05ffc2aca50b5699b655053f41f4ac04e5dff6a4776748085

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.27.0-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.

Supported by

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