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 True indicates an event and False indicates 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

CensoringDistributionEstimator

An estimator interface for estimating inverse probability of censoring weights for unseen time points.