event_observed
variable should be an array of the same size as your duration array. Can you confirm that your event_observed
is the same size?kmf.fit(durations, True)
datetimes_to_durations
from lifelines.utils
to transform your data?
class MyWeibullFitter(WeibullFitter):
@property
def median_confidence_interval_(self):
'''get the confidence interval of the median, must call after fit and plot'''
if self.median_ != np.inf:
self.timeline = np.linspace(self.median_, self.median_, 1)
return self.confidence_interval_survival_function_
else:
return None
if self.median_ != np.inf
check
cluster_col
is CoxPHFitter: https://lifelines.readthedocs.io/en/latest/Examples.html#correlations-between-subjects-in-a-cox-model. Another solution is to strata-ify per machine in the CoxPHFitter.