hazardous.metrics
.integrated_brier_score_incidence#
- hazardous.metrics.integrated_brier_score_incidence(y_train, y_test, y_pred, times, event_of_interest='any')#
Time-integrated Brier score of a cause-specific cumulative incidence estimate.
\[\mathrm{IBS}_k = \frac{1}{t_{max} - t_{min}} \int^{t_{max}}_{t_{min}} \mathrm{BS}_k(u) du\]This scheme was introduced in [Graf1999] for survival analysis and extended to competing events in [Kretowska2018].
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. This is used to fit the IPCW estimator.
- y_testrecord-array, dictionnary or dataframe of shape (n_samples, 2)
The ground truth, consisting in the ‘event’ and ‘duration’ columns. In the “event” column, 0 indicates censoring, and any other values indicate competing event types.
- y_predarray-like of shape (n_samples, n_times)
Incidence probability estimates predicted at
times
. In the binary event settings, this is 1 - survival_probability.- 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.- event_of_interestint or “any”, default=”any”
The event to consider in a competing events setting. When an integer, this should be one of the non-zero values in the “event” column of
y_train
andy_test
."any"
indicates that all events except the censoring marker0
are considered collapsed together as a single event. In a single event setting,"any"
and1
are equivalent.
- Returns:
- ibsfloat
See also
brier_score_incidence
Time-dependent Brier score for the kth cause of event.
References
[Graf1999]E. Graf, C. Schmoor, W. Sauerbrei, M. Schumacher, “Assessment and comparison of prognostic classification schemes for survival data”, 1999
[Kretowska2018]M. Kretowska, “Tree-based models for survival data with competing risks”, 2018
[Gerds2006]T. Gerds and M. Schumacher, “Consistent Estimation of the Expected Brier Score in General Survival Models with Right-Censored Event Times”, 2006