I suggest to add a small value to prevent this, sth. like:
EPSILON = 1e-6Ghat = np.minimum(Ghat+EPSILON, 1.0)
I can confirm that for the data I use (real world data: conversion to an eye disease), this does not alter IBS or dynamic AUC metrics for models trained and evaluated with or without the change.
I'm against ignoring a zero probability of being censored, because this indicates that estimation is not possible. Adding a small epsilon would indicate everything is fine, which it is not.
I frequently run into situations where the censoring distribution estimator predicts very few probabilities of zero and hence end up with "censoring survival function is zero at one or more time points". https://github.com/sebp/scikit-survival/blob/32ae49b51865e1aecf72d0bf87c64e735bf5d548/sksurv/nonparametric.py#L583
I suggest to add a small value to prevent this, sth. like:
EPSILON = 1e-6
Ghat = np.minimum(Ghat+EPSILON, 1.0)
I can confirm that for the data I use (real world data: conversion to an eye disease), this does not alter IBS or dynamic AUC metrics for models trained and evaluated with or without the change.
Thank you very much for this great package!