Module auton_survival.reporting

Functions

def plot_kaplanmeier(outcomes, groups=None, plot_counts=False, **kwargs)

Plot a Kaplan-Meier Survival Estimator stratified by groups.

Parameters

outcomes : pandas.DataFrame
 
a pandas dataframe containing the survival outcomes. The index of the
dataframe should be the same as the index of the features dataframe.
Should contain a column named 'time' that contains the survival time and
a column named 'event' that contains the censoring status.
\delta_i = 1 if the event is observed.
groups : pandas.Series
 
a pandas series containing the groups to stratify the Kaplan-Meier
estimates by.
plot_counts : bool
 

if True, plot the number of at risk and censored individuals in each group.

def plot_nelsonaalen(outcomes, groups=None, **kwargs)

Plot a Nelson-Aalen Survival Estimator stratified by groups.

Parameters

outcomes : pandas.DataFrame
 
a pandas dataframe containing the survival outcomes. The index of the
dataframe should be the same as the index of the features dataframe.
Should contain a column named 'time' that contains the survival time and
a column named 'event' that contains the censoring status.
\delta_i = 1 if the event is observed.
groups : pandas.Series
 

a pandas series containing the groups to stratify the Kaplan-Meier estimates by.