Open ah-sadek opened 3 years ago
It is worthy to note that you mentioned that there is a bug when calculating the survival function in the Cox model with late entries. Specifically, while the coefficient estimate calculations handle the late entries, the calculation of the survival function does not.
Thanks @ah-sadek!
When modeling late entries in a kmf, the survival function would be more 'pessimistic' about customer survival, which makes sense.
kmf.fit(data["Duration"], event_observed=data["Observed"], entry=data["W"], label='modeling late entries')
However, when modeling late entries in a cph, we see the opposite effect, being, getting a better survival function than when ignoring late entries.
cph.fit(data, 'Duration', 'Observed',entry_col='W')
You can also refer to my repo here: https://github.com/ah-sadek/CustomerAnalytics