C2_W4_Assignment - Harrell's C-Index Unnecessarily Confusing, Needs Update

Hello Course Moderators,

This was an excellent course. I learned quite a bit that was completely new for me, and it was very well presented.

A couple of improvements for future versions in Exercise 3.

Section 7 of the above final assignment of the course needs to be updated. It does not follow the simple way to calculate the Harrell’s C-index as presented in the video lessons.

I have completed the assignment by simply following the very simple and intuitive guidance provided in the video lessons.

1. The starter code presented for this section is unnecessarily complex, and one section of it (see below) is plainly incorrect because if the first condition is implemented with an XOR (due to the “at most” clause in the comments), the next condition inside it will never be true:

check if at most one is censored

``````        if None:
pass

# check if neither are censored
if None:
pass
``````
1. Also, this section below that is found in the Jupyter notebook right above the Exercise does not match the simple presentation in the video. This needs to be updated as well:

To evaluate how good our model is performing, we will write our own version of the C-index. Similar to the week 1 case, C-index in the survival context is the probability that, given a randomly selected pair of individuals, the one who died sooner has a higher risk score.
However, we need to take into account censoring. Imagine a pair of patients, 𝐴 and 𝐵.
Scenario 1
• A was censored at time 𝑡𝐴
• B died at 𝑡𝐵
• 𝑡𝐴<𝑡𝐵.
Because of censoring, we can’t say whether 𝐴 or 𝐵 should have a higher risk score.
Scenario 2
Now imagine that 𝑡𝐴>𝑡𝐵.
• A was censored at time 𝑡𝐴
• B died at 𝑡𝐵
• 𝑡𝐴>𝑡𝐵
Now we can definitively say that 𝐵 should have a higher risk score than 𝐴, since we know for a fact that 𝐴 lived longer.
Therefore, when we compute our C-index
• We should only consider pairs where at most one person is censored
• If they are censored, then their censored time should occur after the other person’s time of death.
The metric we get if we use this rule is called Harrel’s C-index.
Note that in this case, being censored at time 𝑡 means that the true death time was some time AFTER time 𝑡 and not at 𝑡.
• Therefore if 𝑡𝐴=𝑡𝐵 and A was censored:
○ Then 𝐴 actually lived longer than 𝐵.
○ This will effect how you deal with ties in the exercise below!

Thank you,

Ananth Krishnan

Hello Ananth,

Even I had also conveyed some part of the assignment and course to be confusing for which it was told the course does need update and the feedback is welcome.

But eventually I understood when the assignment must have been done, it must have been approached from a perspective of the programmer who made this coding, which is actually not incorrect just a bit confusing.

Course do evolve with time to improvise and good that we are able to give our feedback and these would be considered when the course gets updated.

Regards
DP