square / pysurvival

Open source package for Survival Analysis modeling
https://www.pysurvival.io/
Apache License 2.0
347 stars 107 forks source link

Fail set calculation issue #45

Open zys133 opened 2 years ago

zys133 commented 2 years ago

https://github.com/square/pysurvival/blob/master/pysurvival/models/semi_parametric.py#L395

This line calculate the events that occur at a given time.

It should be index_fail = np.argwhere( self.times == T[i] ).flatten()

index_fail = np.argwhere( self.times == T[i] )[0] only considers one event occur at the given time. We should consider all of ties.