- sksurv.metrics.concordance_index_censored(event_indicator, event_time, estimate, tied_tol=1e-08)#
Concordance index for right-censored data
The concordance index is defined as the proportion of all comparable pairs in which the predictions and outcomes are concordant.
Two samples are comparable if (i) both of them experienced an event (at different times), or (ii) the one with a shorter observed survival time experienced an event, in which case the event-free subject “outlived” the other. A pair is not comparable if they experienced events at the same time.
Concordance intuitively means that two samples were ordered correctly by the model. More specifically, two samples are concordant, if the one with a higher estimated risk score has a shorter actual survival time. When predicted risks are identical for a pair, 0.5 rather than 1 is added to the count of concordant pairs.
event_indicator (array-like, shape = (n_samples,)) – Boolean array denotes whether an event occurred
event_time (array-like, shape = (n_samples,)) – Array containing the time of an event or time of censoring
estimate (array-like, shape = (n_samples,)) – Estimated risk of experiencing an event
tied_tol (float, optional, default: 1e-8) – The tolerance value for considering ties. If the absolute difference between risk scores is smaller or equal than tied_tol, risk scores are considered tied.
cindex (float) – Concordance index
concordant (int) – Number of concordant pairs
discordant (int) – Number of discordant pairs
tied_risk (int) – Number of pairs having tied estimated risks
tied_time (int) – Number of comparable pairs sharing the same time
Alternative estimator of the concordance index with less bias.