sksurv.nonparametric.ipc_weights#
- sksurv.nonparametric.ipc_weights(event, time)[source]#
Compute inverse probability of censoring weights
- Parameters:
event (array-like, shape = (n_samples,)) – A boolean array where
Trueindicates an event andFalseindicates right-censoring.time (array-like, shape = (n_samples,)) – Time when a subject experienced an event or was censored.
- Returns:
weights – inverse probability of censoring weights
- Return type:
ndarray, shape = (n_samples,)
See also
CensoringDistributionEstimatorAn estimator interface for estimating inverse probability of censoring weights for unseen time points.