sksurv.nonparametric.SurvivalFunctionEstimator

class sksurv.nonparametric.SurvivalFunctionEstimator

Kaplan–Meier estimate of the survival function.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__() Initialize self.
fit(y) Estimate survival distribution from training data.
predict_proba(time) Return probability of an event after given time point.
fit(y)

Estimate survival distribution from training data.

Parameters:y (structured array, shape = (n_samples,)) – A structured array containing the binary event indicator as first field, and time of event or time of censoring as second field.
Returns:
Return type:self
predict_proba(time)

Return probability of an event after given time point.

\(\hat{S}(t) = P(T > t)\)

Parameters:time (array, shape = (n_samples,)) – Time to estimate probability at.
Returns:prob – Probability of an event.
Return type:array, shape = (n_samples,)