3
votes

enter image description hereI have created a few predictive models and I am in the process of evaluating them by looking at the ROC Curve and AUC.

Currently, I have Specificity on X axis, however, when I researched ROC Curves, I saw 1 - Specificity on the X axis.

What is the difference and which should I use to validate my predictive models? If Specificity is on the X-Axis, do I still want to maximize the AUC (from experience the answer is yes but I want to confirm)?

Here is how I am plotting it:

> library(pROC)
> g <- roc(Setup ~ Probs, data = Data)
> plot(g) 
> auc(g)
> ci.auc(g)
1
Does your ROC curve move towards the top-left corner with better performance? That's the convention. If you have specificity on the x-axis I guess the top-right corner would show better performance, but the area under the curve should be equal either way.Marius
@Marius I added an image of the RUC Curve. The curve moves towards the top right corner but the "peaks" approaches the top left (if that makes any sense).MhQ-6
In other words, it looks like any other ROC graph that I found on google, where the curve starts at the bottom left and moves towards the top right and the peaks extends towards the top left. Literally like any ROC curve you will find using google, only difference is, I have specificity on the x axis. All the ones I found on google have 1-Specificity. Not sure what to make of it.MhQ-6

1 Answers

5
votes

This is purely a labeling problem: note that the x axis goes decreasing from 1 to 0, which is exactly the same as plotting 1-specificity on an x axis increasing from 0 to 1.

I strongly suspect you are using the pROC package. This behavior is documented in the FAQ and you can set the legacy.axes argument to TRUE to change the behavior if the default one bothers you.

plot(g, legacy.axes = TRUE)