survivalpredict.metrics.brier_scores_administrative¶
- survivalpredict.metrics.brier_scores_administrative(predictions, times, events, max_time=None, times_start=None)¶
Brier scores for administrative censorship.
Administrative brier scores is appropriate in cases where censoring is a function of time. When a individual is marked as censored due to the fact that they have not experienced event at the last observed time, and not due to a lack of follow-up or drop out. This is ideal for industry, where churned/converted/failed individuals are often known with relative certainty.
Within survival analysis, each ‘outcome’ of the Brier scores is a distinct time within the survival curve. Administrative Brier scores simply look at the squared difference between the survival curve and the known survival; censored times for an individual are excluded from the score. The lower the scores, the better.
- Parameters:
predictions (np.ndarray) – Predicted survival curves.
times (np.ndarray) – True points in time that were last observed.
events (np.ndarray) – True indicators if event was experienced.
max_time (Optional[int], default=None) – Maximum time to evaluate survival curves. If None, will evaluate all times seen.
times_start (Optional[np.ndarray], default=None) – Starting point for observation. If not passed in, all times_start times are assumed to be 0.
- Returns:
Brier scores, starting from time 1 to max times.
- Return type:
ndarray of shape (n_samples, max_time), dtype=np.float64
References
[1] Kvamme, Håvard & Borgan, Ørnulf. (2019). The Brier Score under Administrative Censoring: Problems and Solutions. 10.48550/arXiv.1912.08581.