Issue
I'm looking for a python/sklearn/lifelines/whatever implementation of Harrell's c-index (concordance index), which is mentioned in random survival forests.
The C-index is calculated using the following steps:
- Form all possible pairs of cases over the data.
- Omit those pairs whose shorter survival time is censored. Omit pairs i and j if
Ti=Tjunless at least one is a death. LetPermissibledenote the total number of permissible pairs. - For each permissible pair where
TiandTjare not equal, count 1 if the shorter survival time has worse predicted outcome; count 0.5 if predicted outcomes are tied. For each permissible pair, whereTi=Tjand both are deaths, count 1 if predicted outcomes are tied; otherwise, count 0.5. For each permissible pair whereTi=Tj, but not both are deaths, count 1 if the death has worse predicted outcome; otherwise, count 0.5. Let Concordance denote the sum over all permissible pairs. - The C-index,
C, is defined byC=Concordance/Permissible.
Note: nltk has a ConcordanceIndex method with a different meaning :(
Solution
LifeLines package now has this implemented c-index, or concordance-index
Answered By - Emanuel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.