API reference


get_x_y(data_frame, attr_labels[, …]) Split data frame into features and labels.
load_aids([endpoint]) Load and return the AIDS Clinical Trial dataset
load_arff_files_standardized(path_training, …) Load dataset in ARFF format.
load_breast_cancer() Load and return the breast cancer dataset
load_flchain() Load and return assay of serum free light chain for 7874 subjects.
load_gbsg2() Load and return the German Breast Cancer Study Group 2 dataset
load_whas500() Load and return the Worcester Heart Attack Study dataset
load_veterans_lung_cancer() Load and return data from the Veterans’ Administration Lung Cancer Trial

Ensemble Models

ComponentwiseGradientBoostingSurvivalAnalysis([…]) Gradient boosting with component-wise least squares as base learner.
GradientBoostingSurvivalAnalysis([loss, …]) Gradient-boosted Cox proportional hazard loss with regression trees as base learner.
RandomSurvivalForest([n_estimators, …]) A random survival forest.


StepFunction(x, y[, a, b]) Callable step function.

Hypothesis testing

compare_survival(y, group_indicator[, …]) K-sample log-rank hypothesis test of identical survival functions.

I/O Utilities

loadarff(filename) Load ARFF file
writearff(data, filename[, relation_name, index]) Write ARFF file


ClinicalKernelTransform([fit_once, …]) Transform data using a clinical Kernel
clinical_kernel(x[, y]) Computes clinical kernel

Linear Models

CoxnetSurvivalAnalysis([n_alphas, alphas, …]) Cox’s proportional hazard’s model with elastic net penalty.
CoxPHSurvivalAnalysis([alpha, ties, n_iter, …]) Cox proportional hazards model.
IPCRidge([alpha, fit_intercept, normalize, …]) Accelerated failure time model with inverse probability of censoring weights.

Meta Models

EnsembleSelection(base_estimators[, scorer, …]) Ensemble selection for survival analysis that accounts for a score and correlations between predictions.
EnsembleSelectionRegressor(base_estimators) Ensemble selection for regression that accounts for the accuracy and correlation of errors.
Stacking(meta_estimator, base_estimators[, …]) Meta estimator that combines multiple base learners.


brier_score(survival_train, survival_test, …) Estimate the time-dependent Brier score for right censored data.
concordance_index_censored(event_indicator, …) Concordance index for right-censored data
concordance_index_ipcw(survival_train, …) Concordance index for right-censored data based on inverse probability of censoring weights.
cumulative_dynamic_auc(survival_train, …) Estimator of cumulative/dynamic AUC for right-censored time-to-event data.
integrated_brier_score(survival_train, …) The Integrated Brier Score (IBS) provides an overall calculation of the model performance at all available times \(t_1 \leq t \leq t_\text{max}\).

Non-parametric Estimators

CensoringDistributionEstimator() Kaplan–Meier estimator for the censoring distribution.
SurvivalFunctionEstimator() Kaplan–Meier estimate of the survival function.
ipc_weights(event, time) Compute inverse probability of censoring weights
kaplan_meier_estimator(event, time_exit[, …]) Kaplan-Meier estimator of survival function.
nelson_aalen_estimator(event, time) Nelson-Aalen estimator of cumulative hazard function.


OneHotEncoder([allow_drop]) Encode categorical columns with M categories into M-1 columns according to the one-hot scheme.
categorical_to_numeric(table) Encode categorical columns to numeric by converting each category to an integer value.
encode_categorical(table[, columns]) Encode categorical columns with M categories into M-1 columns according to the one-hot scheme.
standardize(table[, with_std]) Perform Z-Normalization on each numeric column of the given table.

Survival Support Vector Machine

HingeLossSurvivalSVM([solver, alpha, …]) Naive implementation of kernel survival support vector machine.
FastKernelSurvivalSVM([alpha, rank_ratio, …]) Efficient Training of kernel Survival Support Vector Machine.
FastSurvivalSVM([alpha, rank_ratio, …]) Efficient Training of linear Survival Support Vector Machine
MinlipSurvivalAnalysis([solver, alpha, …]) Survival model related to survival SVM, using a minimal Lipschitz smoothness strategy instead of a maximal margin strategy.
NaiveSurvivalSVM([penalty, loss, dual, tol, …]) Naive version of linear Survival Support Vector Machine.

Survival Trees

SurvivalTree([splitter, max_depth, …]) A survival tree.


Surv Helper class to construct structured array of event indicator and observed time.