hazardous.metrics
.integrated_brier_score_survival#
- hazardous.metrics.integrated_brier_score_survival(y_train, y_test, y_pred, times)#
Compute the Brier score integrated over the observed time range.
\[\mathrm{IBS} = \frac{1}{t_{max} - t_{min}} \int^{t_{max}}_{t_{min}} \mathrm{BS}(u) du\]Note that this assumes independence between censoring and the covariates. When this assumption is violated, the IPCW weights are biased and the Brier score is not a proper scoring rule anymore. See [Gerds2006] for a study of this bias.
- Parameters:
- y_trainrecord-array, dictionnary or dataframe of shape (n_samples, 2)
The target, consisting in the ‘event’ and ‘duration’ columns. If the ‘event’ column holds more than 1 event types, they are automatically collapsed to a single event type to compute the Brier score of the “any-event” survival function estimate. This is only used to estimate the IPCW values to adjust for censoring in the evaluation data.
- y_testrecord-array, dictionnary or dataframe of shape (n_samples, 2)
The ground truth, consisting in the ‘event’ and ‘duration’ columns. The same remark applies as for
y_train
with respect to the ‘event’ column.- y_predarray-like of shape (n_samples, n_times)
Survival probability estimates predicted at
times
.- timesarray-like of shape (n_times)
Times at which the survival probabilities
y_pred
has been estimated and for which we compute the Brier score.
- Returns:
- ibsfloat
See also
brier_score_survival
Time-dependent Brier score of a survival function estimate.
References
[Graf1999]E. Graf, C. Schmoor, W. Sauerbrei, M. Schumacher, “Assessment and comparison of prognostic classification schemes for survival data”, 1999
[Gerds2006]T. Gerds and M. Schumacher, “Consistent Estimation of the Expected Brier Score in General Survival Models with Right-Censored Event Times”, 2006