Axis of ROC Curve Labeled wrongly?

C1_W2_Lab_1_roc_curve _and_threshold

plt.xlabel(‘False Positive Rate (sensitivity)’)
plt.ylabel(‘True Positive Rate (1 - sepecificity)’)

Should it not be the other way around? FPR is (1-specificity) and TPR is sensitivity?

Hi @getjaidev , I think you might be right. Let me take this case to the team in charge.

Thank you!

Juan

Hi @getjaidev ,

My understanding is that the ROC curve is defined by “sensitivity”(y-axis) vs “1 - specificity”(x-axis), where “sensitivity” and “1 - specificity” equal “True Positive Rate(TPR)” and “False Negative Rate(FPR)”, respectively.

I would like to ask you a question based on the above.
In your assignment notebook, the x-label and y-label for the ROC curve are ‘False Positive Rate (sensitivity)’ and ‘True Positive Rate (1 - sepecificity)’ ?
I don’t think any labels were specified in the assignment, so let me first confirm the above point.

If I have misunderstood the situation, there might be misprints in the assignment.
Could you explain the situation in more detail?
It might be helpful for us.

Best regards,
Nakamura

Hello Nakamura… Yes. Please see lab code below…

Now let’s use matplotlib to plot the function

plt.plot(fpr,tpr)
plt.plot(0,1,‘ro’)
plt.legend([‘Estimator’])
plt.annotate(f’ ({0}, {1})',xy = (0,1))
plt.xlabel(‘False Positive Rate (sensitivity)’)
plt.ylabel(‘True Positive Rate (1 - sepecificity)’)
plt.title(‘ROC Curve for the estimator’)

Hi @getjaidev ,

Thank you for the explanation.
I understand the situation.