Skip to main content

No project description provided

Project description

Price License PyPi DOI

https://github.com/iuliivasilev/dev-survivors/blob/master/docs/static/collage.png

Survivors is a Python library for survival analysis designed to handle real-world, messy, and heterogeneous data with high accuracy and interpretability.

Unlike many existing libraries that rely on strong theoretical assumptions (e.g., proportional hazards, exponential distributions), Survivors is:

  • Flexible: works with incomplete, noisy, and heterogeneous tabular data.

  • Interpretable: powered by survival trees and ensembles (forests) that offer transparent decision paths.

  • Highly sensitive to data structure: tree splits are adapted to handle informative censoring and arbitrary time-to-event distributions.

  • Accurate: avoids restrictive model assumptions, resulting in higher predictive performance in complex settings.

Key Features

Survivors was developed during a PhD project at Lomonosov Moscow State University to overcome the limitations of traditional survival analysis. It is designed to handle data with informative censoring and arbitrary time-to-event distributions. Here’s what makes it stand out:

  • Data Included – Comes with 20+ real-world datasets from healthcare, CRM, and reliability.

  • True Continuous-Time Modeling – No discretization needed; time is continuous where it matters: at prediction.

  • Custom Metrics That Matter – Over 10 evaluation metrics crafted to handle censoring, imbalance, and rare events.

  • Speed Meets Scale – Optimized from scratch with JIT compilation, vectorized math, and histogram-based splits for efficient performance.

  • Experiment-Ready – Built-in module for reproducible experiments: hold-out, cross-validation, time-aware splits, and hyperparameter search.

  • Meta-Modeling Power – Create stratified models and ensemble aggregators with ease.

  • Broad Applicability – Suitable for a wide range of domains including healthcare (death or discharge prediction), industrial maintenance (equipment failure), and business analytics (customer churn and retention).

Installation

Install the latest release via pip (PyPI):

pip install survivors

Or install the development version:

git clone https://github.com/iuliivasilev/dev-survivors.git
cd dev-survivors
pip install -e .

Dependencies

  • Python >= 3.8

  • NumPy, Pandas, Numba, Scikit-learn, Matplotlib

Optional for comprehensive experiments:

  • lifelines (>= 0.27.8)

  • scikit-survival (>= 0.17.2)

Getting Started

The user guides provide detailed information on the key concepts for survivors:

import survivors.datasets as ds
import survivors.constants as cnt
from survivors.tree import CRAID

X, y, features, categ, sch_nan = ds.load_gbsg_dataset()

cr = CRAID(criterion='wilcoxon', depth=2, min_samples_leaf=0.1,
        signif=0.05, categ=categ, leaf_model="base")
cr.fit(X, y)
tree_view = cr.visualize(mode="surv")
tree_view
https://github.com/iuliivasilev/dev-survivors/blob/master/demonstration/CRAID_GBSG_depth2.png

Supported Models

  • CRAID – interpretable decision tree model for survival analysis. [1]

  • ParallelBootstrapCRAID – ensemble of independent trees with improved stability and accuracy [2]

  • BoostingCRAID (optional) – boosting ensemble with adaptive sampling [3]

  • Modified existing models (Kaplan-Meier, CoxPH, AFT …)

Help and Support

We welcome contributions! Open issues, propose features, and submit pull requests via GitHub.

For questions, discussions, or collaboration ideas, feel free to open an issue or contact the maintainer directly (email).

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

survivors-1.8.0.tar.gz (11.0 MB view details)

Uploaded Source

Built Distribution

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

survivors-1.8.0-py3-none-any.whl (11.1 MB view details)

Uploaded Python 3

File details

Details for the file survivors-1.8.0.tar.gz.

File metadata

  • Download URL: survivors-1.8.0.tar.gz
  • Upload date:
  • Size: 11.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for survivors-1.8.0.tar.gz
Algorithm Hash digest
SHA256 0f65c1743b150c28aa0f116ea9bcb590dc1c83ebbf37e0786930fbe448a92782
MD5 de4bfda5f54c1873420fab32f50cc367
BLAKE2b-256 946953d6585a14f4f9073a0d3c305af62ac333a3184fc3779dd49c32b146070f

See more details on using hashes here.

File details

Details for the file survivors-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: survivors-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for survivors-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f283085cd5605fa22cd2ffe5d2fe42b07eb286c07e2edfe2dd86afa709e9fdc3
MD5 b8acbebd24809bd9d4f4d3c3ca7db5e6
BLAKE2b-256 b4ef35c29d747c8eb50ee53c791ad8535c0f633cccb9722bfaab9975e2ee6d58

See more details on using hashes here.

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