API Reference

This page lists all the public classes and functions of Survive.

survive: Top-Level Module

Survival analysis in Python.


Breslow(*[, conf_type, conf_level, …]) Breslow nonparametric survival function estimator.
KaplanMeier(*[, conf_type, conf_level, …]) Kaplan-Meier nonparametric survival function estimator.
NelsonAalen(*[, conf_type, conf_level, …]) Nelson-Aalen nonparametric cumulative hazard estimator.
SurvivalData(time, *[, status, entry, …]) Class representing right-censored and left-truncated survival data.

survive.base: Base Classes

Base classes for survival analysis objects.


base.Fittable Abstract mixin class for models implementing a fit() method.
base.Model Abstract base class for survival models.
base.Predictor Abstract mixin class for models implementing a predict() method.
base.Summary(model) Base class for summaries of survival models (intended for subclassing).

survive.datasets: Survival Datasets

Functions for loading some survival datasets.


datasets.channing() Load the Channing House dataset.
datasets.leukemia() Load the leukemia dataset.

survive.nonparametric: Nonparametric Estimation

Nonparametric estimators.


nonparametric.NonparametricEstimator Abstract base class for nonparametric estimators.
nonparametric.NonparametricSurvival Abstract base class for nonparametric survival function estimators.
nonparametric.NonparametricEstimatorSummary(model) Summaries for nonparametric estimators.

survive.utils: Utility Functions

Miscellaneous utility functions.


utils.add_legend(ax[, legend_kwargs]) Add a legend to a plot.
utils.check_bool(tf, *[, allow_none]) Validate boolean function arguments.
utils.check_colors(colors, *[, n_colors, …]) Validate colors for plotting.
utils.check_data_1d(data, *[, numeric, …]) Preprocess and validate a one-dimensional array.
utils.check_data_2d(data, *[, numeric, …]) Preprocess and validate a two-dimensional array (i.e., a matrix).
utils.check_float(num, *[, positive, …]) Validate floating-point number function arguments.
utils.check_int(num, *[, minimum, maximum, …]) Validate integer function arguments.
utils.check_random_state(random_state) Validate random number generators and seeds.