# API reference¶

## Non-parametric Estimators¶

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

## Hypothesis testing¶

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

## 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.

## 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.

## 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. HingeLossSurvivalSVM([solver, alpha, …]) Naive implementation of kernel survival support vector machine. NaiveSurvivalSVM([penalty, loss, dual, tol, …]) Naive version of linear Survival Support Vector Machine.

## Kernels¶

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

## Survival Trees¶

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

## 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.

## Metrics¶

 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.

## Pre-Processing¶

 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.

## I/O Utilities¶

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

## Datasets¶

 get_x_y(data_frame, attr_labels[, …]) Split data frame into features and labels. load_arff_files_standardized(path_training, …) Load dataset in ARFF format. load_aids([endpoint]) Load and return the AIDS Clinical Trial dataset 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

## Utilities¶

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