I believe there is an error in the definition of TPR. It should be about TP, not FP, right?
It is how many Positives we predicted correctly out of ALL positives. So the right formula is TPR = TP/P = TP / (TP + FN) and not TPR=FP/FP+TN as you have it.
Moreover the ROC plot in the cell 14 is also labeled incorrectly. The axes have FPR = sensitivity for X axis and TPR = (1 - specificity) for Y axis. So essentially Specificity and Sensitivity are swapped. Which later leads to confusion with the quiz when one of the questions is asking:
“For every specificity as we vary the threshold, the sensitivity of model 1 is at least as high as model 2…”
@Mubsi I just did this lab, and the incorrect definition is still there. Quite confusing as its not merely a simple typo, but an important metric definition