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

  • scipy

  • narwhals 2.0.1 or later

  • 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.28.0.tar.gz (4.7 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.28.0-cp314-cp314-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.14Windows x86-64

scikit_survival-0.28.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.0 MB view details)

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

scikit_survival-0.28.0-cp314-cp314-macosx_11_0_arm64.whl (888.8 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

scikit_survival-0.28.0-cp314-cp314-macosx_10_15_x86_64.whl (894.4 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

scikit_survival-0.28.0-cp313-cp313-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.13Windows x86-64

scikit_survival-0.28.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.0 MB view details)

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

scikit_survival-0.28.0-cp313-cp313-macosx_11_0_arm64.whl (890.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

scikit_survival-0.28.0-cp313-cp313-macosx_10_13_x86_64.whl (892.5 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

scikit_survival-0.28.0-cp312-cp312-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.12Windows x86-64

scikit_survival-0.28.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.28.0-cp312-cp312-macosx_11_0_arm64.whl (888.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

scikit_survival-0.28.0-cp312-cp312-macosx_10_13_x86_64.whl (896.8 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

scikit_survival-0.28.0-cp311-cp311-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.11Windows x86-64

scikit_survival-0.28.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.0 MB view details)

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

scikit_survival-0.28.0-cp311-cp311-macosx_11_0_arm64.whl (891.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

scikit_survival-0.28.0-cp311-cp311-macosx_10_13_x86_64.whl (891.4 kB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

File details

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

File metadata

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

File hashes

Hashes for scikit_survival-0.28.0.tar.gz
Algorithm Hash digest
SHA256 f8903bf9b67bf9040c7a8b639d300b0817d9e208c8fd7bf34cc624dcc71d32ee
MD5 602cfc9730f1c196d5db55d4c948381f
BLAKE2b-256 fd5f4f9951a625c4570a37ea86f64a4162d0ee62374b6b304bd3ae1812cd6723

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 ba18dc9979b35bbc91992dbb2b142587340d51f8c0e5491f52d1c1a76bda21c4
MD5 fa9f3eee2a3d5059a38592149562afff
BLAKE2b-256 a35c0b82153f1b49704ddfbb1da54032c6f14d2ad13d4b47fd2b6b30d6f2ffbf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1dea579f9f025d4092a0df1d09f9fdd12845a5d49abb36f3be50472c31371568
MD5 df9fe9d4549168eca2e8c706964ddb32
BLAKE2b-256 aae062be77882b822f2f78d84dd9fb94d5c7365ce0299c264818de78d4b7230a

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.28.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.28.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cac9d3a2c727999db3a108ed092e5a8dde1f53e60ef054b5df7869036d3b405d
MD5 cb9d200f2d8149041bf68adfbd290fd1
BLAKE2b-256 68dfc9dc7e4905589dc994f376a6d03b180abe9c61f5ff5d5ce13a6cf2987063

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 70c6468bfb2a476e52e6150c02ed942983782a1a3a8e4eb43fa8fe7753ed3e73
MD5 2b621d9fa00debe10ccf1968aae3d558
BLAKE2b-256 9bab729213dcc4db9c9159a07bd00736e853db6234f41e152cdf360d77a8618d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.28.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.28.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ce0282110189fbbe482d66f21a6839ce57667fabd91633977566cb56fd0b37c2
MD5 ba4c520499dc4d3e40b67d69ce80665b
BLAKE2b-256 29c5afe929d99d7d14f9c626e9d321be4b83742a3b7122378faec3489af25289

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 428eb32b097acf95b267c9dc35a1cda0a41666d9c017e46b060138a56dfb32fb
MD5 4f9fed8ba7140ef07af4ffc0339b0fa1
BLAKE2b-256 21d13db1d3566989a73ac9064797ef8fc9bceb779e730f9979d32a9d9aa38a13

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.28.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.28.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f85c5d7f565e305c9bf89fbdc3c37edfcb88d380a32d55f609011d16e1b411a8
MD5 cd3a2be04354b61eba8de0e67059133e
BLAKE2b-256 46cdf8e2c66455579ca88cc46fb2c41ceaa68a32b1dc300eed83b5fdc9eef57d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 02b81bb8fe08c3c8b5356c6bc45150981d333c0e31f9c5d74c2bff2ed9eecb29
MD5 f2799dadb66dea9f01a5bae679e1ed45
BLAKE2b-256 5166736ed0bbaf8f131d025dc4f78891c8a0ecd10db27429d54ea4b07bdcacf8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0a3dc0019cdd8ca9522a91a3503f57f72010736f6660efee385f1a2576c748a7
MD5 92fd611d354632fa9e80f6ce29dbd380
BLAKE2b-256 269da7bee6a1e224e65c0b6098e75bba16a2d3c0ad1ae44d962b49a87676e8e4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 83548a95e7b69cb6e308a58f8b1dc8cddace5d729fa2bfb35eff825c66ee3920
MD5 9618fd70a4f9cb3e7c0de6064ba0ce5c
BLAKE2b-256 e7f5a9595bfeadec2fbd68c8e578bd82d17610e4d930d18720b6a7c73b4ae54a

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.28.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.28.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 002a071fc3cf723bad09e2bc93055b39a97fcebe3987cf71b85135506eee0883
MD5 01cb3122d0630fa968e7a5861587f803
BLAKE2b-256 f549a8fd5f0d3b65fd79820d6054ba5b1a5f9898bc9548947e61b0cec1511c7e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 69d55ef6132c0369135e36c071d303f780a29ab4fd2bf4018ad4c88d0ed2e04e
MD5 53e3d382e0952bc6b2767a5425638621
BLAKE2b-256 7065b8b8cfc9a93c3685e9c9b61b5cdd33e6e5f40238a15d58eb2f48f06150e3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7efa627ec151784e831fcae78545ed5b61ffd37928b866713643935fb206f4e9
MD5 26371051fe8fe4c6f9e5458ff8728fca
BLAKE2b-256 986047acd019957cbc67920ece7020a3705aefc931e1a7e56679992d97f210cf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d5816b07570ad8edf849502ea59abdd1391d74aaa6f9215224c38c0887fcb1d5
MD5 42ff40c9055246d9d13895dbafee4ca2
BLAKE2b-256 c5de4da2f99a2c043b3032806f2408af09e7f0e3a2425edefaec5aa969b2106e

See more details on using hashes here.

Provenance

The following attestation bundles were made for scikit_survival-0.28.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.28.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 90621540f4b14c4b9d2e29dbcd68c8981d66462688375d64c9c1e9dae55168dd
MD5 54f01018d397e00e06895e5caa55b8c6
BLAKE2b-256 f2af03c2bad0c2b84d318cbc747463b19c2b6d620fd4eed2afb8fa8523416fa6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for scikit_survival-0.28.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 537cbb5e294d143a3bbce5a03e935f31d04c624e5a35a391908b128c74cc1039
MD5 20d7b66c674f8e7c15780fe6c2bb82eb
BLAKE2b-256 5cf204ade4d55e7a822ebd86a6da7c3f1ea070b5b6033911131899da98b2b4cb

See more details on using hashes here.

Provenance

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