Closed musikisomorphie closed 3 years ago
Hi @musikisomorphie! Thank you for the kind words.
I might completely misunderstand your question, but the reason for passing 1 - self.events
in add_km_censor()
is that it estimates the survival function of the censoring times (NOT the event times). We need these estimates of the censoring distribution to compute some scores like the IPCW Brier score.
If we want to get Kaplan-Meier estimate for the survival distribution (event times), you are correct that we should consider self.events
instead.
Does this answer your question?
@havak, thank you for your reply. You answered my question, I was confused about the utility of add_km_censor() function. I thought it merely computes Kaplan-Meier estimator and didn't realize that it was an intermediate step for computing other scores. Thank you again.
Happy to help!
Hi @havakv,
I am writing a paper on survival analysis, in which I am using the evaluation module, to calculate Concordance and IBS, I have just a simple question ,The censoring distribution is calculated using the train dataset at many places but I think evaluation module use the test data to create censoring distribution, I am bit confused, please help me out understand the it.
Hi @havakv, thanks for your great work. It really helps my research a lot. I just have one minor issue regarding the input for kaplan meier function: in your implementation of add_km_censor() function, you feed
1 - self.events
to the kaplan_meier:When I check the kaplan function, the survive is computed as follow:
where di in
survive = 1 - di / ni
is basically the sum of events computed in the_group_loop(...)
. According to the definition of kaplan meier estimator (https://en.wikipedia.org/wiki/Kaplan%E2%80%93Meier_estimator), it seems to me that we should feedself.events
instead of1 - self.events
toutils.kaplan_meier(...)
above. Maybe I am missing some other details. Could you help me with it.? Thank you very much.