tick.survival.
kaplan_meier
(timestamps, event_observed)[source]¶Computes the Kaplan-Meier survival function estimation given by:
where
\(d_i\) are the number of deaths at \(t_{i}\)
\(n_i\) are the number of patients alive just before \(t_{i}\)
timestamps : numpy.array
Timestamps for each observation
event_observed : numpy.array
Bool array denoting if the death event was observed or not
output : numpy.array
The computed Kaplan-Meier survival function estimation