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

  • ecos

  • joblib

  • numexpr

  • numpy

  • osqp

  • pandas 1.0.5 or later

  • scikit-learn 1.4 or 1.5

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

Uploaded Source

Built Distributions

scikit_survival-0.23.0-cp312-cp312-win_amd64.whl (825.8 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

scikit_survival-0.23.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

scikit_survival-0.23.0-cp312-cp312-macosx_11_0_arm64.whl (840.5 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

scikit_survival-0.23.0-cp312-cp312-macosx_10_13_x86_64.whl (869.2 kB view hashes)

Uploaded CPython 3.12 macOS 10.13+ x86-64

scikit_survival-0.23.0-cp311-cp311-win_amd64.whl (820.1 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

scikit_survival-0.23.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

scikit_survival-0.23.0-cp311-cp311-macosx_11_0_arm64.whl (835.1 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

scikit_survival-0.23.0-cp311-cp311-macosx_10_13_x86_64.whl (861.7 kB view hashes)

Uploaded CPython 3.11 macOS 10.13+ x86-64

scikit_survival-0.23.0-cp310-cp310-win_amd64.whl (820.0 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

scikit_survival-0.23.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

scikit_survival-0.23.0-cp310-cp310-macosx_11_0_arm64.whl (835.7 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

scikit_survival-0.23.0-cp310-cp310-macosx_10_13_x86_64.whl (861.9 kB view hashes)

Uploaded CPython 3.10 macOS 10.13+ x86-64

scikit_survival-0.23.0-cp39-cp39-win_amd64.whl (823.2 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

scikit_survival-0.23.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

scikit_survival-0.23.0-cp39-cp39-macosx_11_0_arm64.whl (839.1 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

scikit_survival-0.23.0-cp39-cp39-macosx_10_13_x86_64.whl (865.7 kB view hashes)

Uploaded CPython 3.9 macOS 10.13+ x86-64

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