No project description provided
Project description
survivors
survivors is a Python library for survival analysis.
It allows for building survival models: Survival Tree, Bagging ensemble, Adaptive Boosting ensemble.
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.
Survival analysis is a set of statistical models and methods used for estimating time until the occurrence of an event (or the probability that an event has not occurred). These methods are widely used in demography, e.g. for estimating lifespan or age at the first childbirth, in healthcare, e.g. for estimating the duration of staying in a hospital or survival time after the diagnosis of a disease, in engineering (for reliability analysis), in insurance, economics, and social sciences.
Statistical methods need data, but complete data may not be available, i.e. the exact time of the event may be unknown for certain reasons (the event did not occur before the end of the study or it is unknown whether it occurred). In this case, events are called censored. The data are censored from below (left-censored) when below a given value the exact values of observations are unknown. Right censored data (censored from above) does not have exact observations above a given value. Further in this paper, right censoring is considered.
Requirements
Python 3.9 or later
joblib
pickle-mixin
numpy >= 1.22
numba >= 0.58.0
matplotlib >= 3.5.0
seaborn
graphviz >= 2.50.0
pandas >=0.25
scipy
python-dateutil
scikit-learn >= 1.0.2
lifelines >= 0.27.8
scikit-survival >= 0.17.2
openpyxl
Installation
The easiest way to install survivors is to use by running:
pip install survivors
Examples
The user guides at doc and demonstration directories provide in-depth information on the key concepts of survivors, an overview of available survival models, and hands-on examples in the form of Jupyter notebooks.
There are examples of using the library with Jupyter Notebook. The example is a variant of solving a multi-stage problem:
Import the library
Loading and preparing data
Model training
Getting a forecast
Visualization of the constructed model
Visualization of true and predicted survival functions
Scenarios
The library allows to carry out the following work scenarios:
Collecting data from patient medical histories (hospital tests, medications, treatment) from various medical institutions. The medical history can be presented as a set of tables in csv or xlsx format, or as a hierarchical structure of xml files.
Building survival analysis models. There are available the following models: a decision tree, a bagging ensemble, and a boosting ensemble. For each model, there is a wide range of hyperparameters, which provide the flexibility of the model.
Predicting the probability and time of the event. Forecasts can be used by the user to solve the problem of classifying or ranking new patients according to the expected severity of the disease.
Predicting the individual survival functions and cumulative hazard of patients. Forecasts can be used to support medical decisions and adjust treatment.
Communication
Mail: iuliivasilev@gmail.com
References
Please cite the following paper if you are using survivors.
Vasilev I., Petrovskiy M., Mashechkin I. Survival Analysis Algorithms based on Decision Trees with Weighted Log-rank Criteria. - 2022.
Vasilev, Iulii, Mikhail Petrovskiy, and Igor Mashechkin. “Sensitivity of Survival Analysis Metrics.” Mathematics 11.20 (2023): 4246.
Vasilev, Iulii, Mikhail Petrovskiy, and Igor Mashechkin. “Adaptive Sampling for Weighted Log-Rank Survival Trees Boosting.” International Conference on Pattern Recognition Applications and Methods. Cham: Springer International Publishing, 2021.
@inproceedings{vasilev2022survival,
title={Survival Analysis Algorithms based on Decision Trees with Weighted Log-rank Criteria.},
author={Vasilev, Iulii and Petrovskiy, Mikhail and Mashechkin, Igor V},
booktitle={ICPRAM},
pages={132--140},
year={2022}
}
@inproceedings{vasilev2023adaptive,
title={Adaptive Sampling for Weighted Log-Rank Survival Trees Boosting},
author={Vasilev, Iulii and Petrovskiy, Mikhail and Mashechkin, Igor},
booktitle={Pattern Recognition Applications and Methods: 10th International Conference, ICPRAM 2021, and 11th International Conference, ICPRAM 2022, Virtual Event, February 4--6, 2021 and February 3--5, 2022, Revised Selected Papers},
pages={98--115},
year={2023},
organization={Springer}
}
@article{vasilev2023sensitivity,
title={Sensitivity of Survival Analysis Metrics},
author={Vasilev, Iulii and Petrovskiy, Mikhail and Mashechkin, Igor},
journal={Mathematics},
volume={11},
number={20},
pages={4246},
year={2023},
publisher={MDPI}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file survivors-1.5.0.tar.gz
.
File metadata
- Download URL: survivors-1.5.0.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81ce2feeb6dc258bc4646dd5500b0c9fd907ddae1e697113f74cf93fff155adb |
|
MD5 | 6ad34d3ad2018bfb8793c59fc95fb18b |
|
BLAKE2b-256 | a45e0f16e816cdcb74ef036d5cf5810df7ea4bb39bfbb4b5b7e02e7973c21bff |
Provenance
File details
Details for the file survivors-1.5.0-py3-none-any.whl
.
File metadata
- Download URL: survivors-1.5.0-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 064f48cf6bcc8676bba1007f10f22b448e0ac006a3d1a44c1c7c0df56130c1c8 |
|
MD5 | b301ea319fb9765f04238e5342b2d1dd |
|
BLAKE2b-256 | 8393a4d0d0f6c3e02cea7bef9308d649428a01ff68731b4126577327f7c2d388 |