diff --git a/CHANGELOG.md b/CHANGELOG.md index 15b335612..a0d909753 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ### Changelogs +#### 0.9.3 (in dev) + - adding `plot_loglogs` to `KaplanMeierFitter` + #### 0.9.2 - deprecates Pandas versions before 0.18. - throw an error if no admissable pairs in the c-index calculation. Previosly a NaN was returned. diff --git a/docs/Survival Regression.rst b/docs/Survival Regression.rst index 5709ab3e8..5bff37ef3 100644 --- a/docs/Survival Regression.rst +++ b/docs/Survival Regression.rst @@ -427,6 +427,21 @@ This example data is from the paper `here 0: + cs = { + 'marker': '+', + 'ms': 12, + 'mew': 1 + } + cs.update(censor_styles) + times = dataframe_slicer(cls.event_table.ix[(cls.event_table['censored'] > 0)]).index.values.astype(float) + v = cls.predict(times) + # don't log times, as Pandas will take care of all log-scaling later. + ax.plot(times, loglog(v), linestyle='None', + color=colour, **cs) + + # plot estimate + dataframe_slicer(loglog(cls.survival_function_)).plot(**kwargs) + return ax + _plot_loglogs.__doc__ = doc_string + return _plot_loglogs + + def plot_estimate(cls, estimate): doc_string = """" Plots a pretty version of the fitted %s.